1#! make -f
2#---------------------------------------------------------------------------
3#  Project:  NitroSDK - tools - makelcf
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#  $Log: Makefile,v $
15#  Revision 1.21  2007/07/10 01:55:36  okubata_ryoma
16#  Copyright fix
17#
18#  Revision 1.20  2007/07/09 12:18:07  yasu
19#  Support for TARGET_NAME
20#
21#  Revision 1.19  2006/05/11 12:55:47  yasu
22#  Updated copyright year
23#
24#  Revision 1.18  2006/05/10 03:18:56  yasu
25#  Checked the IF-ELSE-ENDIF conditional test and tested searchsymbol
26#
27#  Revision 1.17  2005/08/29 00:17:13  yasu
28#  Updated copyright year
29#
30#  Revision 1.16  2005/08/29 00:12:29  yasu
31#  Removed -d option
32#
33#  Revision 1.15  2005/08/26 11:23:38  yasu
34#  Overlay support for ITCM/DTCM
35#
36#  Revision 1.14  2005/08/26 04:35:19  yasu
37#  Corrected problem where the arena would become strange when using DTCM overlay
38#
39#  Revision 1.13  2004/08/05 13:37:28  yasu
40#  Add test code for -M option
41#
42#  Revision 1.12  2004/07/19 05:08:56  yasu
43#  Added rule for super-clobber
44#
45#  Revision 1.11  2004/07/08 02:59:29  yasu
46#  Tested section name for multi-objects as 'Objects' parameters
47#
48#  Revision 1.10  2004/06/24 07:15:58  yasu
49#  Added test files
50#
51#  Revision 1.9  2004/05/27 09:58:58  yasu
52#  Fixed specfiles directory to current position
53#
54#  Revision 1.8  2004/02/16 03:49:21  yasu
55#  Changed switch name CODEGEN_PROC to NITRO_PROC
56#
57#  Revision 1.7  2004/02/05 07:09:03  yasu
58#  Changed SDK prefix iris -> nitro
59#
60#  Revision 1.6  2004/02/03 07:37:16  yasu
61#  Added target "autotest"
62#
63#  Revision 1.5  2004/01/15 13:25:37  yasu
64#  Added test code
65#
66#  Revision 1.4  2004/01/15 10:51:24  yasu
67#  Changed a few filenames
68#
69#  Revision 1.3  2004/01/14 01:59:02  yasu
70#  Changed filename
71#
72#  Revision 1.2  2004/01/07 13:11:08  yasu
73#  Changed command casing
74#
75#  Revision 1.1  2004/01/05 02:32:59  yasu
76#  Initial version
77#
78#  $NoKeywords: $
79#---------------------------------------------------------------------------
80TARGET_PLATFORM		= NITRO
81
82include	$(NITROSDK_ROOT)/build/buildtools/commondefs
83
84TARGET			 =	simple1.lcf simple2.lcf test.autogen.lcf ARM9-TEG.autogen.lcf overlay.autogen.lcf
85TARGET			+=	test2.lcf
86
87LCFILE_TEMPLATE	 =	$(NITRO_INCDIR)/nitro/specfiles/$(NITRO_PROC)-$(NITRO_PLATFORM).lcf.template
88
89%.autogen.lcf:		%.lsf $(MAKELCF) $(LCFILE_TEMPLATE)
90			$(MAKELCF) -T $* $(MAKELCF_FLAGS) $< $(LCFILE_TEMPLATE) $@
91
92simple1.lcf:		simple.lsf $(MAKELCF) simple.lcf.template
93			$(MAKELCF) $(MAKELCF_FLAGS) -V1 $< simple.lcf.template $@
94
95simple2.lcf:		simple.lsf $(MAKELCF) simple.lcf.template
96			$(MAKELCF) -T $(basename $@) $(MAKELCF_FLAGS) -V2 $< simple.lcf.template $@
97
98test2.lcf:		test2.lsf $(MAKELCF) test2.def
99			$(MAKELCF) -T $(basename $@) $(MAKELCF_FLAGS) -Mtest2.def $< $(LCFILE_TEMPLATE) $@
100
101MAKELCF =		$(NITRO_TOOLSDIR)/bin/makelcf.exe
102
103.PHONY:			build install do-autotest clean clobber
104
105define ECHO_CURDIR
106			echo "==== $(CURDIR)";
107endef
108
109build:
110			@$(ECHO_CURDIR)
111			@$(MAKE) $(TARGET)
112
113install do-autotest:
114			@$(ECHO_CURDIR)
115
116clean clobber super-clobber:
117			@$(ECHO_CURDIR)
118			-rm -f $(TARGET) *~
119