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.13 08/12/2006 12:08:15 hiratsu 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: 	setup build install
20
21
22# commondefs must be included near the top so that all common variables
23# will be defined before their use.
24
25include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs
26
27
28# module name should be set to the name of this subdirectory
29# DEMO = TRUE indicates that this module resides under the "demos" subtree.
30# The list of selectable paths can be found in modulerules.
31
32MODULENAME	= nanddemo
33DEMO		= TRUE
34
35
36# CSRCS lists all C files that should be built
37# The makefile determines which objects are linked into which binaries
38# based on the dependencies you fill in at the bottom of this file
39
40CSRCS		= basic.c  directory.c  async.c  util.c  gamesave.c  safe.c
41
42# BINNAMES lists all binaries that will be linked.  Note that no suffix is
43# required, as that will depend on whether this is a DEBUG build or not.
44# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
45
46BINNAMES 	= basic  directory  async  gamesave  safe
47
48
49# defining a linker command file will have the build system generate it
50# automatically and include it on the linker invocation line
51
52LCF_FILE	= $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
53
54
55# modulerules contains the rules that will use the above variables
56# and dependencies below to construct the binaries specified.
57
58include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
59
60# Dependencies for the binaries listed in BINNAMES should come here
61# They are your typical makefile rule, with extra variables to ensure
62# that the names and paths match up.
63# $(FULLBIN_ROOT) is the location of the local bin directory
64# $(BINSUFFIX) depends on whether this is a debug build or not
65# $(REVOLUTION_LIBS) includes all the Revolution libraries.
66
67$(FULLBIN_ROOT)/basic$(BINSUFFIX):	basic.o  util.o         \
68                 $(REVOLUTION_LIBS)
69
70$(FULLBIN_ROOT)/directory$(BINSUFFIX):	directory.o  util.o \
71                 $(REVOLUTION_LIBS)
72
73$(FULLBIN_ROOT)/async$(BINSUFFIX):	async.o  util.o         \
74                 $(REVOLUTION_LIBS)
75
76$(FULLBIN_ROOT)/gamesave$(BINSUFFIX):  gamesave.o           \
77                 $(REVOLUTION_LIBS)
78
79$(FULLBIN_ROOT)/safe$(BINSUFFIX):	safe.o  util.o          \
80                 $(REVOLUTION_LIBS)
81
82#======== End of makefile ========#
83