1###############################################################################
2# Makefile for networkmanual_tpl
3#
4# Copyright (C) 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/networkmanual_tpl
30DEMO        = TRUE
31
32CCFLAGS += -DUSE_FOR_NETWORKMANUAL
33
34# CSRCS lists all C files that should be built
35# The makefile determines which objects are linked into which binaries
36# based on the dependencies you fill in at the bottom of this file
37
38CPPSRCS     = networkmanual_tpl.cpp
39
40# BINNAMES lists all binaries that will be linked.  Note that no suffix is
41# required, as that will depend on whether this is a DEBUG build or not.
42# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
43
44BINNAMES    = networkmanual_tpl
45
46# defining a linker command file will have the build system generate it
47# automatically and include it on the linker invocation line
48
49LCF_FILE    = $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
50
51
52# modulerules contains the rules that will use the above variables
53# and dependencies below to construct the binaries specified.
54
55include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
56
57
58# Dependencies for the binaries listed in BINNAMES should come here
59# They are your typical makefile rule, with extra variables to ensure
60# that the names and paths match up.
61# $(FULLBIN_ROOT) is the location of the local bin directory
62# $(BINSUFFIX) depends on whether this is a debug build or not
63# $(REVOLUTION_LIBS) includes all the Revolution libraries.
64
65REVOLUTION_LIBS += $(INSTALL_ROOT)/lib/homebuttonLib.nwm$(LIBSUFFIX)
66REVOLUTION_LIBS += $(INSTALL_ROOT)/lib/tpl$(LIBSUFFIX)
67REVOLUTION_LIBS += $(INSTALL_ROOT)/lib/cnt$(LIBSUFFIX)
68
69$(TARGET_BINS): $(CPPSRCS:.cpp=.o)
70$(TARGET_BINS): $(REVOLUTION_LIBS)
71
72ifndef NANDAPP
73dobuild: $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX)
74	@echo "================================== Warning!! =================================="
75	@echo "This App was compiled for DISC app. When you operate the sample of the DISC version,"
76	@echo "please thaw and perform to DvdRoot which specifies attached content_data.zip."
77	@echo "==============================================================================="
78else
79dobuild: $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX)
80endif
81
82demo: $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX)
83	makedol -f $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX) -d $(FULLBIN_ROOT)/networkmanual_tpl$(DOLSUFFIX)
84#	makeWad -n $(BINNAMES)$(ASUFFIX) -l $(FULLBIN_ROOT)/$(BINNAMES)$(DOLSUFFIX),Homebutton.arc,HomebuttonSe.arc,HomeButton_nwm.arc,sample.arc -T 0,1,1,1,0
85	makeWad -n $(BINNAMES)$(ASUFFIX) -l $(FULLBIN_ROOT)/$(BINNAMES)$(DOLSUFFIX),Homebutton.arc,HomebuttonSe.arc,HomeButton_nwm.arc,sample.arc -T 0,0,0,0,0
86	mv $(BINNAMES)$(WADSUFFIX) $(REVOLUTION_SDK_ROOT)/dvddata/viewer
87	rm $(FULLBIN_ROOT)/$(BINNAMES)$(BINSUFFIX)
88	@echo "================================== Warning!! =================================="
89	@echo "The created WAD file was moved to RVL_SDK/dvddata/viewer."
90	@echo "When you want to install (or run) it, please use the Nmenu.elf."
91	@echo ""
92	@echo "If WAD file does not work correctly, you may be not calling"
93	@echo "the command line [ make; make clean ] beforehand."
94	@echo "==============================================================================="
95
96#======== End of makefile ========#
97