1#! make -f
2#----------------------------------------------------------------------------
3# Project:  TwlSDK - libraries - os
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 = NITRO
24
25NITRO_CODEGEN	?= ALL
26NITRO_PROC		 = ARM9
27
28SRCDIR			 = ../common/src src
29INCDIR			 = ../common/include
30
31SRCS			 = os_irqHandler.c			\
32				   os_irqTable.c			\
33				   os_interrupt.c			\
34				   os_pxi.c					\
35				   os_spinLock.c			\
36				   os_printf.c				\
37				   os_thread.c				\
38				   os_context.c				\
39				   os_emulator.c			\
40				   os_message.c				\
41				   os_mutex.c				\
42				   os_cache.c				\
43				   os_init.c				\
44				   os_arena.c				\
45				   os_alloc.c				\
46				   os_tcm.c					\
47				   os_protectionUnit.c		\
48				   os_protectionRegion.c	\
49				   os_exception.c			\
50				   os_timer.c				\
51				   os_tick.c				\
52				   os_alarm.c				\
53				   os_valarm.c				\
54				   os_system.c				\
55				   os_systemWork.c			\
56				   os_profile.c				\
57				   os_reset.c				\
58				   os_ownerInfo.c			\
59				   os_vramExclusive.c		\
60				   os_china.c				\
61				   os_argument.c			\
62				   os_entropy.c				\
63				   os_terminate_proc.c		\
64				   os_event.c				\
65				   os_resource.c
66
67TARGET_LIB		 = libos$(NITRO_LIBSUFFIX).a
68
69DATA_DIR		 = $(ROOT)/data/for_china
70DATA_OBJS		 = $(patsubst $(DATA_DIR)/%.bin,$(OBJDIR)/%.o,$(wildcard $(DATA_DIR)/*.bin))
71EXT_OBJS	+= $(DATA_OBJS)
72
73#----------------------------------------------------------------------------
74include	$(TWLSDK_ROOT)/build/buildtools/commondefs
75
76INSTALL_TARGETS	 = $(TARGETS)
77INSTALL_DIR		 = $(NITRO_INSTALL_LIBDIR)
78
79#----------------------------------------------------------------------------
80do-build:		$(TARGETS)
81
82include	$(TWLSDK_ROOT)/build/buildtools/modulerules
83
84OBJS			+= $(DATA_OBJS)
85
86# Convert screen data directly to object
87$(OBJDIR)/%.o: $(DATA_DIR)/%.bin
88			$(BIN2OBJ) --compatible $(call empath,$<) $@ >/dev/null
89
90#===== End of Makefile =====
91