############################################################################### # Makefile for GX demos # # Copyright 1998-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. # ############################################################################### ################################## # QUICK START INSTRUCTIONS # Type "make" at /dolphin/build/tests/gx to build DEBUG versions of all tests. # Type "make NDEBUG=TRUE" to build OPTIMIZED versions of all tests # Type "make lit-basicD.bin" to build DEBUG version of just lit-basic # Type "make NDEBUG=TRUE lit-basic.bin" to build OPTIMIZED version of # just lit-basic # # To add another test # 1. add the .c files to CSRCS to make sure they are built # 2. add the binary name (no suffix) to BINNAMES # 3. add a dependency rule for this executable at the bottom of this file ################################## # 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. all: setup build install # 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 = gxdemo 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) G2D_LIB = $(INSTALL_ROOT)/lib/G2D$(LIBSUFFIX) # 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 = \ Culling/cul-faces.c Culling/cul-viewport.c \ \ DisplayList/DL-geom.c DisplayList/DL-tex.c \ DisplayList/DL-tf-mtx.c \ \ Framebuffer/frb-bound-box.c \ Framebuffer/frb-copy.c \ Framebuffer/frb-fld-dbs.c \ Framebuffer/frb-fld-dbs-aa.c \ Framebuffer/frb-fld-int.c \ Framebuffer/frb-fld-int-aa.c \ Framebuffer/frb-aa-full.c \ Framebuffer/frb-zcopy.c \ Framebuffer/frb-gamma.c \ Framebuffer/frb-vfilter.c \ \ G2D/G2D-test.c G2D/G2D-testEditor.c \ G2D/G2D-testPhy.c G2D/G2D-testLevel1.c \ \ Geometry/geo-particle.c \ Geometry/geo-vtx-fmt.c Geometry/geo-vtx-fmtPrim.c \ \ Indirect/ind-bump-st.c Indirect/ind-bump-xyz.c \ Indirect/ind-tile-data.c Indirect/ind-tile-test.c \ Indirect/ind-pseudo-3d.c Indirect/ind-warp.c \ \ Lighting/lit-basic.c Lighting/lit-multi.c \ Lighting/lit-alpha.c Lighting/lit-spot.c \ Lighting/lit-dist-atn.c Lighting/lit-unclamp.c \ Lighting/lit-cartoon.c Lighting/lit-texture.c \ Lighting/lit-tx-alpha.c Lighting/lit-prelit.c \ Lighting/lit-atn-func.c Lighting/lit-specular.c \ \ Performance/perf-fill.c \ Performance/perf-geo.c \ Performance/perf-sync.c \ \ PixelProc/cmn-model.c PixelProc/pix-fog.c \ PixelProc/pix-blend.c PixelProc/pix-logic.c \ PixelProc/pix-z-comp.c PixelProc/pix-a-comp.c \ PixelProc/pix-sub.c \ \ Simple/smp-onetri.c Simple/smp-onetri_dl.c \ Simple/smp-toy-draw.c \ Simple/smp-toy-anim.c Simple/smp-toy-stick.c \ Simple/smp-texexample.c Simple/smp-octa.c \ Simple/smp-light.c \ \ Tev/tev-one-op.c Tev/tev-multi.c \ Tev/tev-complex.c Tev/tev-outline.c \ Tev/tev-ztex.c Tev/tev-swap.c \ \ TexGen/tg-basic.c TexGen/tg-project.c \ TexGen/tg-emboss.c TexGen/tg-shadow.c \ TexGen/tg-shadow2.c TexGen/tg-shadow3.c \ TexGen/tg-light-fx.c TexGen/tg-dual.c \ TexGen/spheremap.c TexGen/tg-spheremap.c \ TexGen/parabolicmap.c TexGen/tg-parabolicmap.c \ TexGen/tg-clr-persp.c \ \ Texture/tex-fmt-cube.c Texture/tex-fmt-cubeData.c \ Texture/tex-filter.c Texture/tex-fmt-tpl.c \ Texture/tex-wrap.c Texture/tex-tlut.c \ Texture/tex-tlutData.c Texture/tex-layer.c \ Texture/tex-2-tex.c Texture/tex-tc-alloc.c \ Texture/tex-preload.c Texture/tex-mix-mode.c \ Texture/tex-invalid.c Texture/tex-lod.c \ Texture/tex-tlut32.c \ \ Transform/tf-pn-mtx.c Transform/tf-stitch.c \ Transform/tf-tg-mtx.c Transform/tf-mirror.c \ Transform/tf-reflect.c Transform/tf-clip-bug.c \ \ Management/mgt-single-buf.c \ Management/mgt-triple-buf.c \ Management/mgt-fifo-brkpt.c \ Management/mgt-fifo-dual.c # 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 = \ cul-faces cul-viewport \ \ DL-geom DL-tex DL-tf-mtx \ \ frb-bound-box frb-copy \ frb-fld-dbs frb-fld-dbs-aa frb-fld-int frb-fld-int-aa \ frb-aa-full frb-zcopy frb-gamma frb-vfilter \ \ G2D-test \ \ geo-particle geo-vtx-fmt \ \ ind-bump-st ind-bump-xyz ind-tile-test ind-pseudo-3d \ ind-warp \ \ lit-basic lit-multi lit-alpha lit-spot \ lit-dist-atn lit-unclamp lit-cartoon lit-texture \ lit-tx-alpha lit-prelit lit-atn-func lit-specular \ \ perf-fill perf-geo perf-sync \ \ pix-fog pix-sub \ pix-blend pix-logic pix-z-comp pix-a-comp \ \ smp-onetri smp-onetri_dl smp-toy \ smp-texexample smp-octa smp-light \ \ tev-one-op tev-multi tev-complex \ tev-outline tev-ztex tev-swap \ \ tg-basic tg-project tg-emboss tg-shadow \ tg-shadow2 tg-shadow3 tg-light-fx tg-dual \ tg-spheremap tg-parabolicmap tg-clr-persp \ \ tex-fmt-cube tex-filter tex-fmt-tpl tex-wrap \ tex-tlut tex-layer tex-2-tex tex-tc-alloc \ tex-preload tex-mix-mode tex-invalid tex-lod \ tex-tlut32 \ \ tf-pn-mtx tf-stitch tf-tg-mtx tf-mirror \ tf-reflect tf-clip-bug \ \ mgt-single-buf mgt-triple-buf mgt-fifo-brkpt mgt-fifo-dual # defining a linker command file will have the build system generate it # automatically and include it on the linker invocation line LCF_FILE = $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf # Use MEM library for memory allocation (DEMO library setting) CCFLAGS += -DDEMO_USE_MEMLIB 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)/cul-faces$(BINSUFFIX): Culling/cul-faces.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/cul-viewport$(BINSUFFIX): Culling/cul-viewport.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/DL-geom$(BINSUFFIX): DisplayList/DL-geom.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/DL-tex$(BINSUFFIX): DisplayList/DL-tex.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/DL-tf-mtx$(BINSUFFIX): DisplayList/DL-tf-mtx.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/frb-copy$(BINSUFFIX): Framebuffer/frb-copy.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/frb-zcopy$(BINSUFFIX): Framebuffer/frb-zcopy.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/frb-fld-int$(BINSUFFIX): Framebuffer/frb-fld-int.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/frb-fld-dbs$(BINSUFFIX): Framebuffer/frb-fld-dbs.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/frb-fld-int-aa$(BINSUFFIX): Framebuffer/frb-fld-int-aa.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/frb-fld-dbs-aa$(BINSUFFIX): Framebuffer/frb-fld-dbs-aa.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/frb-aa-full$(BINSUFFIX): Framebuffer/frb-aa-full.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/frb-bound-box$(BINSUFFIX): Framebuffer/frb-bound-box.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/frb-gamma$(BINSUFFIX): Framebuffer/frb-gamma.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/frb-vfilter$(BINSUFFIX): Framebuffer/frb-vfilter.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/G2D-test$(BINSUFFIX): G2D/G2D-test.o \ G2D/G2D-testPhy.o \ G2D/G2D-testLevel1.o \ G2D/G2D-testEditor.o \ $(G2D_LIB) \ $(REVOLUTION_LIBS) \ $(TPL_LIB) $(FULLBIN_ROOT)/geo-particle$(BINSUFFIX): Geometry/geo-particle.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/geo-vtx-fmt$(BINSUFFIX): Geometry/geo-vtx-fmt.o \ Geometry/geo-vtx-fmtPrim.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/ind-bump-st$(BINSUFFIX): Indirect/ind-bump-st.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/ind-bump-xyz$(BINSUFFIX): Indirect/ind-bump-xyz.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/ind-tile-test$(BINSUFFIX): Indirect/ind-tile-test.o Indirect/ind-tile-data.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/ind-pseudo-3d$(BINSUFFIX): Indirect/ind-pseudo-3d.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/ind-warp$(BINSUFFIX): Indirect/ind-warp.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/lit-basic$(BINSUFFIX): Lighting/lit-basic.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/lit-multi$(BINSUFFIX): Lighting/lit-multi.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/lit-alpha$(BINSUFFIX): Lighting/lit-alpha.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/lit-spot$(BINSUFFIX): Lighting/lit-spot.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/lit-dist-atn$(BINSUFFIX): Lighting/lit-dist-atn.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/lit-unclamp$(BINSUFFIX): Lighting/lit-unclamp.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/lit-cartoon$(BINSUFFIX): Lighting/lit-cartoon.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/lit-texture$(BINSUFFIX): Lighting/lit-texture.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/lit-tx-alpha$(BINSUFFIX): Lighting/lit-tx-alpha.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/lit-prelit$(BINSUFFIX): Lighting/lit-prelit.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/lit-atn-func$(BINSUFFIX): Lighting/lit-atn-func.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/lit-specular$(BINSUFFIX): Lighting/lit-specular.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/perf-fill$(BINSUFFIX): Performance/perf-fill.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/perf-sync$(BINSUFFIX): Performance/perf-sync.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/perf-geo$(BINSUFFIX): Performance/perf-geo.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/pix-fog$(BINSUFFIX): PixelProc/pix-fog.o \ PixelProc/cmn-model.o $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/pix-blend$(BINSUFFIX): PixelProc/pix-blend.o \ PixelProc/cmn-model.o $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/pix-logic$(BINSUFFIX): PixelProc/pix-logic.o \ PixelProc/cmn-model.o $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/pix-z-comp$(BINSUFFIX): PixelProc/pix-z-comp.o \ PixelProc/cmn-model.o $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/pix-a-comp$(BINSUFFIX): PixelProc/pix-a-comp.o \ PixelProc/cmn-model.o $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/pix-sub$(BINSUFFIX): PixelProc/pix-sub.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/smp-onetri$(BINSUFFIX): Simple/smp-onetri.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/smp-onetri_dl$(BINSUFFIX): Simple/smp-onetri_dl.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/smp-toy$(BINSUFFIX): Simple/smp-toy-draw.o \ Simple/smp-toy-anim.o Simple/smp-toy-stick.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/smp-texexample$(BINSUFFIX): Simple/smp-texexample.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/smp-octa$(BINSUFFIX): Simple/smp-octa.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/smp-light$(BINSUFFIX): Simple/smp-light.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tev-one-op$(BINSUFFIX): Tev/tev-one-op.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tev-swap$(BINSUFFIX): Tev/tev-swap.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tev-multi$(BINSUFFIX): Tev/tev-multi.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tev-complex$(BINSUFFIX): Tev/tev-complex.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tev-outline$(BINSUFFIX): Tev/tev-outline.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tev-ztex$(BINSUFFIX): Tev/tev-ztex.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tg-basic$(BINSUFFIX): TexGen/tg-basic.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tg-project$(BINSUFFIX): TexGen/tg-project.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tg-emboss$(BINSUFFIX): TexGen/tg-emboss.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tg-shadow$(BINSUFFIX): TexGen/tg-shadow.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tg-shadow2$(BINSUFFIX): TexGen/tg-shadow2.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tg-shadow3$(BINSUFFIX): TexGen/tg-shadow3.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tg-spheremap$(BINSUFFIX): TexGen/tg-spheremap.o \ TexGen/spheremap.o $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tg-parabolicmap$(BINSUFFIX): TexGen/tg-parabolicmap.o \ TexGen/parabolicmap.o $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tg-light-fx$(BINSUFFIX): TexGen/tg-light-fx.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tg-dual$(BINSUFFIX): TexGen/tg-dual.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tg-clr-persp$(BINSUFFIX): TexGen/tg-clr-persp.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-fmt-cube$(BINSUFFIX): Texture/tex-fmt-cube.o \ Texture/tex-fmt-cubeData.o $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tex-filter$(BINSUFFIX): Texture/tex-filter.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-fmt-tpl$(BINSUFFIX): Texture/tex-fmt-tpl.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-wrap$(BINSUFFIX): Texture/tex-wrap.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-tlut$(BINSUFFIX): Texture/tex-tlut.o \ Texture/tex-tlutData.o $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tex-tlut32$(BINSUFFIX): Texture/tex-tlut32.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tex-layer$(BINSUFFIX): Texture/tex-layer.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-2-tex$(BINSUFFIX): Texture/tex-2-tex.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-tc-alloc$(BINSUFFIX): Texture/tex-tc-alloc.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-preload$(BINSUFFIX): Texture/tex-preload.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-mix-mode$(BINSUFFIX): Texture/tex-mix-mode.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-invalid$(BINSUFFIX): Texture/tex-invalid.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tex-lod$(BINSUFFIX): Texture/tex-lod.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tf-pn-mtx$(BINSUFFIX): Transform/tf-pn-mtx.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tf-stitch$(BINSUFFIX): Transform/tf-stitch.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/tf-tg-mtx$(BINSUFFIX): Transform/tf-tg-mtx.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tf-mirror$(BINSUFFIX): Transform/tf-mirror.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tf-reflect$(BINSUFFIX): Transform/tf-reflect.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/tf-clip-bug$(BINSUFFIX): Transform/tf-clip-bug.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/mgt-single-buf$(BINSUFFIX): Management/mgt-single-buf.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/mgt-triple-buf$(BINSUFFIX): Management/mgt-triple-buf.o \ $(REVOLUTION_LIBS) $(FULLBIN_ROOT)/mgt-fifo-brkpt$(BINSUFFIX): Management/mgt-fifo-brkpt.o \ $(REVOLUTION_LIBS) $(TPL_LIB) $(FULLBIN_ROOT)/mgt-fifo-dual$(BINSUFFIX): Management/mgt-fifo-dual.o \ $(REVOLUTION_LIBS) #======== End of makefile ========#