FreeCalypso > hg > tcs211-l1-reconst
comparison gpf/CCD/ccddata.mk @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 #----------------------------------------------------------------------------- | |
2 # Project : | |
3 # Modul : ccddata.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 : Building Ccddata Dll/Lib. | |
17 #----------------------------------------------------------------------------- | |
18 | |
19 ifndef TARGET | |
20 TARGET=win32 | |
21 endif | |
22 | |
23 ifeq ($(TARGET), nuc) | |
24 override TARGET=arm7 | |
25 endif | |
26 PLATFORM=$(TARGET) | |
27 | |
28 COFILES= | |
29 | |
30 include ccd_base.mk | |
31 | |
32 ifeq ($(PROST), g23net) | |
33 CDGINCDIR=$(TESTROOT)/Cdginc | |
34 PROSTCFLAGS= #??? -DOPTION_MULTITHREADED -DSHARED_CCD | |
35 endif | |
36 | |
37 ifeq ($(PROST), g23m) | |
38 CDGINCDIR=$(TESTROOT)/ms/CDGINC | |
39 endif | |
40 | |
41 ifeq ($(PROST), gsm) | |
42 CDGINCDIR=$(TESTROOT)/ms/CDGINC | |
43 endif | |
44 | |
45 ifeq ($(PROST), gprs) | |
46 ifeq ($(TARGET), arm7) | |
47 CDGINCDIR=$(TESTROOT)/cdginc/cdginc_vo | |
48 else | |
49 CDGINCDIR=$(TESTROOT)/ms/CDGINC | |
50 endif | |
51 endif | |
52 | |
53 ifeq ($(PROST), generic) | |
54 ifndef CDGINCDIR | |
55 CDGINCDIR=$(GPF)/util/teststack/inc/cdginc/ | |
56 endif | |
57 endif | |
58 | |
59 ifndef CCDDATADIR | |
60 CCDDATADIR=$(GPFPRJDIR) | |
61 endif | |
62 override CCDDATADIR:=$(subst \,/,$(CCDDATADIR)) | |
63 | |
64 CCDDATA_OBJECTS=ccddata_ccd.obj ccddata_mconst.obj ccddata_ccdmtab.obj\ | |
65 ccddata_cdemval.obj ccddata_ccdent.obj | |
66 CCDDATA_OBJFILES=$(patsubst %.obj,$(OBJDIR)/%.obj,$(CCDDATA_OBJECTS)) | |
67 | |
68 CCDDATA_EXE_OBJECTS=cdt.obj | |
69 CCDDATA_EXE_OBJFILES=$(patsubst %.obj,$(OBJDIR)/%.obj,$(CCDDATA_EXE_OBJECTS)) | |
70 | |
71 LNTFILES=$(patsubst %.obj,%.lto,$(CCDDATA_OBJECTS)) | |
72 | |
73 # win32 | |
74 ifeq ($(TARGET),win32) | |
75 | |
76 include ccddata_version.h | |
77 | |
78 ifeq ($(LOAD),1) | |
79 PART=load | |
80 DLL_PREFIX= | |
81 CCDDATA_OBJECTS = ccddata_load.obj | |
82 COFILES+=$(CCDDATA_LIB) | |
83 LDFLAGS_DLL+=/IMPLIB:$(CCDDATA_IMPLIB) | |
84 DEFINES+=-DCCDDATA_LOAD | |
85 else | |
86 PART=dll | |
87 DLL_PREFIX=cddl_ | |
88 LDFLAGS_DLL+=/COMMENT:CCDDATA_$(CCDDATA_VERSION) | |
89 CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj \ | |
90 ccddata_cdemstr.obj ccddata_cdepval.obj \ | |
91 ccddata_tap_priv.obj ccddata_alias.obj \ | |
92 ccddata_version.obj ccddata_eg.obj ccddata_pdi.obj | |
93 endif | |
94 | |
95 include ccddata_exp.mk | |
96 | |
97 CCDDATA_LIB=$(GPFBINDIR)/ccddata_$(PART).dll | |
98 CCDDATA_IMPLIB=$(subst win32,WIN32,$(GPFLIBDIR)/ccddata_$(PART).lib) | |
99 CCDDATA_IMPLIB_LOCAL=$(OBJDIR)/ccddata_$(PART).lib | |
100 COFILES+=$(CCDDATA_IMPLIB) | |
101 | |
102 CCDEDIT_LIB=$(GPFLIBDIR)/ccdedit.lib | |
103 CCD_LIB=$(GPFLIBDIR)/ccd.lib | |
104 PCON_LIB=$(GPFLIBDIR)/pcon.lib | |
105 FRAME_LIB=$(GPFLIBDIR)/frame.lib | |
106 | |
107 CCDDATA_EXE=$(GPFBINDIR)/cdt.exe | |
108 | |
109 INCLUDES+=-I"$(CDGINCDIR)" | |
110 DEFINES+=-DCCDDATA_DABSTR | |
111 LDFLAGS_DLL+=/nologo /dll $(PROSTLDFLAGS) $(CCDEDIT_LIB) | |
112 ifneq ($(LOAD),1) | |
113 LDFLAGS_DLL+=/IMPLIB:$(CCDDATA_IMPLIB_LOCAL) | |
114 else | |
115 LINK_EXPORTS+=/EXPORT:ccddata_init /EXPORT:ccddata_exit\ | |
116 /EXPORT:ccddata_dllname /SECTION:.shared,RWS | |
117 endif | |
118 LDFLAGS_DLL+=/OUT:"$@" $(LINK_EXPORTS) | |
119 LDFLAGS_DLL+= $(PCON_LIB) $(CCD_LIB) $(FRAME_LIB) | |
120 | |
121 LDFLAGS_EXE=/nologo /OUT:"$@" $(PROSTLDFLAGS) | |
122 | |
123 ifeq ($(DEBUG), 1) | |
124 LDFLAGS_EXE += /DEBUG /incremental:no /pdb:none | |
125 endif | |
126 | |
127 ccddata: all | |
128 | |
129 $(CCDDATA_LIB): $(CCDDATA_OBJECTS) | |
130 $(LINK) $(LDFLAGS_DLL) $(CCDDATA_OBJFILES) | |
131 | |
132 cdt: $(CCDDATA_EXE) | |
133 | |
134 $(CCDDATA_EXE): $(CCDDATA_EXE_OBJECTS) | |
135 -cleartool co -nda -nc $@ | |
136 $(LINK) $(LDFLAGS_EXE) $(CCDDATA_EXE_OBJFILES) $(CCDDATA_IMPLIB) | |
137 | |
138 else | |
139 CCDDATA_OBJECTS += ccd_config.obj | |
140 endif # target == win32 | |
141 | |
142 # nucwin | |
143 ifeq ($(TARGET),nucwin) | |
144 CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib | |
145 INCLUDES+=-I"$(CDGINCDIR)" | |
146 LDFLAGS+=/OUT:"$(CCDDATA_LIB)" | |
147 # currently for all nucwin: put the p* info for PCON in the lib | |
148 CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj | |
149 # and for the concept of synchronous frame with the tap inside | |
150 # of the protocol stack include also most of the rest of ccddata; it | |
151 # should not matter even without the tap | |
152 CCDDATA_OBJECTS += ccddata_cdemstr.obj ccddata_cdepval.obj \ | |
153 ccddata_tap_priv.obj ccddata_alias.obj | |
154 | |
155 $(CCDDATA_LIB): $(CCDDATA_OBJECTS) | |
156 $(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES) | |
157 | |
158 endif # target == nucwin | |
159 | |
160 # nuc | |
161 ifeq ($(TARGET),arm7) | |
162 CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj | |
163 ifeq ($(CCD_SYMBOLS), 1) | |
164 CCDDATA_OBJECTS += ccddata_alias.obj | |
165 endif | |
166 CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib | |
167 override CCDDATA_LIB:=$(subst \,/,$(CCDDATA_LIB)) | |
168 INCLUDES+=-I"$(CDGINCDIR)" | |
169 LDFLAGS+=-rq $@ | |
170 $(CCDDATA_LIB): $(CCDDATA_OBJECTS) | |
171 $(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES) | |
172 endif # target == arm7 | |
173 | |
174 # arm9 | |
175 ifeq ($(TARGET),arm9) | |
176 CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj | |
177 ifeq ($(CCD_SYMBOLS), 1) | |
178 CCDDATA_OBJECTS += ccddata_alias.obj | |
179 endif | |
180 CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib | |
181 INCLUDES+=-I"$(CDGINCDIR)" | |
182 LDFLAGS+=-rq $@ | |
183 $(CCDDATA_LIB): $(CCDDATA_OBJECTS) | |
184 $(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES) | |
185 endif # target = arm9 | |
186 | |
187 # arm_b16 | |
188 ifeq ($(TARGET),arm_b16) | |
189 CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib | |
190 INCLUDES+=-I"$(CDGINCDIR)" | |
191 LDFLAGS+=-rv $@ | |
192 $(CCDDATA_LIB): $(CCDDATA_OBJECTS) | |
193 $(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES) | |
194 endif # target == arm_b16 | |
195 | |
196 # arm_b32 | |
197 ifeq ($(TARGET),arm_b32) | |
198 CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib | |
199 INCLUDES+=-I"$(CDGINCDIR)" | |
200 LDFLAGS+=-rv $@ | |
201 $(CCDDATA_LIB): $(CCDDATA_OBJECTS) | |
202 $(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES) | |
203 endif # target == arm_b32 | |
204 | |
205 # psos | |
206 ifeq ($(TARGET),psos) | |
207 CCDDATA_LIB=$(CCDDATADIR)/ccddata.lib | |
208 INCLUDES+=-I"$(CDGINCDIR)" | |
209 LDFLAGS+=$@ | |
210 $(CCDDATA_LIB): $(COPTS_FILE) $(CCDDATA_OBJECTS) | |
211 $(MKLIB) $(LDFLAGS) $(CCDDATA_OBJFILES) | |
212 $(RM) $(COPTS_FILE) | |
213 | |
214 $(COPTS_FILE): | |
215 @echo $(_CFLAGS) > c.opt | |
216 @echo $(INCLUDES) >> c.opt | |
217 @echo $(DEFINES) >> c.opt | |
218 | |
219 endif # target == psos | |
220 | |
221 # sus environments | |
222 ifeq ($(OSENV), sus) | |
223 CCDDATA_LIB=$(CCDDATADIR)/libccddata.a | |
224 INCLUDES+=-I$(CDGINCDIR) | |
225 # currently for all emulations: put the p* info for PCON in the lib | |
226 CCDDATA_OBJECTS += ccddata_pconst.obj ccddata_ccdptab.obj | |
227 # and for the concept of synchronous frame with the tap inside | |
228 # of the protocol stack include also most of the rest of ccddata; it | |
229 # should not matter even without the tap | |
230 CCDDATA_OBJECTS += ccddata_cdemstr.obj ccddata_cdepval.obj \ | |
231 ccddata_tap_priv.obj ccddata_alias.obj | |
232 | |
233 $(CCDDATA_LIB): $(CCDDATA_OBJECTS) | |
234 $(MKLIB) $(CCDDATA_LIB) $(CCDDATA_OBJFILES) | |
235 $(RANLIB) $(CCDDATA_LIB) | |
236 | |
237 endif # sus | |
238 | |
239 all: $(CCDDATA_LIB) | |
240 | |
241 exe: $(CCDDATA_EXE) | |
242 | |
243 $(CCDDATA_OBJECTS) $(CCDDATA_EXE_OBJECTS):\ | |
244 %.obj: %.c $(OBJDIR) | |
245 $(CC) $(CFLAGS) "$<" | |
246 | |
247 CCDDATA_LIBDIR=$(subst \,/,$(dir $(CCDDATA_LIB))). | |
248 | |
249 $(CCDDATA_LIB): $(CCDDATA_LIBDIR) $(CCDEDIT_LIB) | |
250 | |
251 $(OBJDIR) $(CCDDATA_LIBDIR): | |
252 @$(MKDIR) -p $@ | |
253 | |
254 clean: | |
255 $(RM) $(OBJDIR)/ccddata* $(OBJDIR)/ccd_config* $(OBJDIR)/cdt.obj \ | |
256 $(CCDDATA_LIB) | |
257 | |
258 help: | |
259 @echo Usage: gnumake -f ccddata.mk [ DEBUG=1 ] TARGET=target | |
260 @echo with target: arm7, arm9, arm_b16, arm_b32, nucwin, win32, or psos | |
261 @echo further options: | |
262 @echo CCDENT=0 when the file ccdent.cdg does not exist in the\ | |
263 cdginc directory | |
264 @echo CCDALIAS=0 when the files malias.cdg and palias.cdg do not exist\ | |
265 in the cdginc directory | |
266 @echo CDEMSTR=0 when the file cdemstr.cdg.cdg does not exist\ | |
267 in the cdginc directory | |
268 @echo CDGINCDIR=path with the path to the cdginc directory | |
269 @echo CCDDATA_LIB=path with the path to the ccddata lib to be built | |
270 | |
271 ci: | |
272 -cleartool ci -nc $(COFILES) | |
273 | |
274 co: | |
275 -cleartool co -nda -nc $(COFILES) | |
276 | |
277 -include ccd_lnt.mk | |
278 include ccddata_dep.mk |