1###############################################################################
2# Makefile for MEM 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: 	setup build install
34
35
36# commondefs must be included near the top so that all common variables
37# will be defined before their use.
38
39include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs
40
41
42# module name should be set to the name of this subdirectory
43# DEMO = TRUE indicates that this module resides under the "demos" subtree.
44# The list of selectable paths can be found in modulerules.
45
46MODULENAME	= memdemo
47DEMO		= TRUE
48
49
50# CSRCS lists all C files that should be built
51# The makefile determines which objects are linked into which binaries
52# based on the dependencies you fill in at the bottom of this file
53
54CSRCS		= exp-1.c  \
55			  frm-1.c  \
56			  unit-1.c \
57			  allocator.c \
58			  thread_safe.c \
59
60# BINNAMES lists all binaries that will be linked.  Note that no suffix is
61# required, as that will depend on whether this is a DEBUG build or not.
62# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
63
64BINNAMES 	= exp-1  \
65			  frm-1  \
66			  unit-1 \
67			  allocator \
68			  thread_safe \
69
70# defining a linker command file will have the build system generate it
71# automatically and include it on the linker invocation line
72
73LCF_FILE	= $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
74
75
76# modulerules contains the rules that will use the above variables
77# and dependencies below to construct the binaries specified.
78
79include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
80
81
82# Dependencies for the binaries listed in BINNAMES should come here
83# They are your typical makefile rule, with extra variables to ensure
84# that the names and paths match up.
85# $(FULLBIN_ROOT) is the location of the local bin directory
86# $(BINSUFFIX) depends on whether this is a debug build or not
87# $(DOLPHINLIBS) includes all the Dolphin libraries.
88
89$(FULLBIN_ROOT)/exp-1$(BINSUFFIX): exp-1.o \
90                    $(REVOLUTION_LIBS)     \
91                    $(INSTALL_ROOT)/lib/mem$(LIBSUFFIX)
92
93$(FULLBIN_ROOT)/frm-1$(BINSUFFIX): frm-1.o \
94                    $(REVOLUTION_LIBS)     \
95                    $(INSTALL_ROOT)/lib/mem$(LIBSUFFIX)
96
97$(FULLBIN_ROOT)/unit-1$(BINSUFFIX): unit-1.o \
98                    $(REVOLUTION_LIBS)       \
99                    $(INSTALL_ROOT)/lib/mem$(LIBSUFFIX)
100
101$(FULLBIN_ROOT)/allocator$(BINSUFFIX): allocator.o \
102                    $(REVOLUTION_LIBS)       \
103                    $(INSTALL_ROOT)/lib/mem$(LIBSUFFIX)
104
105$(FULLBIN_ROOT)/thread_safe$(BINSUFFIX): thread_safe.o \
106                    $(REVOLUTION_LIBS)       \
107                    $(INSTALL_ROOT)/lib/mem$(LIBSUFFIX)
108
109#======== End of makefile ========#
110