1###############################################################################
2# Makefile for paddemo
3#
4# Copyright (C) 1998-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# $Log: makefile,v $
13# Revision 1.1  02/02/2006 06:11:04  yasuh-to
14# Initial import
15#
16#
17#   8     9/03/01 19:41:00 Shiki
18#   Added sampling.
19#
20#   7     01/03/15 13:25 Shiki
21#   Fixed BINNAMES.
22#
23#   6     01/03/13 13:04 Shiki
24#   Fixed not to create cont demo with Mac build.
25#
26#   5     11/29/00 4:37p Shiki
27#   Fixed not to create motor demo with Mac build.
28#
29#   4     11/29/00 4:27p Shiki
30#   Added motor.
31#
32#   3     11/13/00 6:03p Shiki
33#   Added cont.
34#
35#   2     3/01/00 11:49p Shiki
36#   Added simple and basic. Removed main.
37#
38#   6     11/03/99 6:10p Shiki
39#   Revised to support multiple platforms.
40# $NoKeywords: $
41#
42###############################################################################
43
44##################################
45# QUICK START INSTRUCTIONS
46# Type "make" at /dolphin/build/demos/paddemo to build DEBUG versions
47# of all demos
48# Type "make NDEBUG=TRUE" to build OPTIMIZED versions of all tests
49# Type "make dvddemo1D.bin" to build DEBUG version of just dvddemo1
50# Type "make NDEBUG=TRUE dvddemo1.bin" to build OPTIMIZED version of
51# just dvddemo1
52#
53# To add another demo
54# 1. add the .c files to CSRCS to make sure they are built
55# 2. add the binary name (no suffix) to BINNAMES
56# 3. add a dependency rule for this executable at the bottom of this file
57##################################
58
59
60# All modules have "setup" and "build" as targets.  System libraries
61# and demo programs also have an "install" target that copies the compiled
62# binaries to the binary tree (/$(ARCH_TARGET)).
63all: 	setup build install
64
65# commondefs must be included near the top so that all common variables
66# will be defined before their use.
67include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs
68
69# module name should be set to the name of this subdirectory
70# DEMO = TRUE indicates that this module resides under the "demos" subtree.
71# The list of selectable paths can be found in modulerules.
72MODULENAME	= paddemo
73DEMO		= TRUE
74
75# CSRCS lists all C files that should be built
76# The makefile determines which objects are linked into which binaries
77# based on the dependencies you fill in at the bottom of this file
78
79CSRCS		= simple.c basic.c
80
81ifdef EPPC
82# defining a linker command file will have the build system generate it
83# automatically and include it on the linker invocation line
84LCF_FILE	= $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
85endif
86
87# BINNAMES lists all binaries that will be linked.  Note that no suffix is
88# required, as that will depend on whether this is a DEBUG build or not.
89# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
90BINNAMES 	= simple basic
91
92ifdef EPPC
93CSRCS		+= cont.c contdemo.c motordemo.c sampling.c
94BINNAMES 	+= cont motor sampling
95endif
96
97# modulerules contains the rules that will use the above variables
98# and dependencies below to construct the binaries specified.
99include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
100
101
102# Dependencies for the binaries listed in BINNAMES should come here
103# They are your typical makefile rule, with extra variables to ensure
104# that the names and paths match up.
105# $(FULLBIN_ROOT) is the location of the local bin directory
106# $(BINSUFFIX) depends on whether this is a debug build or not
107# $(REVOLUTION_LIBS) includes all the Revolution libraries.
108$(FULLBIN_ROOT)/simple$(BINSUFFIX): simple.o \
109		      $(REVOLUTION_LIBS)
110
111$(FULLBIN_ROOT)/basic$(BINSUFFIX): basic.o \
112		      $(REVOLUTION_LIBS)
113
114$(FULLBIN_ROOT)/cont$(BINSUFFIX): cont.o contdemo.o \
115		      $(REVOLUTION_LIBS)
116
117$(FULLBIN_ROOT)/motor$(BINSUFFIX): cont.o motordemo.o \
118		      $(REVOLUTION_LIBS)
119
120$(FULLBIN_ROOT)/sampling$(BINSUFFIX): sampling.o \
121		      $(REVOLUTION_LIBS)
122