###############################################################################
# IP Makefile
#
# Copyright 2002-2004  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.1  2005/12/20 20:42:32  horti
# Added some networking files.
#
#   
#   15    05/12/01 13:52 Ueno_kyu
#   Commented out AOL specific sources and flag.
#   
#   14    04/11/02 11:13 Ueno_kyu
#   Added support for IPv6 Core Protocol.
#   
#   23    04/10/13 10:27 Ueno_kyu
#   Removed IPModem.c.
#   
#   22    04/09/03 15:04 Ueno_kyu
#   Renamed IP_SAVE_ECHO_REPLY to ICMP6_SAVE_PACKET.
#   
#   21    04/08/31 19:25 Ueno_kyu
#   Added support for IPv6 fragmentation and reassembly.
#   
#   20    04/08/18 10:09 Ueno_kyu
#   Added IP_SAVE_ECHO_REPLY.
#   
#   19    04/07/26 9:23 Ueno_kyu
#   Fixed a bug.
#   
#   18    04/07/22 9:56 Ueno_kyu
#   Added IP_AOL to enclose AOL specific codes.
#   
#   17    04/07/22 9:06 Ueno_kyu
#   Added  IPAol.c and IPAolMakeTemplate.c.
#   
#   16    6/29/04 11:07 Shiki
#   Added IPHdlc.c.
#   
#   15    6/23/04 14:55 Shiki
#   Added IPInterface.c.
#   
#   14    6/22/04 17:03 Shiki
#   Added IPModem.c
#   
#   13    6/09/04 15:53 Shiki
#   IPv6 Pilot implementation
#   
#   11    11/17/03 13:23 Shiki
#   Added IPMisc.c.
#
#   10    10/20/03 15:44 Shiki
#   Modified not to enable CATS for NDEBUG build.
#
#   9     4/03/03 18:19 Shiki
#   Added IPUuid.c.
#
#   8     4/01/03 8:58 Shiki
#   Added IPIgmp.c
#
#   7     3/07/03 10:56 Shiki
#   Removed md5.c from CLIBSRCS as now md5.c is the standard part of
#   eth[D].a.
#
#   6     8/05/02 11:19 Shiki
#   Added IPChap.c and md5.c
#
#   5     7/31/02 16:13 Shiki
#   Added support for PPP.
#
#   4     4/15/02 11:44 Shiki
#   Modified to enable CATS for NDEBUG build.
#
#   3     4/08/02 16:51 Shiki
#   Added IPSocket.c.
#
#   2     3/25/02 17:09 Shiki
#   Added IPOpt.c.
#
#   1     3/11/02 19:37 Shiki
#   Initial check-in.
# $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 (/dolphin/$(ARCH_TARGET)).
all: 	setup build install

ifndef NDEBUG
# CATS_ON     = TRUE
endif

# commondefs must be included near the top so that all common variables
# will be defined before their use.
include $(BUILDTOOLS_ROOT)/commondefs

# MODULENAME should be set to the name of this subdirectory
MODULENAME	= ip6

# This indicates to commondefs/modulerules as to where this directory is
# The selectable paths are restricted to limit the number of subtrees
# that are added to the Dolphin tree.
LIB		= TRUE

# CCFLAGS += -DVERBOSE

CCFLAGS += -DIP_INET6
# CCFLAGS += -DIP_AOL
CCFLAGS += -DICMP6_SAVE_PACKET

###############################################################################
# Library building
# LIBNAME specifies the name of the library.  No suffix is required, as
# that will depend on whether this is a DEBUG build or not.
# The final name of the library will be $(LIBNAME)$(LIBSUFFIX)
LIBNAME		= ip6

# CLIBSRCS specifies all C files that are built and linked into the library.
# ASMLIBSRCS are all assembly files that will be built and linked into the lib.
CLIBSRCS	= IP.c IP4.c IPArp.c IPIcmp.c IPRoute.c IPFrag.c
CLIBSRCS       += IFFifo.c IFRing.c

CLIBSRCS       += IPZero.c IPOpt.c
CLIBSRCS       += IPIgmp.c IPUuid.c IPMisc.c

# IPv6
CLIBSRCS       += IP6.c IP6Icmp.c IP6Zero.c IP6Mld.c IP6Frag.c

# UDP
CLIBSRCS       += IPUdp.c

# TCP
CLIBSRCS       += IPTcpTimer.c IPTcpTimeWait.c IPTcp.c IPTcpOutput.c IPTcpUser.c
# Socket
CLIBSRCS       += IPSocket.c

# DNS
CLIBSRCS       += IPDns.c

# DHCP
CLIBSRCS       += IPDhcp.c

# PPP
CLIBSRCS       += IPPPP.c IPPPPoE.c IPLcp.c IPIpcp.c IPPap.c IPChap.c IPHdlc.c

# Interface
CLIBSRCS       += IPInterface.c IPEther.c 

# AOL
# CLIBSRCS       += IPAol.c IPAolMakeTemplate.c

# modulerules contains the rules that will use the above variables
# and dependencies below to construct the library and binaries specified.
include $(BUILDTOOLS_ROOT)/modulerules
