1############################################################################### 2# Makefile for shareddemo 3# 4# Copyright (C) 2006-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############################################################################### 13 14# All modules have "setup" and "build" as targets. System libraries 15# and demo programs also have an "install" target that copies the compiled 16# binaries to the binary tree (/$(ARCH_TARGET)). 17 18all: setup build install 19 20# commondefs must be included near the top so that all common variables 21# will be defined before their use. 22 23include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs 24 25# module name should be set to the name of this subdirectory 26# DEMO = TRUE indicates that this module resides under the "demos" subtree. 27# The list of selectable paths can be found in modulerules. 28 29MODULENAME = hbmdemo/shareddemo 30DEMO = TRUE 31 32 33# CSRCS lists all C files that should be built 34# The makefile determines which objects are linked into which binaries 35# based on the dependencies you fill in at the bottom of this file 36 37CPPSRCS = shared.cpp 38 39# BINNAMES lists all binaries that will be linked. Note that no suffix is 40# required, as that will depend on whether this is a DEBUG build or not. 41# The final name of the binaries will be $(BINNAME)$(BINSUFFIX) 42 43ifdef LANG_CHN 44BINNAMES = shareddemo_chn 45CCFLAGS += -DLANG_CHN 46else 47ifdef LANG_KOR 48BINNAMES = shareddemo_kor 49CCFLAGS += -DLANG_KOR 50else 51BINNAMES = shareddemo 52endif 53endif 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# modulerules contains the rules that will use the above variables 61# and dependencies below to construct the binaries specified. 62 63include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules 64 65# Dependencies for the binaries listed in BINNAMES should come here 66# They are your typical makefile rule, with extra variables to ensure 67# that the names and paths match up. 68# $(FULLBIN_ROOT) is the location of the local bin directory 69# $(BINSUFFIX) depends on whether this is a debug build or not 70# $(REVOLUTION_LIBS) includes all the Revolution libraries. 71 72REVOLUTION_LIBS += $(INSTALL_ROOT)/lib/homebuttonLib$(LIBSUFFIX) 73REVOLUTION_LIBS += $(INSTALL_ROOT)/lib/tpl$(LIBSUFFIX) 74REVOLUTION_LIBS += $(INSTALL_ROOT)/lib/cnt$(LIBSUFFIX) 75 76$(TARGET_BINS): $(CPPSRCS:.cpp=.o) 77$(TARGET_BINS): $(REVOLUTION_LIBS) 78 79ifndef NANDAPP 80dobuild: $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX) 81 @echo "================================== Warning!! ==================================" 82 @echo "This App was compiled for DISC app. When you operate the sample of the DISC version," 83 @echo "please thaw and perform to DvdRoot which specifies attached content_data.zip." 84 @echo "===============================================================================" 85else 86CCFLAGS += -DNANDAPP 87dobuild: $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX) 88endif 89 90demo: $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX) 91 makedol -f $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX) -d $(FULLBIN_ROOT)/$(BINNAMES)$(DOLSUFFIX) 92ifdef LANG_CHN 93 makeWad -n $(BINNAMES)$(ASUFFIX) -l $(FULLBIN_ROOT)/$(BINNAMES)$(DOLSUFFIX),HomeButtonCHN.arc,HomebuttonSe.arc,sample.arc -T 0,1,1,0 94else 95ifdef LANG_KOR 96 makeWad -n $(BINNAMES)$(ASUFFIX) -l $(FULLBIN_ROOT)/$(BINNAMES)$(DOLSUFFIX),HomeButtonKOR.arc,HomebuttonSe.arc,sample.arc -T 0,1,1,0 97else 98 makeWad -n $(BINNAMES)$(ASUFFIX) -l $(FULLBIN_ROOT)/$(BINNAMES)$(DOLSUFFIX),Homebutton.arc,HomebuttonSe.arc,sample.arc -T 0,1,1,0 99endif 100endif 101 mv $(BINNAMES)$(WADSUFFIX) $(REVOLUTION_SDK_ROOT)/dvddata/viewer 102 rm $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX) 103 @echo "================================== Warning!! ==================================" 104 @echo "The created WAD file was moved to RVL_SDK/dvddata/viewer." 105 @echo "When you want to install (or run) it, please use the Nmenu.elf." 106 @echo "" 107 @echo "If WAD file does not work correctly, you may be not calling" 108 @echo "the command line [ make; make clean ] beforehand." 109 @echo "===============================================================================" 110#======== End of makefile ========# 111