############################################################################### # Makefile for GD demos # # Copyright 2006 Nintendo. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. # # $Log: makefile,v $ # Revision 1.4 2008/09/05 09:41:03 nrs_buildsystem # Changed all command to adopt "make -j option(parallel processing)" (by yasuh-to). # # Revision 1.3 2006/03/02 00:19:08 mitu # added chmod before excution of script. # # Revision 1.2 2006/02/09 01:19:49 hirose # Added link path to TPL library. # # Revision 1.1 2006/02/08 11:20:08 mitu # 1st version. # # $NoKeywords: $ # ############################################################################### # All modules have "setup" and "build" as targets. System libraries # and demo programs also have an "install" target that copies the compiled # binaries to the binary tree (/dolphin/$(ARCH_TARGET)). # tests are NOT installed into the binary release directory. ifdef X86 #build host library all: $(MAKE) buildhost clean: cleanhost else # build and install library for GC hardware all: $(MAKE) setup $(MAKE) build $(MAKE) install endif ifdef X86 buildhost: @chmod u+x buildhostscript @echo =========== Build host demos ============== @./buildhostscript @echo =========================================== cleanhost: @chmod u+x buildhostscript @echo =========== Clean up host demos =========== @./buildhostscript /CLEAN @echo =========================================== endif # module name should be set to the name of this subdirectory # DEMO = TRUE indicates that this module resides under the "demos" subtree. # The list of selectable paths can be found in modulerules. MODULENAME = gddemo DEMO = TRUE # commondefs must be included near the top so that all common variables # will be defined before their use. include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs # additional libraries not defined as REVOLUTION_LIBS TPL_LIB = $(INSTALL_ROOT)/lib/tpl$(LIBSUFFIX) # common sources built for both EPPC and MAC # CSRCS lists all C files that should be built # The makefile determines which objects are linked into which binaries # based on the dependencies you fill in at the bottom of this file CSRCS = \ gd-texture-gc.c \ gd-texture-gc-load.c \ gd-texture-create.c \ \ gd-matrix-gc.c \ gd-matrix-gc-load.c \ gd-matrix-create.c \ \ gd-light-gc.c \ gd-light-gc-load.c \ gd-light-create.c \ \ gd-tev-gc.c \ gd-tev-gc-load.c \ gd-tev-create.c \ \ gd-indtex-gc.c \ gd-indtex-gc-load.c \ gd-indtex-create.c \ \ gd-init-gc.c \ gd-init-gc-load.c \ gd-init-create.c # common binaries linked for both EPPC and MAC # BINNAMES lists all binaries that will be linked. Note that no suffix is # required, as that will depend on whether this is a DEBUG build or not. # The final name of the binaries will be $(BINNAME)$(BINSUFFIX) BINNAMES = \ gd-texture-gc-load \ gd-texture-gc-create \ gd-matrix-gc-load \ gd-matrix-gc-create \ gd-light-gc-load \ gd-light-gc-create \ gd-tev-gc-load \ gd-tev-gc-create \ gd-indtex-gc-load \ gd-indtex-gc-create \ gd-init-gc-load \ gd-init-gc-create ifdef EPPC LCF_FILE = $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf endif ifdef WALL CCFLAGS += -w all endif # modulerules contains the rules that will use the above variables # and dependencies below to construct the binaries specified. include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules # Dependencies for the binaries listed in BINNAMES should come here # They are your typical makefile rule, with extra variables to ensure # that the names and paths match up. # $(FULLBIN_ROOT) is the location of the local bin directory # $(BINSUFFIX) depends on whether this is a debug build or not # $(REVOLUTION_LIBS) includes all the Dolphin libraries. $(FULLBIN_ROOT)/gd-texture-gc-load$(BINSUFFIX): \ gd-texture-gc-load.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-texture-gc-create$(BINSUFFIX): \ gd-texture-gc.o gd-texture-create.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-matrix-gc-load$(BINSUFFIX): \ gd-matrix-gc-load.o \ $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-matrix-gc-create$(BINSUFFIX): \ gd-matrix-gc.o gd-matrix-create.o \ $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-light-gc-load$(BINSUFFIX): \ gd-light-gc-load.o \ $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-light-gc-create$(BINSUFFIX): \ gd-light-gc.o gd-light-create.o \ $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-tev-gc-load$(BINSUFFIX): \ gd-tev-gc-load.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-tev-gc-create$(BINSUFFIX): \ gd-tev-gc.o gd-tev-create.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-indtex-gc-load$(BINSUFFIX): \ gd-indtex-gc-load.o \ $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-indtex-gc-create$(BINSUFFIX): \ gd-indtex-gc.o gd-indtex-create.o \ $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-init-gc-load$(BINSUFFIX): \ gd-init-gc-load.o \ $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) $(FULLBIN_ROOT)/gd-init-gc-create$(BINSUFFIX): \ gd-init-gc.o gd-init-create.o \ $(REVOLUTION_LIBS) $(INSTALL_ROOT)/lib/gd$(LIBSUFFIX) #======== End of makefile ========#