comparison src/gpf2/ccd/ccd_base.mk @ 1:864b8cc0cf63

src/gpf2: preened GPF goo from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 23:38:58 +0000
parents
children
comparison
equal deleted inserted replaced
0:945cf7f506b2 1:864b8cc0cf63
1 #-----------------------------------------------------------------------------
2 # Project :
3 # Modul : ccd_base.mk
4 #-----------------------------------------------------------------------------
5 # Copyright 2002 Texas Instruments Berlin, AG
6 # All rights reserved.
7 #
8 # This file is confidential and a trade secret of Texas
9 # Instruments Berlin, AG
10 # The receipt of or possession of this file does not convey
11 # any rights to reproduce or disclose its contents or to
12 # manufacture, use, or sell anything it may describe, in
13 # whole, or in part, without the specific written consent of
14 # Texas Instruments Berlin, AG.
15 #-----------------------------------------------------------------------------
16 # Purpose : Basic definitions for building ccddata.
17 #-----------------------------------------------------------------------------
18 ifdef PROJECT
19 PROST=$(PROJECT)
20 endif
21 ifndef PROJECT
22 PROJECT=$(PROST)
23 endif
24
25 GPF:=$(subst \,/,$(GPF))
26 TESTROOT:=$(subst \,/,$(TESTROOT))
27
28 CP=cp
29 RM=rm -f
30
31 GPFINCDIR=$(GPF)/inc
32 GPFLIBDIR=$(GPF)/LIB/$(TARGET)$(DEBUGDIR)
33 GPFBINDIR=$(GPF)/BIN$(DEBUGDIR)
34 GPFPRJDIR=$(GPF)/PROJECT/$(PROJECT)/lib/$(TARGET)
35
36 VPATH=$(OBJDIR)
37
38 CCDDIR=.
39
40 # toolset
41 ifdef TOOL_CHOICE
42 TSDIR:=/ts$(TOOL_CHOICE)
43 else
44 TSDIR:=
45 endif
46
47 ifdef PATH_CC_1_22E
48 Path:=$(PATH_CC_1_22E);$(Path)
49 C_DIR:=$(PATH_CC_1_22E)
50 endif
51
52 ifeq ($(TOOL_CHOICE), 3)
53 CFLAGS= --align_structs=4 -pden -q -o
54 ifndef PATH_CC_2_54
55 PATH_CC_2_54=C:/Dvpt_tools/Codegen/TMS4701x_2.54
56 endif
57 Path:=$(PATH_CC_2_54)/bin;$(Path)
58 INCLUDES += -I"$(PATH_CC_2_54)/include"
59 endif
60
61 ifeq ($(TOOL_CHOICE), 5)
62 CFLAGS= --align_structs=4 -pden -q -o
63 ifndef PATH_CC_2_55
64 PATH_CC_2_55=C:\Dvpt_tools\Codegen\TMS4701x_2.55
65 endif
66 Path:=$(PATH_CC_2_55)/bin;$(Path)
67 INCLUDES += -I"$(PATH_CC_2_55)/include"
68 endif
69
70 ifeq ($(TOOL_CHOICE), 6)
71 # --code_state=16 => -mt
72 # --endian=little => -me
73 CFLAGS= -mv=5e --abi=ti_arm9_abi
74 CFLAGS+= -pden -pdv -mf -ms -qq -disable_branch_chaining -pi
75 CFLAGS+= -O=2
76 ifndef PATH_CC_4_11
77 PATH_CC_4_11=C:\Dvpt_tools\Codegen\TMS4701x_4.11
78 endif
79 Path:=$(PATH_CC_4_11)/bin;$(Path)
80 INCLUDES += -I"$(PATH_CC_4_11)/include"
81 endif
82
83 # Suffixes for the name of the output file - e.g. ccd_cdg_tr_po_db.lib
84 ifeq ($(TRACE), 1)
85 trTail :=_tr
86 DEFINES+=-DDEBUG_CCD
87 else
88 trTail:=
89 endif
90
91 ifeq ($(TARGET), arm7)
92 tTail :=_na
93 else
94 ifeq ($(TARGET), nucwin)
95 tTail :=_nw
96 else
97 ifeq ($(TARGET), win32)
98 tTail := _wn
99 else
100 ifeq ($(TARGET), psos)
101 tTail :=_po
102 endif
103 endif
104 endif
105 endif
106
107 DEBUGDIR=
108 ifeq ($(DEBUG), 1)
109 ifeq ($(TARGET),win32)
110 DEBUGDIR=/debug
111 endif
112 dbTail :=_db
113 else
114 dbTail:=
115 endif
116
117 OBJDIR=obj/ccddata/$(PROST)/$(TARGET)$(TSDIR)$(DEBUGDIR)
118
119 ifeq ($(TARGET), linuxpc)
120 OSENV=sus
121 endif
122
123 ifeq ($(TARGET), rtlpc)
124 OSENV=sus
125 RTL_VERSION=2.0
126 RTL_DIR=/opt/rtldk-$(RTL_VERSION)/rtlinuxpro
127 include $(RTL_DIR)/rtl.mk
128 endif
129
130 ifeq ($(TARGET), linuxarm)
131 OSENV=sus
132 endif
133
134 ifeq ($(TARGET), solsparc)
135 OSENV=sus
136 endif
137
138 ifeq ($(OSENV), sus)
139 MKDIR = mkdir
140 else
141 MKDIR = $(GPF)/tools/bin/mkdir
142 SHELL=$(GPF)/tools/bin/sh.exe
143 endif
144
145 # sus environments
146 ifeq ($(OSENV), sus)
147 INCLUDES+=-I. -I$(GPFINCDIR) -I$(CCDDIR)
148 DEFINES+=$(PROSTCFLAGS) -DNEW_ENTITY -DNEW_FRAME -DCCDDATA_STATIC_DATA
149 ifeq ($(CDEMSTR), 0)
150 DEFINES += -DCCDDATA_NO_CDEMSTR
151 endif
152 ifeq ($(CCDENT), 0)
153 DEFINES += -DCCDDATA_NO_CCDENT
154 endif
155 ifeq ($(CCDALIAS), 0)
156 DEFINES += -DCCDDATA_NO_ALIAS
157 endif
158 ifeq ($(CCDDATA_U32), 1)
159 DEFINES += -DCCDDATA_U32
160 endif
161 ifeq ($(TARGET), rtlpc)
162 COPTSNF = $(CFLAGS)
163 MKLIB= $(AR) ruv $@
164 DEFINES += -D_RT_LINUX_
165 else
166 ifeq ($(TARGET), linuxarm)
167 CC=arm-linux-gcc
168 MKLIB= arm-linux-ar ruv $@
169 RANLIB= arm-linux-ranlib
170 DEFINES += -DGSP_TARGET
171 else
172 ifeq ($(TARGET), solsparc)
173 CC=gcc
174 MKLIB= ar ruv $@
175 RANLIB= ranlib
176 else
177 CC=gcc
178 MKLIB= ar ruv $@
179 RANLIB= ranlib
180 endif
181 endif
182 endif
183 CFLAGS+=-c $(DEFINES) $(INCLUDES) -o $(OBJDIR)/$@
184 # Debug
185 ifeq ($(DEBUG), 1)
186 CFLAGS += -g
187 endif
188 endif
189
190 # win32
191 ifeq ($(TARGET),win32)
192 CC=cl
193 INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
194 DEFINES+=$(PROSTCFLAGS) -DWIN32 -DNEW_ENTITY -DNEW_FRAME -D_TOOLS_
195 ifeq ($(CDEMSTR), 0)
196 DEFINES += -DCCDDATA_NO_CDEMSTR
197 endif
198 ifeq ($(CCDENT), 0)
199 DEFINES += -DCCDDATA_NO_CCDENT
200 endif
201 ifeq ($(CCDALIAS), 0)
202 DEFINES += -DCCDDATA_NO_ALIAS
203 endif
204 ifeq ($(CCDDATA_U32), 1)
205 DEFINES += -DCCDDATA_U32
206 endif
207
208 CFLAGS=/nologo /c /W3 /Zp1 $(DEFINES) $(INCLUDES) /Fo$(OBJDIR)/
209 LINK=link.exe
210 MKLIB=lib.exe
211 # Debug
212 ifeq ($(DEBUG), 1)
213 CFLAGS += /Fr$(OBJDIR)/ /MDd /Zi /Fd$(OBJDIR)/
214 LDFLAGS_DLL += /DEBUG /incremental:no /pdb:none
215 else
216 CFLAGS += /MD
217 endif
218
219 endif
220
221 # nucwin
222 ifeq ($(TARGET),nucwin)
223 CC=cl
224 INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
225 DEFINES+=$(PROSTCFLAGS) -DWIN32 -DNEW_ENTITY -DNEW_FRAME -DCCDDATA_STATIC_DATA
226 ifeq ($(CDEMSTR), 0)
227 DEFINES += -DCCDDATA_NO_CDEMSTR
228 endif
229 ifeq ($(CCDENT), 0)
230 DEFINES += -DCCDDATA_NO_CCDENT
231 endif
232 ifeq ($(CCDALIAS), 0)
233 DEFINES += -DCCDDATA_NO_ALIAS
234 endif
235 ifeq ($(CCDDATA_U32), 1)
236 DEFINES += -DCCDDATA_U32
237 endif
238 CFLAGS=/nologo /c /W3 /Zp1 $(DEFINES) $(INCLUDES) /Fo$(OBJDIR)/
239 MKLIB=lib.exe
240 LDFLAGS+=/nologo $(PROSTLDFLAGS)
241 # Debug
242 ifeq ($(DEBUG), 1)
243 CFLAGS += /Fr$(OBJDIR)/ /MTd /Zi /Fd$(OBJDIR)/
244 else
245 CFLAGS += /MT
246 endif
247 endif # target == nucwin
248
249 # arm7
250 ifeq ($(TARGET), arm7)
251 CC=cl470
252 CFLAGS+=-me -mt
253 ifeq ($(TOOL_CHOICE), )
254 CFLAGS+= -mw -x -pw2 -o -q
255 endif
256 ifeq ($(DEBUG), 1)
257 ifeq ($(TOOL_CHOICE), )
258 CFLAGS += -g
259 else
260 CFLAGS += -gt
261 endif
262 CFLAGS += -mn
263 endif
264 CFLAGS+=-fr $(OBJDIR) -c
265 DEFINES+=-d_TMS470 -dNEW_FRAME -dNEW_ENTITY -dCCDDATA_STATIC_DATA
266 ifeq ($(CDEMSTR), 0)
267 DEFINES += -dCCDDATA_NO_CDEMSTR
268 endif
269 ifeq ($(CCDENT), 0)
270 DEFINES += -dCCDDATA_NO_CCDENT
271 endif
272 ifeq ($(CCDALIAS), 0)
273 DEFINES += -dCCDDATA_NO_ALIAS
274 endif
275 ifeq ($(CCDDATA_U32), 1)
276 DEFINES += -dCCDDATA_U32
277 endif
278 INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
279 CFLAGS+=$(DEFINES) $(INCLUDES)
280 MKLIB=ar470
281 endif # target == arm7
282
283 ifeq ($(TARGET), arm9)
284
285 CC=cl470
286 CFLAGS+=-me -mt -o
287 ifeq ($(DEBUG), 1)
288 ifeq ($(TOOL_CHOICE), 6)
289 CFLAGS += --symdebug:coff
290 else
291 # toolsets 3 and 5
292 CFLAGS += -gt
293 endif
294 CFLAGS += -mn
295 endif
296
297 CFLAGS+=-fr $(OBJDIR) -c
298 DEFINES+=-d_TMS470 -dNEW_FRAME -dNEW_ENTITY -dCCDDATA_STATIC_DATA
299 DEFINES += -dCCDDATA_U32
300 ifeq ($(CDEMSTR), 0)
301 DEFINES += -dCCDDATA_NO_CDEMSTR
302 endif
303 ifeq ($(CCDENT), 0)
304 DEFINES += -dCCDDATA_NO_CCDENT
305 endif
306 ifeq ($(CCDALIAS), 0)
307 DEFINES += -dCCDDATA_NO_ALIAS
308 endif
309 INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
310 CFLAGS+=$(DEFINES) $(INCLUDES)
311 MKLIB=ar470
312 endif # target == arm9
313
314 # arm_b16
315 ifeq ($(TARGET), arm_b16)
316 CC=armcc
317 CFLAGS+=-Epl -Wx -O0
318 ifeq ($(DEBUG), 1)
319 CFLAGS+=-g
320 endif
321 CFLAGS+=-o $(OBJDIR)/$@ -c
322 DEFINES+=-D_TMS470 -DNEW_FRAME -DNEW_ENTITY -DCCDDATA_STATIC_DATA
323 INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
324 CFLAGS+=$(DEFINES) $(INCLUDES)
325 MKLIB=armar
326 endif # target == arm_b16
327
328 # arm_b32
329 ifeq ($(TARGET), arm_b32)
330 CC=armcc
331 CFLAGS+=-Epl -Wx -O0
332 ifeq ($(DEBUG), 1)
333 CFLAGS+=-g
334 endif
335 CFLAGS+=-o $(OBJDIR)/$@ -c
336 DEFINES+=-D_TMS470 -DNEW_FRAME -DNEW_ENTITY -DCCDDATA_STATIC_DATA
337 INCLUDES+=-I"." -I"$(GPFINCDIR)" -I"$(CCDDIR)"
338 CFLAGS+=$(DEFINES) $(INCLUDES)
339 MKLIB=armar
340 endif # target == arm_b32
341
342 # psos
343 ifeq ($(TARGET), psos)
344 CC=cc386
345 COPTS_FILE:=c.opt
346 -include $(PSS_BSP)/bsp.mk# board support settings e.g. MODEL, FPU
347 ifeq ( FPU,H )
348 FPUOPT = -VNDP
349 else
350 FPUOPT=
351 endif
352 _CFLAGS+=-c -VANSI -VLONGNAME -VSTRICT -VSPROTO -VROM -VBSS -V$(MODEL)
353 _CFLAGS+=$(FPUOPT) -VNOSIGNEDCHAR
354 ifeq ($(DEBUG), 1)
355 _CFLAGS+=-VXDB
356 endif
357 DEFINES+=-DMODEL=$(MODEL) -DPSOS=1 -DNEW_FRAME -DNEW_ENTITY
358 DEFINES+=-DCCDDATA_STATIC_DATA
359 ifeq ($(CDEMSTR), 0)
360 DEFINES += -DCCDDATA_NO_CDEMSTR
361 endif
362 ifeq ($(CCDENT), 0)
363 DEFINES += -DCCDDATA_NO_CCDENT
364 endif
365 ifeq ($(CCDALIAS), 0)
366 DEFINES += -DCCDDATA_NO_ALIAS
367 endif
368 ifeq ($(CCDDATA_U32), 1)
369 DEFINES += -DCCDDATA_U32
370 endif
371 INCLUDES+=-I. -I$(PSS_ROOT)/include -I$(PSS_BSP) -I$(PSS_ROOT)/bsps/devices
372 CFLAGS=@c.opt -o $(OBJDIR)/$@
373 MKLIB=lib386
374 endif # target == psos