###############################################################################
# Makefile for netdemo
#
# Copyright 2006, 2007 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.
#
# $Log: makefile,v $
# Revision 1.7  2007/09/06 13:00:00  seiki_masashi
# Added a demo that runs SOStartup and SOCleanup in a different thread.
#
# Revision 1.6  2007/05/14 11:37:17  hatamoto_minoru
# Made "all" only dependent on "install" to support "make -j".
#
# Revision 1.5  2007/01/31 02:58:06  okubata_ryoma
# Moved from ncdmiscdemo in the macaddr demo
#
# Revision 1.4  2006/10/27 08:03:04  yosizaki
# Added crypto demo.
#
# Revision 1.3  2006/08/28 05:44:36  seiki_masashi
# Changed for NET library demo
#
# Revision 1.2  2006/08/22 12:52:43  terui
# Revised so that multiple demos can be built simultaneously.
# Added tcpEchoClient and pingClient.
#
# Revision 1.1  2006/08/08 10:47:28  adachi_hiroaki
# Moved the network initialization demo from tests/so.
#
# $NoKeywords: $
#
###############################################################################

# 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 (/$(ARCH_TARGET)).

all:    install

# commondefs must be included near the top so that all common variables
# will be defined before their use.

include $(REVOLUTION_EXT_ROOT)/build/buildtools/commondefs
include $(REVOLUTION_EXT_ROOT)/build/demos/share/commondefs.demoshare

# additional libraries not defined as REVOLUTION_LIBS

# 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  =   netdemo
DEMO        =   TRUE
REX_NETDEMO =   TRUE


# 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       =   digest.c crypto.c macaddr.c sostartup.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    =   digest crypto macaddr sostartup \

#REX_LIBNAMES+=  

# 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


# Modulerules contains the rules that will use the above variables 
# and dependencies below to construct the binaries specified.

include $(REVOLUTION_EXT_ROOT)/build/buildtools/modulerules
include $(REVOLUTION_EXT_ROOT)/build/demos/share/modulerules.demoshare


# 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 Revolution libraries.

$(FULLBIN_ROOT)/digest$(BINSUFFIX): digest.o \
    $(REVOLUTION_LIBS) $(REX_LIBS)

$(FULLBIN_ROOT)/crypto$(BINSUFFIX): crypto.o \
    $(REVOLUTION_LIBS) $(REX_LIBS)

$(FULLBIN_ROOT)/macaddr$(BINSUFFIX): macaddr.o \
    $(REVOLUTION_LIBS) $(REX_LIBS)

$(FULLBIN_ROOT)/sostartup$(BINSUFFIX): sostartup.o $(REX_DEMOSHARE_OBJS) \
    $(REVOLUTION_LIBS) $(REX_LIBS)

#======== End of makefile ========#
