1############################################################################### 2# Makefile for darch demo 3# 4# Copyright 2008 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.1 2008/05/12 07:41:30 nakano_yoshinobu 14# Initial version. 15# 16# 17# $NoKeywords: $ 18# 19############################################################################### 20# All modules have "setup" and "build" as targets. System libraries 21# and demo programs also have an "install" target that copies the compiled 22# binaries to the binary tree (/$(ARCH_TARGET)). 23 24all: setup build install 25 26 27# commondefs must be included near the top so that all common variables 28# will be defined before their use. 29 30include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs 31 32 33# module name should be set to the name of this subdirectory 34# DEMO = TRUE indicates that this module resides under the "demos" subtree. 35# The list of selectable paths can be found in modulerules. 36 37MODULENAME = darchdemo 38DEMO = TRUE 39 40 41# CSRCS lists all C files that should be built 42# The makefile determines which objects are linked into which binaries 43# based on the dependencies you fill in at the bottom of this file 44 45CSRCS = darchdemo.c 46 47 48# BINNAMES lists all binaries that will be linked. Note that no suffix is 49# required, as that will depend on whether this is a DEBUG build or not. 50# The final name of the binaries will be $(BINNAME)$(BINSUFFIX) 51 52BINNAMES = darchdemo 53 54 55# defining a linker command file will have the build system generate it 56# automatically and include it on the linker invocation line 57 58LCF_FILE = $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf 59 60 61# modulerules contains the rules that will use the above variables 62# and dependencies below to construct the binaries specified. 63 64include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules 65 66 67# Dependencies for the binaries listed in BINNAMES should come here 68# They are your typical makefile rule, with extra variables to ensure 69# that the names and paths match up. 70# $(FULLBIN_ROOT) is the location of the local bin directory 71# $(BINSUFFIX) depends on whether this is a debug build or not 72# $(REVOLUTION_LIBS) includes all the Dolphin libraries. 73 74$(FULLBIN_ROOT)/darchdemo$(BINSUFFIX): darchdemo.o \ 75 $(INSTALL_ROOT)/lib/darch$(LIBSUFFIX) \ 76 $(REVOLUTION_LIBS) 77 78dvdroot: 79 rm -rf dvddata 80 mkdir dvddata 81 cp -R $(REVOLUTION_SDK_ROOT)/dvddata/nanddemo dvddata/ 82 cp -R $(REVOLUTION_SDK_ROOT)/dvddata/pictures dvddata/ 83 rm -rf dvddata/*/CVS dvddata/*/Thumbs.db 84 cd dvddata;darchD -c nanddemo pictures darchtest.arc 85 86run: 87 make $(FULLBIN_ROOT)/darchdemo$(BINSUFFIX) 88 make dvdroot 89 cp darchdemo.ddf $(FULLBIN_ROOT)/$(subst elf,ddf,darchdemo$(BINSUFFIX)) 90 ndrun $(FULLBIN_ROOT)/darchdemo$(BINSUFFIX) 91 92#======== End of makefile ========# 93