#! make -f
#----------------------------------------------------------------------------
# Project:  TwlSDK - demos.TWL - nandApp - simple
# File:     Makefile
#
# Copyright 2007-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-09-26#$
# $Rev: 8694 $
# $Author: hatamoto_minoru $
#----------------------------------------------------------------------------

SUBDIRS			 = banner \
					$(ROOT)/build/demos/gx/UnitTours/DEMOLib

#-------------------------
#-- Specifies a NAND application build

TWL_NANDAPP		=	TRUE


#----------------------------------------------------------------------------
TARGET_PLATFORM	:= TWL
TWL_ARCHGEN		:= LIMITED

SRCS			 =	main.c
TARGET_BIN		 =	nandAppSample.tad


#-------------------------
#-- A fixed RSF file is needed to specify several parameters for the NAND application

ROM_SPEC			=	demo.rsf


#-------------------------
#--We can make the ROM-FS carry files in the same way as card applications

MAKEROM_ROMROOT	 = ./rom_data
MAKEROM_ROMFILES = *.*


#-------------------------
# All files within the ROM are autogenerated, so they can be deleted by 'clean'
LDIRT_CLEAN		 =	$(MAKEROM_ROMROOT)


include	$(TWLSDK_ROOT)/build/buildtools/commondefs
include	$(TWLSDK_ROOT)/build/buildtools/commondefs.gx.demolib

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

.PHONY:	build_time

do-build:		$(TARGETS)


#-------------------------
#--Make it so that build_time.txt is created before the SRL is

$(BINDIR)/$(TARGET_BIN_BASENAME).$(TWL_ELF_EXT):	build_time


#-------------------------
#-- Create rom_data/build_time.txt

build_time:
	$(INSTALL) -d $(MAKEROM_ROMROOT)
	echo -n "build at `date \"+%Y/%m/%d %H:%M:%S\"` on \"`hostname`\"" > $(MAKEROM_ROMROOT)/build_time.txt


include	$(TWLSDK_ROOT)/build/buildtools/modulerules


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