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