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