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