1###############################################################################
2# Makefile for netdemo
3#
4# Copyright 2006, 2007 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.7  2007/09/06 13:00:00  seiki_masashi
14# Added a demo that runs SOStartup and SOCleanup in a different thread.
15#
16# Revision 1.6  2007/05/14 11:37:17  hatamoto_minoru
17# Made "all" only dependent on "install" to support "make -j".
18#
19# Revision 1.5  2007/01/31 02:58:06  okubata_ryoma
20# Moved from ncdmiscdemo in the macaddr demo
21#
22# Revision 1.4  2006/10/27 08:03:04  yosizaki
23# Added crypto demo.
24#
25# Revision 1.3  2006/08/28 05:44:36  seiki_masashi
26# Changed for NET library demo
27#
28# Revision 1.2  2006/08/22 12:52:43  terui
29# Revised so that multiple demos can be built simultaneously.
30# Added tcpEchoClient and pingClient.
31#
32# Revision 1.1  2006/08/08 10:47:28  adachi_hiroaki
33# Moved the network initialization demo from tests/so.
34#
35# $NoKeywords: $
36#
37###############################################################################
38
39# All modules have "setup" and "build" as targets.  System libraries
40# and demo programs also have an "install" target that copies the compiled
41# binaries to the binary tree (/$(ARCH_TARGET)).
42
43all:    install
44
45# commondefs must be included near the top so that all common variables
46# will be defined before their use.
47
48include $(REVOLUTION_EXT_ROOT)/build/buildtools/commondefs
49include $(REVOLUTION_EXT_ROOT)/build/demos/share/commondefs.demoshare
50
51# additional libraries not defined as REVOLUTION_LIBS
52
53# module name should be set to the name of this subdirectory
54# DEMO = TRUE indicates that this module resides under the "demos" subtree.
55# The list of selectable paths can be found in modulerules.
56
57MODULENAME  =   netdemo
58DEMO        =   TRUE
59REX_NETDEMO =   TRUE
60
61
62# CSRCS lists all C files that should be built
63# The makefile determines which objects are linked into which binaries
64# based on the dependencies you fill in at the bottom of this file
65
66CSRCS       =   digest.c crypto.c macaddr.c sostartup.c \
67
68# BINNAMES lists all binaries that will be linked.  Note that no suffix is
69# required, as that will depend on whether this is a DEBUG build or not.
70# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
71
72BINNAMES    =   digest crypto macaddr sostartup \
73
74#REX_LIBNAMES+=
75
76# defining a linker command file will have the build system generate it
77# automatically and include it on the linker invocation line
78
79LCF_FILE    = $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
80
81
82# Modulerules contains the rules that will use the above variables
83# and dependencies below to construct the binaries specified.
84
85include $(REVOLUTION_EXT_ROOT)/build/buildtools/modulerules
86include $(REVOLUTION_EXT_ROOT)/build/demos/share/modulerules.demoshare
87
88
89# Dependencies for the binaries listed in BINNAMES should come here
90# They are your typical makefile rule, with extra variables to ensure
91# that the names and paths match up.
92# $(FULLBIN_ROOT) is the location of the local bin directory
93# $(BINSUFFIX) depends on whether this is a debug build or not
94# $(REVOLUTION_LIBS) includes all the Revolution libraries.
95
96$(FULLBIN_ROOT)/digest$(BINSUFFIX): digest.o \
97    $(REVOLUTION_LIBS) $(REX_LIBS)
98
99$(FULLBIN_ROOT)/crypto$(BINSUFFIX): crypto.o \
100    $(REVOLUTION_LIBS) $(REX_LIBS)
101
102$(FULLBIN_ROOT)/macaddr$(BINSUFFIX): macaddr.o \
103    $(REVOLUTION_LIBS) $(REX_LIBS)
104
105$(FULLBIN_ROOT)/sostartup$(BINSUFFIX): sostartup.o $(REX_DEMOSHARE_OBJS) \
106    $(REVOLUTION_LIBS) $(REX_LIBS)
107
108#======== End of makefile ========#
109