1###############################################################################
2# Makefile for NAND library demo
3#
4# Copyright (C) 2006 Nintendo.  All rights reserved.
5#
6# These coded instructions, statements, and computer programs contain
7# proprietary information of Nintendo of America Inc. and/or Nintendo
8# Company Ltd., and are protected by Federal copyright law.  They may
9# not be disclosed to third parties or copied or duplicated in any form,
10# in whole or in part, without the prior written consent of Nintendo.
11#
12# $Id: makefile,v 1.18 2008/09/05 09:41:44 nrs_buildsystem Exp $
13###############################################################################
14
15# All modules have "setup" and "build" as targets.  System libraries
16# and demo programs also have an "install" target that copies the compiled
17# binaries to the binary tree (/$(ARCH_TARGET)).
18
19all:
20	$(MAKE) setup
21	$(MAKE) build
22	$(MAKE) install
23
24
25# commondefs must be included near the top so that all common variables
26# will be defined before their use.
27
28include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs
29
30
31# module name should be set to the name of this subdirectory
32# DEMO = TRUE indicates that this module resides under the "demos" subtree.
33# The list of selectable paths can be found in modulerules.
34
35MODULENAME	= nanddemo
36DEMO		= TRUE
37
38
39# CSRCS lists all C files that should be built
40# The makefile determines which objects are linked into which binaries
41# based on the dependencies you fill in at the bottom of this file
42
43CSRCS		= basic.c  directory.c  async.c  util.c  gamesave.c  safe.c  check.c  banner.c  cancel.c
44
45# BINNAMES lists all binaries that will be linked.  Note that no suffix is
46# required, as that will depend on whether this is a DEBUG build or not.
47# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
48
49BINNAMES 	= basic  directory  async  gamesave  safe  check  banner  cancel
50
51
52# defining a linker command file will have the build system generate it
53# automatically and include it on the linker invocation line
54
55LCF_FILE	= $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
56
57
58TPL_LIB     = $(INSTALL_ROOT)/lib/tpl$(LIBSUFFIX)
59
60# modulerules contains the rules that will use the above variables
61# and dependencies below to construct the binaries specified.
62
63include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
64
65# Dependencies for the binaries listed in BINNAMES should come here
66# They are your typical makefile rule, with extra variables to ensure
67# that the names and paths match up.
68# $(FULLBIN_ROOT) is the location of the local bin directory
69# $(BINSUFFIX) depends on whether this is a debug build or not
70# $(REVOLUTION_LIBS) includes all the Revolution libraries.
71
72$(FULLBIN_ROOT)/basic$(BINSUFFIX):	basic.o  util.o         \
73                 $(REVOLUTION_LIBS)
74
75$(FULLBIN_ROOT)/directory$(BINSUFFIX):	directory.o  util.o \
76                 $(REVOLUTION_LIBS)
77
78$(FULLBIN_ROOT)/async$(BINSUFFIX):	async.o  util.o         \
79                 $(REVOLUTION_LIBS)
80
81$(FULLBIN_ROOT)/gamesave$(BINSUFFIX):  gamesave.o           \
82                 $(REVOLUTION_LIBS)
83
84$(FULLBIN_ROOT)/safe$(BINSUFFIX):	safe.o  util.o          \
85                 $(REVOLUTION_LIBS)
86
87$(FULLBIN_ROOT)/check$(BINSUFFIX):	check.o  util.o         \
88                 $(REVOLUTION_LIBS)
89
90$(FULLBIN_ROOT)/banner$(BINSUFFIX):	banner.o  util.o        \
91                 $(REVOLUTION_LIBS) $(TPL_LIB)
92
93$(FULLBIN_ROOT)/cancel$(BINSUFFIX):	cancel.o  util.o        \
94                 $(REVOLUTION_LIBS)
95
96#======== End of makefile ========#
97