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