1###############################################################################
2# Makefile for sampledemo
3#
4# Copyright 2005 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.4 2008/05/19 08:43:11 nakano_yoshinobu 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	= osdemo
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		= stopwatchdemo.c            \
41              allocdemo1-gettingmemory.c \
42              allocdemo2-oneheap.c       \
43              allocdemo3-multipleheaps.c \
44              cachedemo.c                \
45              timerdemo.c                \
46              idlefunctiondemo.c         \
47              threaddemo1.c              \
48              threaddemo2.c              \
49              threaddemo3.c              \
50              threaddemo4.c              \
51              threaddemo5.c              \
52              fontdemo1.c                \
53              fontdemo2.c                \
54              report.c                   \
55              panic.c                    \
56              errordemo.c                \
57              fpe.c                      \
58              lockedcachedemo1.c         \
59              lockedcachedemo2.c         \
60              crcdemo.c                  \
61              alarm.c
62
63CPPSRCS		= cppsetupdemo.cpp
64
65# BINNAMES lists all binaries that will be linked.  Note that no suffix is
66# required, as that will depend on whether this is a DEBUG build or not.
67# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
68
69BINNAMES 	= stopwatchdemo            \
70              allocdemo1-gettingmemory \
71              allocdemo2-oneheap       \
72              allocdemo3-multipleheaps \
73              cachedemo                \
74              timerdemo                \
75              idlefunctiondemo         \
76              threaddemo1              \
77              threaddemo2              \
78              threaddemo3              \
79              threaddemo4              \
80              threaddemo5              \
81              fontdemo1                \
82              fontdemo2                \
83              report                   \
84              panic                    \
85              errordemo                \
86              fpe                      \
87              cppsetupdemo             \
88              lockedcachedemo1         \
89              lockedcachedemo2         \
90              crcdemo                  \
91              alarm
92
93# defining a linker command file will have the build system generate it
94# automatically and include it on the linker invocation line
95
96LCF_FILE	= $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
97
98
99# modulerules contains the rules that will use the above variables
100# and dependencies below to construct the binaries specified.
101
102include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
103
104
105# Dependencies for the binaries listed in BINNAMES should come here
106# They are your typical makefile rule, with extra variables to ensure
107# that the names and paths match up.
108# $(FULLBIN_ROOT) is the location of the local bin directory
109# $(BINSUFFIX) depends on whether this is a debug build or not
110# $(REVOLUTION_LIBS) includes all the Revolution libraries.
111
112$(FULLBIN_ROOT)/cachedemo$(BINSUFFIX): cachedemo.o \
113			$(REVOLUTION_LIBS)
114$(FULLBIN_ROOT)/timerdemo$(BINSUFFIX): timerdemo.o \
115			$(REVOLUTION_LIBS)
116$(FULLBIN_ROOT)/stopwatchdemo$(BINSUFFIX): stopwatchdemo.o \
117			$(REVOLUTION_LIBS)
118$(FULLBIN_ROOT)/allocdemo1-gettingmemory$(BINSUFFIX): \
119			allocdemo1-gettingmemory.o \
120			$(REVOLUTION_LIBS)
121$(FULLBIN_ROOT)/allocdemo2-oneheap$(BINSUFFIX): \
122			allocdemo2-oneheap.o \
123			$(REVOLUTION_LIBS)
124$(FULLBIN_ROOT)/allocdemo3-multipleheaps$(BINSUFFIX): \
125			allocdemo3-multipleheaps.o \
126			$(REVOLUTION_LIBS)
127$(FULLBIN_ROOT)/idlefunctiondemo$(BINSUFFIX): idlefunctiondemo.o \
128			$(REVOLUTION_LIBS)
129$(FULLBIN_ROOT)/threaddemo1$(BINSUFFIX): threaddemo1.o \
130			$(REVOLUTION_LIBS)
131$(FULLBIN_ROOT)/threaddemo2$(BINSUFFIX): threaddemo2.o \
132			$(REVOLUTION_LIBS)
133$(FULLBIN_ROOT)/threaddemo3$(BINSUFFIX): threaddemo3.o \
134			$(REVOLUTION_LIBS)
135$(FULLBIN_ROOT)/threaddemo4$(BINSUFFIX): threaddemo4.o \
136			$(REVOLUTION_LIBS)
137$(FULLBIN_ROOT)/threaddemo5$(BINSUFFIX): threaddemo5.o \
138			$(REVOLUTION_LIBS)
139$(FULLBIN_ROOT)/fontdemo1$(BINSUFFIX): fontdemo1.o \
140			$(REVOLUTION_LIBS)
141$(FULLBIN_ROOT)/fontdemo2$(BINSUFFIX): fontdemo2.o \
142			$(REVOLUTION_LIBS)
143$(FULLBIN_ROOT)/report$(BINSUFFIX): report.o \
144			$(REVOLUTION_LIBS)
145$(FULLBIN_ROOT)/panic$(BINSUFFIX): panic.o \
146			$(REVOLUTION_LIBS)
147$(FULLBIN_ROOT)/errordemo$(BINSUFFIX): errordemo.o \
148			$(REVOLUTION_LIBS)
149$(FULLBIN_ROOT)/fpe$(BINSUFFIX): fpe.o \
150			$(REVOLUTION_LIBS)
151$(FULLBIN_ROOT)/lockedcachedemo1$(BINSUFFIX): lockedcachedemo1.o \
152			$(REVOLUTION_LIBS)
153$(FULLBIN_ROOT)/lockedcachedemo2$(BINSUFFIX): lockedcachedemo2.o \
154			$(REVOLUTION_LIBS)
155$(FULLBIN_ROOT)/alarm$(BINSUFFIX): alarm.o \
156			$(REVOLUTION_LIBS)
157$(FULLBIN_ROOT)/crcdemo$(BINSUFFIX): crcdemo.o \
158			$(REVOLUTION_LIBS)
159$(FULLBIN_ROOT)/cppsetupdemo$(BINSUFFIX): cppsetupdemo.o \
160			$(REVOLUTION_LIBS)
161
162
163#======== End of makefile ========#
164