1#! make -f
2#----------------------------------------------------------------------------
3# Project:  RVLDWC - Library - build - buildtools
4# File:     commondefs.pftype.RVL
5#
6#  Copyright 2006 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# $Revision: 1.22 $
15#----------------------------------------------------------------------------
16
17ifndef RVLDWC_COMMONDEFS_PFTYPE_RVL_
18RVLDWC_COMMONDEFS_PFTYPE_RVL_ = TRUE
19
20
21# -----------------------------------------------------------------------------
22#
23# Sets Revolution SDK switches
24#
25
26PLATFORM	:= $(RVLDWC_PLATFORM)
27
28ifeq ($(RVLDWC_BUILDNAME),DEBUG)
29
30DEBUG				:= TRUE
31
32SDK_DEBUG			:= TRUE
33SDK_BUILD_TARGET	:= DEBUG
34SDK_SUFFIX			:= D
35
36else  # RELEASE or FINAL
37
38NDEBUG				:= TRUE
39
40SDK_BUILD_TARGET	:= NDEBUG
41SDK_SUFFIX			:=
42
43endif # ifeq ($(RVLDWC_BUILDNAME),DEBUG)
44
45
46ifdef SDK_USEWPAD
47WPADEMU_LIB	:= TRUE
48endif
49
50ifdef SDK_USEKPAD
51WPADEMU_LIB	:= TRUE
52endif
53
54
55# -----------------------------------------------------------------------------
56#
57# Revolution SDK-related settings
58#
59#
60#	In order to automatically reflect updates to Revolution SDK,
61#       settings are inherited by including the SDK's commondefs file.
62#
63#	- Uses the target setting (RVL0 or RVL) in the SDK's commondefs file.
64#
65#	- Sets SDK_LIBS based on the SDK library set for REVOLUTION_LIBS in the
66#         SDK's commondefs file.
67#
68#	- Extracts the macro definition (-D option) set for CCFLAGS in the SDK's
69#         commondefs file and sets it to SDK_MACROFLAGS.
70#
71#	- Backs up LINCLUDES settings and restores them after calling the SDK's commondefs.
72#        (The LINCLUDES setting in the SDK's commondefs file is ignored.)
73#
74
75REVOLUTION_SDK_ROOT	?= C:/RVL_SDK
76SDK_ROOT			:= $(subst $(SPACE),\ ,$(subst \,/,$(REVOLUTION_SDK_ROOT)))
77
78
79LINCLUDES_TEMP		:= $(LINCLUDES)
80
81include	$(SDK_ROOT)/build/buildtools/commondefs
82
83SDK_BUILDARCH		?= $(PLATFORM)
84SDK_MACROFLAGS		:= $(filter -D%,$(CCFLAGS))
85
86
87# ----------------------------------------------------------------------------
88#
89#	Revolution SDK Library Settings
90#
91
92SDK_INCDIR			:= $(SDK_ROOT)/include
93SDK_LIBDIR			:= $(SDK_ROOT)/$(ARCH_TARGET)/lib
94
95ifdef SDK_USEKPAD
96SDK_LIBS			:= kpad$(LIBSUFFIX)
97endif
98
99SDK_LIBS			+= $(subst $(INSTALL_ROOT)/lib/,,$(REVOLUTION_LIBS))
100
101SDK_LIBS			+= tpl$(LIBSUFFIX)
102
103# includes for the network-related SDK library
104SDK_LIBS			+= so$(LIBSUFFIX)
105SDK_LIBS			+= ssl$(LIBSUFFIX)
106SDK_LIBS			+= nhttp$(LIBSUFFIX)
107
108# ----------------------------------------------------------------------------
109#
110#	The following variables, set under Revolution SDK, are overwritten.
111#        (Settings in the SDK's commondefs file are ignored.)
112#
113
114LINCLUDES			:= $(LINCLUDES_TEMP)
115GINCLUDES			:=
116INCLUDES			:=
117
118CCFLAGS				:=
119ASFLAGS				:=
120LDFLAGS				:=
121
122
123CC					:=
124AS					:=
125LD					:=
126AR					:=
127
128
129#----------------------------------------------------------------------------
130#
131# NDEV debugger Stubs library settings
132#
133
134ifdef TRK_INTEGRATION
135ifdef NDEV
136
137NDEV_ROOT			:= $(subst $(SPACE),\ ,$(subst \,/,$(NDEV)))
138RVLDWC_EMTYPE			?= NDEV
139
140ifeq ($(PLATFORM), RVL_LEGACYDI)
141NDEV_LIBS			:= NdevExi2$(LIBSUFFIX)
142else
143NDEV_LIBS			:= NdevExi2A$(LIBSUFFIX)
144endif
145
146DBG_LIBDIR			:= $(NDEV_ROOT)/lib
147DBG_LIBS			:= $(NDEV_LIBS) odenotstub$(LIBSUFFIX)
148
149else  # NDEV
150
151DBG_LIBS			+= odemustubs$(LIBSUFFIX)
152
153endif # NDEV
154endif # TRK_INTEGRATION
155
156
157###############################################################################
158#
159#	Revolution SDK Tool Settings
160#
161###############################################################################
162
163MAKEREL				= $(SDK_ROOT)/X86/bin/makerel.exe
164MAKERSO				= $(SDK_ROOT)/X86/bin/makerso.exe
165MAKELCF				= $(SDK_ROOT)/X86/bin/makelcf.exe
166
167DEFAULT_LCFILE		= $(SDK_INCDIR)/revolution/eppc.$(ARCH_TARGET).lcf
168
169
170endif # RVLDWC_COMMONDEFS_PFTYPE_RVL_
171