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