1###############################################################################
2# Makefile for videmo
3#
4# Copyright 2000 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.12  2008/09/05 09:42:28  nrs_buildsystem
14# Changed all command to adopt "make -j option(parallel processing)" (by yasuh-to).
15#
16# Revision 1.11  2008/06/26 02:57:00  urata
17# Removed MPAL defines
18#
19# Revision 1.10  2008/05/09 04:56:46  urata
20# Removed CGMS demo.
21#
22# Revision 1.9  2008/03/11 09:57:19  urata
23# Added cgmsdemo.
24#
25# Revision 1.8  2006/09/22 08:44:12  urata
26# Added moving.regions.
27#
28# Revision 1.7  2006/09/06 14:08:15  urata
29# Added dimming demo.
30#
31# Revision 1.6  2006/07/22 04:55:31  urata
32# Added new demo "cross-color".
33#
34# Revision 1.5  2006/06/16 07:47:54  urata
35# Added new demo "frb-vi-gamma".
36#
37# Revision 1.4  2006/06/05 00:40:53  urata
38# Added new test "smp-onetri.Progressive".
39#
40# Revision 1.3  2006/05/18 09:43:02  urata
41# Added the new demo for progressive.
42#
43# Revision 1.2  2006/01/06 07:13:12  hiratsu
44# changed LCF file path.
45#
46# Revision 1.1  2005/12/16 08:33:54  urata
47# Initial checkin.
48#
49#
50#   4     01/11/13 15:39 Hashida
51#   Fixed a bug that smp-onetri_PAL is not built by default.
52#
53#   3     11/04/01 10:37a Hashida
54#   Added smp-onetri_PAL.c
55#
56#   2     3/01/00 5:38p Hashida
57#   Moved viewer from tests.
58#
59#   1     2/18/00 10:39a Hashida
60#   initial checkin
61#
62# $NoKeywords: $
63#
64###############################################################################
65
66
67# All modules have "setup" and "build" as targets.  System libraries
68# and demo programs also have an "install" target that copies the compiled
69# binaries to the binary tree (/$(ARCH_TARGET)).
70
71all:
72	$(MAKE) setup
73	$(MAKE) build
74	$(MAKE) install
75
76# commondefs must be included near the top so that all common variables
77# will be defined before their use.
78
79include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs
80
81# additional libraries not defined as REVOLUTION_LIBS
82TPL_LIB     = $(INSTALL_ROOT)/lib/tpl$(LIBSUFFIX)
83
84# module name should be set to the name of this subdirectory
85# DEMO = TRUE indicates that this module resides under the "demos" subtree.
86# The list of selectable paths can be found in modulerules.
87MODULENAME	= videmo
88DEMO		= TRUE
89
90# CSRCS lists all C files that should be built
91# The makefile determines which objects are linked into which binaries
92# based on the dependencies you fill in at the bottom of this file
93CSRCS		= color.c moving.c moving.30Hz.c viewer.c bmp.c smp-onetri_PAL.c moving.progressive.c \
94				smp-onetri_Progressive.c frb-vi-gamma.c cross-color.c dimming.c \
95				moving.regions.c
96
97ifdef EPPC
98# defining a linker command file will have the build system generate it
99# automatically and include it on the linker invocation line
100LCF_FILE	= $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
101endif
102
103TVTYPES = _NTSC_INT _NTSC_DS _PAL_INT _PAL_DS
104
105# BINNAMES lists all binaries that will be linked.  Note that no suffix is
106# required, as that will depend on whether this is a DEBUG build or not.
107# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
108BINNAMES 	= color moving moving.30Hz $(addprefix viewer,$(TVTYPES)) \
109		smp-onetri_PAL moving.progressive smp-onetri_Progressive \
110		frb-vi-gamma cross-color dimming moving.regions
111
112
113# modulerules contains the rules that will use the above variables
114# and dependencies below to construct the binaries specified.
115include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
116
117
118# Dependencies for the binaries listed in BINNAMES should come here
119# They are your typical makefile rule, with extra variables to ensure
120# that the names and paths match up.
121# $(FULLBIN_ROOT) is the location of the local bin directory
122# $(BINSUFFIX) depends on whether this is a debug build or not
123# $(REVOLUTION_LIBS) includes all the Revolution libraries.
124$(FULLBIN_ROOT)/color$(BINSUFFIX): color.o \
125		      $(REVOLUTION_LIBS)
126
127$(FULLBIN_ROOT)/moving$(BINSUFFIX): moving.o \
128		      $(REVOLUTION_LIBS)
129
130$(FULLBIN_ROOT)/moving.30Hz$(BINSUFFIX): moving.30Hz.o \
131		      $(REVOLUTION_LIBS)
132
133$(FULLBIN_ROOT)/moving.progressive$(BINSUFFIX): moving.progressive.o \
134		      $(REVOLUTION_LIBS)
135
136$(FULLBIN_ROOT)/smp-onetri_PAL$(BINSUFFIX): smp-onetri_PAL.o \
137		      $(REVOLUTION_LIBS)
138
139$(FULLBIN_ROOT)/smp-onetri_Progressive$(BINSUFFIX): smp-onetri_Progressive.o \
140		      $(REVOLUTION_LIBS)
141
142$(FULLBIN_ROOT)/frb-vi-gamma$(BINSUFFIX): frb-vi-gamma.o \
143		      $(REVOLUTION_LIBS) $(TPL_LIB)
144
145$(FULLBIN_ROOT)/cross-color$(BINSUFFIX): cross-color.o \
146		      $(REVOLUTION_LIBS)
147
148$(FULLBIN_ROOT)/dimming$(BINSUFFIX): dimming.o \
149		      $(REVOLUTION_LIBS)
150
151$(FULLBIN_ROOT)/moving.regions$(BINSUFFIX): moving.regions.o \
152		      $(REVOLUTION_LIBS)
153
154#################################
155## viewer
156#################################
157$(FULLBIN_ROOT)/viewer_NTSC_INT$(BINSUFFIX): viewer_NTSC_INT.o bmp.o\
158              $(REVOLUTION_LIBS)
159$(FULLBINOBJ_ROOT)/viewer_NTSC_INT.o: src/viewer.c
160	$(CC) -DNTSC $(CCFLAGS) $(INCLUDES) $(COMPILE) $< \
161		-o $(subst $(FULLBINOBJ_ROOT)/,$(BINOBJ_ROOT)/,$@)
162
163$(FULLBIN_ROOT)/viewer_NTSC_DS$(BINSUFFIX): viewer_NTSC_DS.o bmp.o\
164              $(REVOLUTION_LIBS)
165$(FULLBINOBJ_ROOT)/viewer_NTSC_DS.o: src/viewer.c
166	$(CC) -DNTSC -DNON_INTERLACE $(CCFLAGS) $(INCLUDES) $(COMPILE) $< \
167		-o $(subst $(FULLBINOBJ_ROOT)/,$(BINOBJ_ROOT)/,$@)
168
169$(FULLBIN_ROOT)/viewer_PAL_INT$(BINSUFFIX): viewer_PAL_INT.o bmp.o\
170              $(REVOLUTION_LIBS)
171$(FULLBINOBJ_ROOT)/viewer_PAL_INT.o: src/viewer.c
172	$(CC) -DPAL $(CCFLAGS) $(INCLUDES) $(COMPILE) $< \
173		-o $(subst $(FULLBINOBJ_ROOT)/,$(BINOBJ_ROOT)/,$@)
174
175$(FULLBIN_ROOT)/viewer_PAL_DS$(BINSUFFIX): viewer_PAL_DS.o bmp.o\
176              $(REVOLUTION_LIBS)
177$(FULLBINOBJ_ROOT)/viewer_PAL_DS.o: src/viewer.c
178	$(CC) -DPAL -DNON_INTERLACE $(CCFLAGS) $(INCLUDES) $(COMPILE) $< \
179		-o $(subst $(FULLBINOBJ_ROOT)/,$(BINOBJ_ROOT)/,$@)
180
181