-
Notifications
You must be signed in to change notification settings - Fork 0
/
makeopt
170 lines (141 loc) · 3.25 KB
/
makeopt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# put a default target at the top to prevent rules from getting confused later
all: demo
#
# include user custom options file if it exists
#
ifndef RWOPTIONS
RWOPTIONS = options.mak
endif
include $(RWOPTIONS)
ifndef RWSIMD
RWSIMD = 0
endif
ifndef RWVERBOSE
RWVERBOSE = 0
endif
ifndef RWSUPPRESSINLINE
RWSUPPRESSINLINE = 0
endif
ifndef RWSUPPRESSOPTIMIZATIONPRAGMAS
RWSUPPRESSOPTIMIZATIONPRAGMAS = 0
endif
ifeq ($(RWFULLPLATFORM), 1)
RWPLATFORM = $(RWOS)/$(RWCOMPILER)/$(RWTARGET)
RWPLATFORMEXE = $(RWOS)_$(RWCOMPILER)_$(RWTARGET)
else
RWPLATFORM = $(RWTARGET)
RWPLATFORMEXE = $(RWTARGET)
endif # ifeq ($(RWFULLPLATFORM), 1)
# all directories are defined relative to DEMODIR
ifndef DEMODIR
DEMODIR = $(CURDIR)
# setting BASDEIR=$(CURDIR) enables absolute path names
# which makes a better job of debug symbols for profiling. debugging etc.
# see also http://www.fsf.org/software/make/make.html
endif
# RWOUTPUT
ifeq ("$(RWOUTPUT)", "")
RWLIBPATH = $(RWSDK)/lib/$(RWPLATFORM)
else
RWLIBPATH = $(RWSDK)/lib/$(RWPLATFORM)/$(RWOUTPUT)
endif
ifeq ($(RWMETRICS), 1)
RWLIBDIR = $(RWLIBPATH)/metrics
ifeq ("$(RWOUTPUT)", "")
OBJDIR = obj/$(RWPLATFORM)m
else
OBJDIR = obj/$(RWPLATFORM)m/$(RWOUTPUT)
endif
CFLAGS += -DRWMETRICS
PROJS = $(DEMO)_$(RWPLATFORMEXE)m$(EXE)
else # RWMETRICS
ifeq ($(RWDEBUG), 1)
RWLIBDIR = $(RWLIBPATH)/debug
ifeq ("$(RWOUTPUT)", "")
OBJDIR = obj/$(RWPLATFORM)d
else
OBJDIR = obj/$(RWPLATFORM)d/$(RWOUTPUT)
endif
CFLAGS += -DRWDEBUG
PROJS = $(DEMO)_$(RWPLATFORMEXE)d$(EXE)
else # RWDEBUG
ifeq ($(CPROFILE), 1)
RWLIBDIR = $(RWLIBPATH)/profile
ifeq ("$(RWOUTPUT)", "")
OBJDIR = obj/$(RWPLATFORM)p
else
OBJDIR = obj/$(RWPLATFORM)p/$(RWOUTPUT)
endif
CFLAGS += -DCPROFILE
PROJS = $(DEMO)_$(RWPLATFORMEXE)p$(EXE)
else # CPROFILE
ifeq ($(MSWST), 1)
RWLIBDIR = $(RWLIBPATH)/mswst
ifeq ("$(RWOUTPUT)", "")
OBJDIR = obj/$(RWPLATFORM)wst
else
OBJDIR = obj/$(RWPLATFORM)wst/$(RWOUTPUT)
endif
PROJS = $(DEMO)_$(RWPLATFORMEXE)wst$(EXE)
else # MSWS
RWLIBDIR = $(RWLIBPATH)
ifeq ("$(RWOUTPUT)", "")
OBJDIR = obj/$(RWPLATFORM)
else
OBJDIR = obj/$(RWPLATFORM)/$(RWOUTPUT)
endif
PROJS = $(DEMO)_$(RWPLATFORMEXE)$(EXE)
endif # MSWST
endif # CPROFILE
endif # RWDEBUG
endif # RWMETRICS
ifeq ("$(RWTARGET)", "xbox")
XBOXPROJS = $(patsubst %$(EXE),%.xbe,$(PROJS))
endif
ifeq ($(RWPATCH), 1)
CFLAGS += -DRWPATCH
endif
ifeq ($(RWMEMDEBUG), 1)
CFLAGS += -DRWMEMDEBUG
endif
ifeq ($(RWSIMD), 1)
CFLAGS += -DRWSIMD
endif
ifeq ($(RWVERBOSE), 1)
CFLAGS += -DRWVERBOSE
endif
ifeq ($(RWSUPPRESSINLINE), 1)
CFLAGS += -DRWSUPPRESSINLINE
endif
ifeq ($(RWSUPPRESSOPTIMIZATIONPRAGMAS), 1)
CFLAGS += -DRWSUPPRESSOPTIMIZATIONPRAGMAS
endif
RWINCDIR = $(RWSDK)/include/$(RWPLATFORM)
# Define Common Directories & Files
SKEL = $(DEMODIR)/skel
SKELPS = $(SKEL)/$(RWOS)
COMMON = $(DEMODIR)/democom
SRC = $(DEMODIR)/src
# FXNODES= $(DEMODIR)/../fxnodes
ifeq ($(RWLOGO), 1)
RWLIBS += $(RWLIBDIR)/$(LP)rplogo.$(L)
CFLAGS += -DRWLOGO
endif
ifeq ($(RWSPLASH), 1)
CFLAGS += -DRWSPLASH
endif
CINCLUDE += \
-I$(RWINCDIR) \
-I$(RWSDK)/include/$(RWPLATFORM)/archive \
-I$(COMMON) \
-I$(SKEL) \
-I$(SKELPS) \
-I$(SRC)
CFLAGS += \
-DRWTARGET_$(RWPLATFORMEXE) \
$(CINCLUDE)
# -I$(FXNODES)
include makecom/$(RWOS)/$(RWCOMPILER)
ifeq ($(RWTEST), 1)
include ../../../tests/maketest/$(RWOS)
endif