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