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