1###############################################################################
2# Makefile for WPAD simple demo
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
13##################################
14# QUICK START INSTRUCTIONS
15# Type "make" at /build/tests/audio to build DEBUG versions of all tests.
16# Type "make NDEBUG=TRUE" to build OPTIMIZED versions of all tests
17# Type "make lit-test00D.bin" to build DEBUG version of just lit-test00
18# Type "make NDEBUG=TRUE lit-test00.bin" to build OPTIMIZED version of
19# ju ctable paths can be found in modulerules.
20# just lit-test00
21#
22# To add another test
23# 1. add the .c files to CSRCS to make sure they are built
24# 2. add the binary name (no suffix) to BINNAMES
25# 3. add a dependency rule for this executable at the bottom of this file
26##################################
27
28
29# All modules have "setup" and "build" as targets.  System libraries
30# and demo programs also have an "install" target that copies the compiled
31# binaries to the binary tree (/$(ARCH_TARGET)).
32
33all:
34	$(MAKE) setup
35	$(MAKE) build
36	$(MAKE) install
37
38
39# commondefs must be included near the top so that all common variables
40# will be defined before their use.
41
42#
43# Must specify WPADEMU_LIB for this demo
44# This tells commondefs that we need: wpademu.a and padempty.a
45# Otherwise it defaults to pad.a
46#
47#WPADEMU_LIB=TRUE
48
49include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs
50
51
52# module name should be set to the name of this subdirectory
53# DEMO = TRUE indicates that this module resides under the "demos" subtree.
54# The list of selectable paths can be found in modulerules.
55
56MODULENAME	= wpaddemo
57DEMO		= TRUE
58
59
60# CSRCS lists all C files that should be built
61# The makefile determines which objects are linked into which binaries
62# based on the dependencies you fill in at the bottom of this file
63
64CSRCS		=     	wpadsample.c	\
65					wpad_axdemo.c 	\
66					wpad_seqdemo.c 	\
67					wpad_spdemo.c 	\
68					memory.c 		\
69					sync.c 			\
70					dummy_checker.c \
71					mplus.c			\
72
73# BINNAMES lists all binaries that will be linked.  Note that no suffix is
74# required, as that will depend on whether this is a DEBUG build or not.
75# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
76
77BINNAMES 	= wpadsample 	\
78			  wpad_axdemo 	\
79			  wpad_seqdemo 	\
80			  wpad_spdemo 	\
81			  memory 		\
82			  sync 			\
83			  dummy_checker \
84			  mplus			\
85
86# defining a linker command file will have the build system generate it
87# automatically and include it on the linker invocation line
88
89LCF_FILE	= $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
90
91# modulerules contains the rules that will use the above variables
92# and dependencies below to construct the binaries specified.
93
94include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
95
96REVOLUTION_LIBS += $(INSTALL_ROOT)/lib/wenc$(LIBSUFFIX)
97WPAD_EXT_LIBS    = $(INSTALL_ROOT)/lib/wbc$(LIBSUFFIX)
98
99# Dependencies for the binaries listed in BINNAMES should come here
100# They are your typical makefile rule, with extra variables to ensure
101# that the names and paths match up.
102# $(FULLBIN_ROOT) is the location of the local bin directory
103# $(BINSUFFIX) depends on whether this is a debug build or not
104# $(REVOLUTION_LIBS) includes all the Dolphin libraries.
105
106$(FULLBIN_ROOT)/wpadsample$(BINSUFFIX):wpadsample.o $(REVOLUTION_LIBS) $(WPAD_EXT_LIBS)
107
108$(FULLBIN_ROOT)/wpad_axdemo$(BINSUFFIX):wpad_axdemo.o $(REVOLUTION_LIBS)
109
110$(FULLBIN_ROOT)/wpad_seqdemo$(BINSUFFIX):wpad_seqdemo.o $(REVOLUTION_LIBS)
111
112$(FULLBIN_ROOT)/wpad_spdemo$(BINSUFFIX):wpad_spdemo.o $(REVOLUTION_LIBS)
113
114$(FULLBIN_ROOT)/memory$(BINSUFFIX):memory.o $(REVOLUTION_LIBS)
115
116$(FULLBIN_ROOT)/sync$(BINSUFFIX):sync.o $(REVOLUTION_LIBS)
117
118$(FULLBIN_ROOT)/dummy_checker$(BINSUFFIX):dummy_checker.o $(REVOLUTION_LIBS)
119
120$(FULLBIN_ROOT)/mplus$(BINSUFFIX):mplus.o $(REVOLUTION_LIBS)
121
122#======== End of makefile ========#
123