1#! make -f 2#---------------------------------------------------------------------------- 3# Project: TwlSDK - demos - MB 4# File: Makefile 5# 6# Copyright 2006-2008 Nintendo. All rights reserved. 7# 8# These coded instructions, statements, and computer programs contain 9# proprietary information of Nintendo of America Inc. and/or Nintendo 10# Company Ltd., and are protected by Federal copyright law. They may 11# not be disclosed to third parties or copied or duplicated in any form, 12# in whole or in part, without the prior written consent of Nintendo. 13# 14# $Date:: 2009-02-19#$ 15# $Rev: 10047 $ 16# $Author: nishimoto_takashi $ 17#---------------------------------------------------------------------------- 18 19# Creates child boot binary 20SUBDIRS = child 21 22 23# Because the MB library samples use the multiboot functionality, multiple development units with the same communications environment (wired or wireless) are required. 24# The mb_child.bin sample program in the $TwlSDK/bin/ARM9-TS/Release directory provides the same functionality as a commercial system that is a multiboot child. Load this binary on other systems just like a sample program and run them together. 25# 26# 27# 28# 29# 30 31 32#---------------------------------------------------------------------------- 33 34INCDIR = common/include parent/include 35SRCDIR = common/src parent/src 36SRCS = main.c \ 37 common.c \ 38 disp.c \ 39 font.c \ 40 gmain.c 41 42 43# WH module was moved to wireless_shared 44 45WH_DIR = $(ROOT)/build/demos/wireless_shared/wh 46SRCDIR += $(WH_DIR) 47INCDIR += $(WH_DIR) 48SRCS += $(WH_DIR)/wh.c 49 50# MBP was moved to wireless_shared 51 52MBP_DIR = $(ROOT)/build/demos/wireless_shared/mbp 53SRCDIR += $(MBP_DIR) 54INCDIR += $(MBP_DIR) 55SRCS += $(MBP_DIR)/mbp.c 56 57 58TARGET_NEF = main.nef 59TARGET_BIN = main.srl 60 61# makerom settings 62MAKEROM_ROMROOT = ./data 63MAKEROM_ROMFILES = *.srl 64 65include $(TWLSDK_ROOT)/build/buildtools/commondefs 66 67#---------------------------------------------------------------------------- 68 69ifeq ($(TARGET_PLATFORM),TWL) 70ROM_SPEC = main.TWL.rsf 71else 72ROM_SPEC = main.rsf 73endif 74 75# It is safer to set a slightly large IRQ stack size in the LCF file when running complex processes within the MB callback. 76# Because OS_Printf() in particular consumes a large amount of stack, try using the lighter version, OS_TPrintf(), in callbacks whenever possible. 77# 78# 79 80#---------------------------------------------------------------------------- 81 82do-build: $(TARGETS) 83 84include $(TWLSDK_ROOT)/build/buildtools/modulerules 85 86ifdef TWL_ELFTOBIN 87$(TARGETS): $(ELFTOBIN_ARM7) 88 89else #TWL_ELFTOBIN 90$(TARGETS): $(MAKEROM_ARM7) 91 92endif #TWL_ELFTOBIN 93 94 95#===== End of Makefile ===== 96