#! make -f
#----------------------------------------------------------------------------
# Project:  TwlSDK - demos - MB
# File:     Makefile
#
# Copyright 2005-2008 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.
#
# $Date:: 2008-10-15#$
# $Rev: 8948 $
# $Author: nishimoto_takashi $
#----------------------------------------------------------------------------

SUBDIRS			 =

#----------------------------------------------------------------------------
# You can distribute an SRL file for a child only if it is a NITRO or TWL-HYBRID build.
# When distributing a TWL-HYBRID child, add CHILD_ROM_TYPE=HYBRID to make.
# The MB library distributes NITRO applications, so even on a TWL system the distributed HYBRID ROM will boot in NTR mode.
# 
#
# See the MB Library Overview in the Function Reference for details.

ifeq ($(CHILD_ROM_TYPE),HYBRID)
 TARGET_PLATFORM	:=	TWL
 TWL_ARCHGEN	:=	HYBRID
else
 TARGET_PLATFORM	:=	NITRO
endif

include	../make_common


###############################################################################
# Settings specific for children

SRCS			+=	main.c child.c
# Module for the overlay test
SRCS_OVERLAY	+=	overlay_test/func_1.c	\
					overlay_test/func_2.c	\
					overlay_test/func_3.cpp

MAKEROM_ROMROOT	 =	.
MAKEROM_ROMFILES =	./data

include	$(TWLSDK_ROOT)/build/buildtools/commondefs

#----------------------------------------------------------------------------

ifeq ($(TARGET_PLATFORM),TWL)
LCFILE_SPEC		=	main.TWL.lsf
else
LCFILE_SPEC		 =	main.lsf
endif

INSTALL_TARGETS	 =	$(BINDIR)/$(TARGET_BIN)
INSTALL_DIR		 =	../parent/data

#----------------------------------------------------------------------------

do-build:		$(TARGETS)

include	$(TWLSDK_ROOT)/build/buildtools/modulerules


#===== End of Makefile =====

