1#! make -f
2#----------------------------------------------------------------------------
3# Project:  TwlSDK
4# File:     Makefile
5#
6# Copyright 2007-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:: 2008-09-18#$
15# $Rev: 8573 $
16# $Author: okubata_ryoma $
17#----------------------------------------------------------------------------
18
19SUBDIRS			 =
20SUBMAKES_P 		 = Makefile.CALLTRACE Makefile.FUNCTIONCOST
21
22#----------------------------------------------------------------------------
23override TARGET_PLATFORM = TWL
24
25TWL_CODEGEN		?= ALL
26TWL_PROC		 =ARM9
27
28# Create libraries for both HYBRID and LIMITED
29TWL_ARCHGEN		?= ALL
30
31SRCDIR			 = src ../common/src ../ARM9/src
32INCDIR			 = ../common/include
33
34SRCS			 = os_irqHandler.c			\
35				   os_irqTable.c			\
36				   os_interrupt.c			\
37				   os_pxi.c					\
38				   os_spinLock.c			\
39				   os_printf.c				\
40				   os_thread.c				\
41				   os_context.c				\
42				   os_emulator.c			\
43				   os_message.c				\
44				   os_mutex.c				\
45				   os_cache.c				\
46				   os_init.c				\
47				   os_arena.c				\
48				   os_alloc.c				\
49				   os_tcm.c					\
50				   os_protectionUnit.c		\
51				   os_protectionRegion.c	\
52				   os_exception.c			\
53				   os_timer.c				\
54				   os_tick.c				\
55				   os_alarm.c				\
56				   os_valarm.c				\
57				   os_system.c				\
58				   os_systemWork.c			\
59				   os_profile.c				\
60				   os_reset.c				\
61				   os_ownerInfo.c			\
62				   os_ownerInfoEx.c			\
63				   os_vramExclusive.c		\
64				   os_china.c				\
65				   os_argument.c			\
66				   os_entropy.c				\
67				   os_terminate_proc.c		\
68				   os_event.c				\
69				   os_resource.c			\
70				   os_application_jump.c	\
71                   os_msJump.c				\
72				   os_stub.c				\
73
74TARGET_LIB		 = libos$(TWL_LIBSUFFIX).a
75
76PC_DIR			 = ./pc_obj
77PC_OBJ			 = $(PC_DIR)/os_countryCode.o
78
79DATA_DIR		 = $(ROOT)/data/for_china
80DATA_OBJS		 = $(patsubst $(DATA_DIR)/%.bin,$(OBJDIR)/%.o,$(wildcard $(DATA_DIR)/*.bin))
81EXT_OBJS		+= $(DATA_OBJS) $(PC_OBJ)
82
83#----------------------------------------------------------------------------
84include	$(TWLSDK_ROOT)/build/buildtools/commondefs
85
86
87INSTALL_TARGETS	 = $(TARGETS)
88
89INSTALL_DIR		 = $(TWL_INSTALL_LIBDIR)
90
91ifeq	($(TWLSDK_SYSMENU_PRIVATE),TRUE)
92SUBMAKES_P		 +=	Makefile.sharedFont
93endif	# ifeq	($(TWLSDK_SYSMENU_PRIVATE),TRUE)
94
95ifeq	($(TWLSDK_SECURE7_PRIVATE),TRUE)
96SUBMAKES_P		 +=	Makefile.countryCode
97endif	# ifeq	($(TWLSDK_SECURE7_PRIVATE),TRUE)
98
99#----------------------------------------------------------------------------
100do-build:	$(TARGETS)
101
102include	$(TWLSDK_ROOT)/build/buildtools/modulerules
103
104# Convert screen data directly to object
105$(OBJDIR)/%.o: $(DATA_DIR)/%.bin
106			$(BIN2OBJ) --compatible $(call empath,$<) $@ >/dev/null
107
108#===== End of Makefile =====
109