1#! make -f
2#----------------------------------------------------------------------------
3# Project:  TwlSDK - WM - libraries
4# File:     Makefile
5#
6# Copyright 2003-2008 Nintendo. All rights reserved.
7#
8# These coded instructions, statements, and computer programs contain
9# proprietary information of Nintendo of America Inc. and/or Nintendo
10# Company Ltd., and are protected by Federal copyright law. They may
11# not be disclosed to third parties or copied or duplicated in any form,
12# in whole or in part, without the prior written consent of Nintendo.
13#
14# $Date:: 2008-09-26#$
15# $Rev: 8688 $
16# $Author: sato_masaki $
17#----------------------------------------------------------------------------
18
19override TARGET_PLATFORM = TWL
20
21# Codegen for subprocessor
22TWL_PROC		 =  ARM9
23TWL_CODEGEN		?= ALL
24
25# Create libraries for both HYBRID and LIMITED
26TWL_ARCHGEN		?= ALL
27
28# Directory for firmware transferred with LoadDeviceEx
29TWLWIRELESS_FW_DIR = ../../../../../../add-ins/TwlWireless/$(TWLWIRELESS_PACKAGE)/binfile
30
31SRCDIR			 = ./src ../../common.TWL/src
32INCDIR			 = ./inc ../../inc ../../ARM9/inc ../../common.TWL/inc ../common/inc
33
34SRCS			 = 	nwm_init.c			\
35					nwm_system.c		\
36					nwm_end.c			\
37					nwm_loaddev.c		\
38					nwm_unloaddev.c		\
39					nwm_open.c			\
40					nwm_close.c			\
41					nwm_startscan.c		\
42					nwm_connect.c		\
43					nwm_disconnect.c	\
44					nwm_setwepkey.c		\
45					nwm_setpowersave.c	\
46					nwm_sendframe.c		\
47					nwm_recvframe.c		\
48					nwm_wpa.c			\
49					nwm_qos.c			\
50					nwm_cmd.c			\
51					nwm_reset.c			\
52					nwm_passphrase.c	\
53					nwm_installfirm.c
54
55ifdef NWM_INCLUDE_FIRM
56EXT_OBJS         = $(OBJDIR)/nwm_firm.o
57endif
58
59TARGET_LIB		 = libnwm$(TWL_LIBSUFFIX).a
60
61include	$(TWLSDK_ROOT)/build/buildtools/commondefs
62
63INSTALL_TARGETS	 = $(TARGETS)
64
65INSTALL_DIR		 = $(TWL_INSTALL_LIBDIR)
66
67GDIRT_INSTALLED	 = $(addprefix $(INSTALL_DIR)/,$(notdir $(INSTALL_TARGETS)))
68
69#----------------------------------------------------------------------------
70# New wireless debugging flags and so on
71
72ifdef	NWM_DEBUG
73CCFLAGS +=	-DNWM_DEBUG
74endif
75
76# Include wireless firmware with the library
77ifdef NWM_INCLUDE_FIRM
78CCFLAGS += -DNWM_INCLUDE_FIRM
79endif
80
81CCFLAGS += -DENABLE_RXACK
82
83#----------------------------------------------------------------------------
84
85do-build:		$(TARGETS)
86
87include	$(TWLSDK_ROOT)/build/buildtools/modulerules
88
89ifdef NWM_INCLUDE_FIRM
90$(OBJDIR)/nwm_firm.o:	 $(TWLWIRELESS_FW_DIR)/nwm_firm.bin
91			$(BIN2OBJ) $< $@
92endif
93
94#===== End of Makefile =====
95