1############################################################################### 2# Makefile for GD demos 3# 4# Copyright 2006 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.4 2008/09/05 09:41:03 nrs_buildsystem 14# Changed all command to adopt "make -j option(parallel processing)" (by yasuh-to). 15# 16# Revision 1.3 2006/03/02 00:19:08 mitu 17# added chmod before excution of script. 18# 19# Revision 1.2 2006/02/09 01:19:49 hirose 20# Added link path to TPL library. 21# 22# Revision 1.1 2006/02/08 11:20:08 mitu 23# 1st version. 24# 25# $NoKeywords: $ 26# 27############################################################################### 28 29# All modules have "setup" and "build" as targets. System libraries 30# and demo programs also have an "install" target that copies the compiled 31# binaries to the binary tree (/dolphin/$(ARCH_TARGET)). 32# tests are NOT installed into the binary release directory. 33 34ifdef X86 35#build host library 36all: 37 $(MAKE) buildhost 38clean: cleanhost 39else 40# build and install library for GC hardware 41all: 42 $(MAKE) setup 43 $(MAKE) build 44 $(MAKE) install 45endif 46 47ifdef X86 48buildhost: 49 @chmod u+x buildhostscript 50 @echo =========== Build host demos ============== 51 @./buildhostscript 52 @echo =========================================== 53 54cleanhost: 55 @chmod u+x buildhostscript 56 @echo =========== Clean up host demos =========== 57 @./buildhostscript /CLEAN 58 @echo =========================================== 59endif 60 61# module name should be set to the name of this subdirectory 62# DEMO = TRUE indicates that this module resides under the "demos" subtree. 63# The list of selectable paths can be found in modulerules. 64MODULENAME = gddemo 65DEMO = TRUE 66 67# commondefs must be included near the top so that all common variables 68# will be defined before their use. 69include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs 70 71# additional libraries not defined as REVOLUTION_LIBS 72TPL_LIB = $(INSTALL_ROOT)/lib/tpl$(LIBSUFFIX) 73 74# common sources built for both EPPC and MAC 75# CSRCS lists all C files that should be built 76# The makefile determines which objects are linked into which binaries 77# based on the dependencies you fill in at the bottom of this file 78CSRCS = \ 79 gd-texture-gc.c \ 80 gd-texture-gc-load.c \ 81 gd-texture-create.c \ 82 \ 83 gd-matrix-gc.c \ 84 gd-matrix-gc-load.c \ 85 gd-matrix-create.c \ 86 \ 87 gd-light-gc.c \ 88 gd-light-gc-load.c \ 89 gd-light-create.c \ 90 \ 91 gd-tev-gc.c \ 92 gd-tev-gc-load.c \ 93 gd-tev-create.c \ 94 \ 95 gd-indtex-gc.c \ 96 gd-indtex-gc-load.c \ 97 gd-indtex-create.c \ 98 \ 99 gd-init-gc.c \ 100 gd-init-gc-load.c \ 101 gd-init-create.c 102 103# common binaries linked for both EPPC and MAC 104# BINNAMES lists all binaries that will be linked. Note that no suffix is 105# required, as that will depend on whether this is a DEBUG build or not. 106# The final name of the binaries will be $(BINNAME)$(BINSUFFIX) 107BINNAMES = \ 108 gd-texture-gc-load \ 109 gd-texture-gc-create \ 110 gd-matrix-gc-load \ 111 gd-matrix-gc-create \ 112 gd-light-gc-load \ 113 gd-light-gc-create \ 114 gd-tev-gc-load \ 115 gd-tev-gc-create \ 116 gd-indtex-gc-load \ 117 gd-indtex-gc-create \ 118 gd-init-gc-load \ 119 gd-init-gc-create 120 121ifdef EPPC 122LCF_FILE = $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf 123endif 124 125ifdef WALL 126CCFLAGS += -w all 127endif 128 129# modulerules contains the rules that will use the above variables 130# and dependencies below to construct the binaries specified. 131include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules 132 133# Dependencies for the binaries listed in BINNAMES should come here 134# They are your typical makefile rule, with extra variables to ensure 135# that the names and paths match up. 136# $(FULLBIN_ROOT) is the location of the local bin directory 137# $(BINSUFFIX) depends on whether this is a debug build or not 138# $(REVOLUTION_LIBS) includes all the Dolphin libraries. 139$(FULLBIN_ROOT)/gd-texture-gc-load$(BINSUFFIX): \ 140 gd-texture-gc-load.o \ 141 $(REVOLUTION_LIBS) $(TPL_LIB) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 142 143$(FULLBIN_ROOT)/gd-texture-gc-create$(BINSUFFIX): \ 144 gd-texture-gc.o gd-texture-create.o \ 145 $(REVOLUTION_LIBS) $(TPL_LIB) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 146 147$(FULLBIN_ROOT)/gd-matrix-gc-load$(BINSUFFIX): \ 148 gd-matrix-gc-load.o \ 149 $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 150 151$(FULLBIN_ROOT)/gd-matrix-gc-create$(BINSUFFIX): \ 152 gd-matrix-gc.o gd-matrix-create.o \ 153 $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 154 155$(FULLBIN_ROOT)/gd-light-gc-load$(BINSUFFIX): \ 156 gd-light-gc-load.o \ 157 $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 158 159$(FULLBIN_ROOT)/gd-light-gc-create$(BINSUFFIX): \ 160 gd-light-gc.o gd-light-create.o \ 161 $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 162 163$(FULLBIN_ROOT)/gd-tev-gc-load$(BINSUFFIX): \ 164 gd-tev-gc-load.o \ 165 $(REVOLUTION_LIBS) $(TPL_LIB) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 166 167$(FULLBIN_ROOT)/gd-tev-gc-create$(BINSUFFIX): \ 168 gd-tev-gc.o gd-tev-create.o \ 169 $(REVOLUTION_LIBS) $(TPL_LIB) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 170 171$(FULLBIN_ROOT)/gd-indtex-gc-load$(BINSUFFIX): \ 172 gd-indtex-gc-load.o \ 173 $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 174 175$(FULLBIN_ROOT)/gd-indtex-gc-create$(BINSUFFIX): \ 176 gd-indtex-gc.o gd-indtex-create.o \ 177 $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 178 179$(FULLBIN_ROOT)/gd-init-gc-load$(BINSUFFIX): \ 180 gd-init-gc-load.o \ 181 $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 182 183$(FULLBIN_ROOT)/gd-init-gc-create$(BINSUFFIX): \ 184 gd-init-gc.o gd-init-create.o \ 185 $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) 186 187#======== End of makefile ========# 188