update dev300-m58
[ooovba.git] / solenv / inc / _tg_shl.mk
blob0c881e1c3eca9ae81baee5b750773c635f414ad5
1 # unroll begin
3 .IF "$(SHL1TARGETN)"!=""
5 .IF "$(OS)"=="AIX"
6 SHL1STDLIBS=
7 .ENDIF
9 .IF "$(SHLLINKARCONLY)" != ""
10 SHL1STDLIBS=
11 STDSHL=
12 .ELSE
13 SHL1ARCHIVES=
14 .ENDIF
16 # decide how to link
17 .IF "$(SHL1CODETYPE)"=="C"
18 SHL1LINKER=$(LINKC)
19 SHL1STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
20 SHL1LINKFLAGS+=$(LINKCFLAGS)
21 .ELSE # "$(SHL1CODETYPE)"=="C"
22 SHL1LINKER=$(LINK)
23 SHL1STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
24 SHL1LINKFLAGS+=$(LINKFLAGS)
25 .ENDIF # "$(SHL1CODETYPE)"=="C"
27 SHL1RPATH*=OOO
28 LINKFLAGSRUNPATH_$(SHL1RPATH)*=/ERROR:/Bad_SHL1RPATH_value
29 SHL1LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL1RPATH))
31 .IF "$(SHL1USE_EXPORTS)"==""
32 SHL1DEF*=$(MISC)/$(SHL1TARGET).def
33 .ENDIF # "$(SHL1USE_EXPORTS)"==""
35 EXTRALIBPATHS1=$(EXTRALIBPATHS)
36 .IF "$(UPDATER)"=="YES"
37 .IF "$(SHL1NOCHECK)"==""
38 .IF "$(SOLAR_STLLIBPATH)"!=""
39 EXTRALIBPATHS1+=-L$(SOLAR_STLLIBPATH)
40 .ENDIF
41 .ENDIF # "$(SHL1NOCHECK)"!=""
42 .ENDIF
43 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
44 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
45 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
47 .IF "$(VERSIONOBJ)"!=""
48 SHL1VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL1TARGET))}$(VERSIONOBJ:f)
49 USE_VERSIONH:=$(INCCOM)/$(SHL1VERSIONOBJ:b).h
50 .IF "$(GUI)" == "UNX"
51 SHL1VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL1TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
52 .ELSE # "$(GUI)" == "UNX"
53 SHL1VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL1TARGET))}$(VERSIONOBJ:f)
54 .ENDIF # "$(GUI)" == "UNX"
55 $(MISC)/$(SHL1VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL1VERSIONOBJ:b).h
56 # $(COPY) $(SOLARENV)/src/version.c $@
57 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL1VERSIONOBJ:b).h/ > $@
59 .INIT : $(SHL1VERSIONOBJDEP)
60 .ENDIF # "$(VERSIONOBJ)"!=""
62 .IF "$(GUI)" != "UNX"
63 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
64 .IF "$(SHL1IMPLIB)" == ""
65 SHL1IMPLIB=i$(TARGET)_t1
66 .ENDIF # "$(SHL1IMPLIB)" == ""
67 .IF "$(COM)" != "GCC"
68 USE_1IMPLIB=-implib:$(LB)/$(SHL1IMPLIB).lib
69 .ENDIF # "$(COM)" != "GCC"
70 SHL1IMPLIBN=$(LB)/$(SHL1IMPLIB).lib
71 ALLTAR : $(SHL1IMPLIBN)
73 .IF "$(USE_DEFFILE)"==""
74 USE_1IMPLIB_DEPS=$(LB)/$(SHL1IMPLIB).lib
75 .ENDIF # "$(USE_DEFFILE)"==""
76 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
77 USE_SHL1DEF=$(SHL1DEF)
78 .ELSE # "$(GUI)" != "UNX"
79 USE_SHL1DEF=
80 SHL1DEPN+:=$(SHL1DEPNU)
82 .IF "$(SHL1VERSIONMAP)"==""
83 # to activate vmaps remove "#"
84 USE_SHL1VERSIONMAP=$(MISC)/$(SHL1TARGET).vmap
85 .ENDIF # "$(SHL1VERSIONMAP)"==""
87 .IF "$(USE_SHL1VERSIONMAP)"!=""
89 .IF "$(SHL1FILTERFILE)"!=""
90 .IF "$(SHL1VERSIONMAP)"!=""
91 #eine von beiden ist zuviel
92 USE_SHL1VERSIONMAP=$(MISC)/$(SHL1TARGET).vmap
93 $(USE_SHL1VERSIONMAP) .PHONY:
94 @echo -----------------------------
95 @echo you should only use versionmap OR exportfile
96 @echo -----------------------------
97 # force_dmake_to_error
99 .ENDIF # "$(SHL1VERSIONMAP)"!=""
101 .IF "$(OS)"!="IRIX"
102 SHL1VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL1VERSIONMAP)
103 .ENDIF
105 $(USE_SHL1VERSIONMAP): \
106 $(SHL1OBJS)\
107 $(SHL1LIBS)\
108 $(SHL1FILTERFILE)
109 @$(RM) $@.dump
110 .IF "$(SHL1OBJS)"!=""
111 # dump remaining objects on the fly
112 .IF "$(OS)"=="MACOSX"
113 @-nm $(SHL1OBJS:s/.obj/.o/) > $@.dump
114 .ELSE
115 @nm $(SHL1OBJS:s/.obj/.o/) > $@.dump
116 .ENDIF
117 .ENDIF # "$(SHL1OBJS)!"=""
118 @$(TYPE) /dev/null $(SHL1LIBS:s/.lib/.dump/) >> $@.dump
119 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL1INTERFACE) -f $(SHL1FILTERFILE) -m $@
121 .ELSE # "$(SHL1FILTERFILE)"!=""
122 USE_SHL1VERSIONMAP=$(MISC)/$(SHL1TARGET).vmap
123 $(USE_SHL1VERSIONMAP) :
124 @echo -----------------------------
125 @echo SHL1FILTERFILE not set!
126 @echo -----------------------------
127 @$(TOUCH) $@
128 @echo dummy file to keep the dependencies for later use.
129 # force_dmake_to_error
130 .ENDIF # "$(SHL1FILTERFILE)"!=""
131 .ELSE # "$(USE_SHL1VERSIONMAP)"!=""
133 #and now for the plain non-generic way...
134 .IF "$(SHL1VERSIONMAP)"!=""
135 USE_SHL1VERSIONMAP=$(MISC)/$(SHL1VERSIONMAP:b)_$(SHL1TARGET)$(SHL1VERSIONMAP:e)
136 .IF "$(OS)"!="IRIX"
137 SHL1VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL1VERSIONMAP)
138 .ENDIF
140 .IF "$(OS)"=="MACOSX"
141 $(USE_SHL1VERSIONMAP): $(SHL1OBJS) $(SHL1LIBS)
142 .ENDIF
144 $(USE_SHL1VERSIONMAP): $(SHL1VERSIONMAP)
145 @@-$(RM) -f $@
146 # The following files will only be generated and needed on Mac OS X as temporary files
147 # in order to generate exported symbols list out of Linux/Solaris map files
148 .IF "$(OS)"=="MACOSX"
149 @-$(RM) -f $@.symregexp >& $(NULLDEV)
150 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
151 .ENDIF
152 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
153 # happens if somebody will change it in the future
154 .IF "$(COMID)"=="gcc3"
155 tr -d "\015" < $(SHL1VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
156 .ELIF "$(COMNAME)"=="sunpro5"
157 tr -d "\015" < $(SHL1VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
158 .ELSE # "$(COMID)"=="gcc3"
159 tr -d "\015" < $(SHL1VERSIONMAP) > $@
160 .ENDIF # "$(COMID)"=="gcc3"
161 @chmod a+w $@
162 # Mac OS X post-processing generate an exported symbols list from the generated map file
163 # for details on exported symbols list see man ld on Mac OS X
164 .IF "$(OS)"=="MACOSX"
165 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
166 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
167 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
168 # Extract RTTI symbols from all the objects that will be used to build a shared library
169 .IF "$(SHL1OBJS)"!=""
170 -echo $(foreach,i,$(SHL1OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
171 .ENDIF
172 .IF "$(SHL1LIBS)"!=""
173 -$(TYPE) $(foreach,j,$(SHL1LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
174 .ENDIF
175 # overwrite the map file generate into the local output tree with the generated
176 # exported symbols list
177 cp $@.exported-symbols $@
178 .ENDIF # .IF "$(OS)"=="MACOSX"
179 .ENDIF # "$(SHL1VERSIONMAP)"!=""
180 .ENDIF # "$(USE_SHL1VERSIONMAP)"!=""
181 .ENDIF # "$(GUI)" != "UNX"
183 .IF "$(UNIXVERSIONNAMES)"!=""
184 .IF "$(OS)"!="MACOSX"
185 .IF "$(GUI)"=="UNX"
186 .IF "$(OS)"=="IRIX"
187 SHL1SONAME=$(SONAME_SWITCH)$(SHL1TARGETN:f)
188 .ELSE
189 SHL1SONAME=\"$(SONAME_SWITCH)$(SHL1TARGETN:f)\"
190 .ENDIF
191 .ENDIF # "$(GUI)"!="UNX"
192 .ENDIF # "$(OS)"!="MACOSX"
193 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
195 .IF "$(SHL1RES)"!=""
196 SHL1ALLRES+=$(SHL1RES)
197 SHL1LINKRES*=$(MISC)/$(SHL1TARGET).res
198 SHL1LINKRESO*=$(MISC)/$(SHL1TARGET)_res.o
199 .ENDIF # "$(SHL1RES)"!=""
201 .IF "$(SHL1DEFAULTRES)$(use_shl_versions)"!=""
202 SHL1DEFAULTRES*=$(MISC)/$(SHL1TARGET)_def.res
203 SHL1ALLRES+=$(SHL1DEFAULTRES)
204 SHL1LINKRES*=$(MISC)/$(SHL1TARGET).res
205 SHL1LINKRESO*=$(MISC)/$(SHL1TARGET)_res.o
206 .ENDIF # "$(SHL1DEFAULTRES)$(use_shl_versions)"!=""
208 #.IF "$(SHL1TARGETN)"!=""
210 .IF "$(linkinc)"!=""
211 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
212 .IF "$(SHL1LIBS)"!=""
213 $(MISC)/$(SHL1TARGET)_linkinc.ls .PHONY:
214 @@-$(RM) $@
215 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL1LIBS) $(i:s/.lib/.lin/)) >> $@
216 .ENDIF # "$(SHL1LIBS)"!=""
217 .ENDIF
219 LINKINCTARGETS+=$(MISC)/$(SHL1TARGETN:b)_linkinc.ls
220 $(SHL1TARGETN) : $(LINKINCTARGETS)
222 .ELSE
223 .IF "$(SHL1USE_EXPORTS)"=="name"
224 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
225 .IF "$(COM)"!="GCC"
226 .IF "$(SHL1LIBS)"!=""
227 SHL1LINKLIST=$(MISC)/$(SHL1TARGET)_link.lst
228 SHL1LINKLISTPARAM=@$(SHL1LINKLIST)
229 $(SHL1LINKLIST) : $(SHL1LIBS)
230 @@-$(RM) $@
231 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL1LIBS) $(i:s/.lib/.lin/)) >> $@
232 .ENDIF # "$(SHL1LIBS)"!=""
233 .ENDIF # "$(COM)"!="GCC"
234 .ENDIF
235 .ENDIF # "$(SHL1USE_EXPORTS)"=="name"
237 $(MISC)/%linkinc.ls:
238 echo . > $@
239 .ENDIF # "$(linkinc)"!=""
241 .IF "$(GUI)" == "OS2"
242 #21/02/2006 YD dll names must be 8.3, invoke fix script
243 #check osl/os2/module.c/osl_loadModule()
244 SHL1TARGET8=$(shell @fix_shl $(SHL1TARGET))
245 .ENDIF
247 .IF "$(GUI)" == "OS2"
248 _SHL1IMP_ORD = $(SHL1STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL1STDLIBS:^"$(LB)/")
249 SHL1IMP_ORD = $(foreach,i,$(_SHL1IMP_ORD) $(shell @-ls $i))
250 .ELSE
251 SHL1IMP_ORD =
252 .ENDIF
255 $(SHL1TARGETN) : \
256 $(SHL1OBJS)\
257 $(SHL1LIBS)\
258 $(USE_1IMPLIB_DEPS)\
259 $(USE_SHL1DEF)\
260 $(USE_SHL1VERSIONMAP)\
261 $(SHL1RES)\
262 $(SHL1DEPN) \
263 $(SHL1IMP_ORD) \
264 $(SHL1LINKLIST)
265 @echo ------------------------------
266 @echo Making: $(SHL1TARGETN)
267 .IF "$(GUI)" == "WNT"
268 .IF "$(SHL1DEFAULTRES)"!=""
269 @@-$(RM) $(MISC)/$(SHL1DEFAULTRES:b).rc
270 .IF "$(SHL1ICON)" != ""
271 @echo 1 ICON $(SHL1ICON) >> $(MISC)/$(SHL1DEFAULTRES:b).rc
272 .ENDIF
273 .IF "$(use_shl_versions)" != ""
274 .IF "$(SHL1ADD_VERINFO)"!=""
275 @echo $(EMQ)#include $(EMQ)"$(SHL1ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL1DEFAULTRES:b).rc
276 .ELSE # "$(SHL1ADD_VERINFO)"!=""
277 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL1DEFAULTRES:b).rc
278 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL1DEFAULTRES:b).rc
279 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL1DEFAULTRES:b).rc
280 .ENDIF # "$(SHL1ADD_VERINFO)"!=""
281 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL1DEFAULTRES:b).rc
282 @echo $(EMQ)#define ORG_NAME $(SHL1TARGET)$(DLLPOST) >> $(MISC)/$(SHL1DEFAULTRES:b).rc
283 @echo $(EMQ)#define INTERNAL_NAME $(SHL1TARGET:b) >> $(MISC)/$(SHL1DEFAULTRES:b).rc
284 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL1DEFAULTRES:b).rc
285 .ENDIF # "$(use_shl_versions)" != ""
286 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL1DEFAULTRES:b).rc
287 .ENDIF # "$(SHL1DEFAULTRES)"!=""
288 .IF "$(SHL1ALLRES)"!=""
289 $(TYPE) $(SHL1ALLRES) > $(SHL1LINKRES)
290 .IF "$(COM)"=="GCC"
291 windres $(SHL1LINKRES) $(SHL1LINKRESO)
292 .ENDIF # "$(COM)"=="GCC"
293 .ENDIF # "$(SHL1ALLRES)"!=""
294 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
295 @echo dlltool --input-def $(SHL1DEF) \
296 --dllname $(SHL1TARGET)$(DLLPOST) \
297 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_1.cmd
298 .IF "$(DEFLIB1NAME)"!="" # do not have to include objs
299 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_1.cmd
300 .ELSE # "$(DEFLIB1NAME)"!="" # do not have to include objs
301 @echo --output-exp $(MISC)/$(@:b)_exp.o \
302 $(STDOBJ) $(SHL1OBJS) $(SHL1LINKRESO) \
303 `$(TYPE) /dev/null $(SHL1LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_1.cmd
304 .ENDIF # "$(DEFLIB1NAME)"!=""
305 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
306 $(STDOBJ) $(SHL1VERSIONOBJ) $(SHL1DESCRIPTIONOBJ) $(SHL1OBJS) $(SHL1LINKRESO) \
307 `$(TYPE) /dev/null $(SHL1LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
308 -Wl,--exclude-libs,ALL,--start-group $(SHL1STDLIBS) -Wl,--end-group \
309 $(SHL1STDSHL) $(STDSHL1) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
310 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_1.cmd
311 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_1.cmd
312 @+source $(MISC)/$(TARGET).$(@:b)_1.cmd
313 .ELSE
314 .IF "$(linkinc)"==""
315 .IF "$(SHL1USE_EXPORTS)"!="name"
316 .IF "$(USE_DEFFILE)"!=""
317 $(SHL1LINKER) @$(mktmp \
318 $(SHL1LINKFLAGS) \
319 $(LINKFLAGSSHL) \
320 $(SHL1STACK) $(SHL1BASEX) \
321 -out:$@ \
322 -map:$(MISC)/$(@:b).map \
323 -def:$(SHL1DEF) \
324 $(USE_1IMPLIB) \
325 $(STDOBJ) \
326 $(SHL1VERSIONOBJ) $(SHL1OBJS) \
327 $(SHL1LIBS) \
328 $(SHL1STDLIBS) \
329 $(SHL1STDSHL) $(STDSHL1) \
330 $(SHL1LINKRES) \
331 ) $(LINKOUTPUTFILTER)
332 # double check if target was really written... still making sense?
333 @@$(LS) $@
334 @echo linking $@.manifest ...
335 .IF "$(VISTA_MANIFEST)"!=""
336 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
337 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
338 .ELSE
339 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
340 .ENDIF # "$(VISTA_MANIFEST)"!=""
341 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
342 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
343 .ELSE # "$(USE_DEFFILE)"!=""
344 $(SHL1LINKER) @$(mktmp $(SHL1LINKFLAGS) \
345 $(LINKFLAGSSHL) $(SHL1BASEX) \
346 $(SHL1STACK) -out:$(SHL1TARGETN) \
347 -map:$(MISC)/$(@:B).map \
348 $(LB)/$(SHL1IMPLIB).exp \
349 $(STDOBJ) \
350 $(SHL1OBJS) $(SHL1VERSIONOBJ) \
351 $(SHL1LIBS) \
352 $(SHL1STDLIBS) \
353 $(SHL1STDSHL) $(STDSHL1) \
354 $(SHL1LINKRES) \
355 ) $(LINKOUTPUTFILTER)
356 # double check if target was really written... still making sense?
357 @@$(LS) $@
358 @echo linking $@.manifest ...
359 .IF "$(VISTA_MANIFEST)"!=""
360 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
361 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
362 .ELSE
363 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
364 .ENDIF # "$(VISTA_MANIFEST)"!=""
365 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
366 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
367 .ENDIF # "$(USE_DEFFILE)"!=""
368 .ELSE # "$(SHL1USE_EXPORTS)"!="name"
369 $(SHL1LINKER) @$(mktmp $(SHL1LINKFLAGS) \
370 $(LINKFLAGSSHL) $(SHL1BASEX) \
371 $(SHL1STACK) -out:$(SHL1TARGETN) \
372 -map:$(MISC)/$(@:B).map \
373 $(USE_1IMPLIB) \
374 $(STDOBJ) \
375 $(SHL1OBJS) $(SHL1VERSIONOBJ)) \
376 $(SHL1LINKLISTPARAM) \
377 @$(mktmp $(SHL1STDLIBS) \
378 $(SHL1STDSHL) $(STDSHL1) \
379 $(SHL1LINKRES) \
381 @echo linking $@.manifest ...
382 .IF "$(VISTA_MANIFEST)"!=""
383 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
384 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
385 .ELSE
386 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
387 .ENDIF # "$(VISTA_MANIFEST)"!=""
388 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
389 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
390 .ENDIF # "$(SHL1USE_EXPORTS)"!="name"
391 .ELSE # "$(linkinc)"==""
392 -$(RM) del $(MISC)/$(SHL1TARGET).lnk
393 -$(RM) $(MISC)/$(SHL1TARGET).lst
394 $(TYPE) $(mktmp \
395 $(SHL1LINKFLAGS) \
396 $(LINKFLAGSSHL) $(SHL1BASEX) \
397 $(SHL1STACK) $(MAPFILE) \
398 -out:$@ \
399 $(LB)/$(SHL1IMPLIB).exp \
400 $(STDOBJ) \
401 $(SHL1OBJS) \
402 $(SHL1STDLIBS) \
403 $(SHL1STDSHL) $(STDSHL1) \
404 $(SHL1LINKRES) \
405 ) >> $(MISC)/$(SHL1TARGET).lnk
406 $(TYPE) $(MISC)/$(SHL1TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL1TARGET).lnk
407 $(SHL1LINKER) @$(MISC)/$(SHL1TARGET).lnk
408 @echo linking $@.manifest ...
409 .IF "$(VISTA_MANIFEST)"!=""
410 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
411 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
412 .ELSE
413 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
414 .ENDIF # "$(VISTA_MANIFEST)"!=""
415 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
416 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
417 .ENDIF # "$(linkinc)"==""
418 .ENDIF # "$(COM)"=="GCC"
419 .ENDIF # "$(GUI)" == "WNT"
420 .IF "$(GUI)"=="UNX"
421 .IF "$(OS)"=="MACOSX"
422 @-$(RM) $(MISC)/$(@:b).list
423 @-$(RM) $(MISC)/$(TARGET).$(@:b)_1.cmd
424 @echo $(STDSLO) $(SHL1OBJS:s/.obj/.o/) \
425 $(SHL1VERSIONOBJ) \
426 `cat /dev/null $(SHL1LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
427 @echo -n $(SHL1LINKER) $(SHL1LINKFLAGS) $(SHL1VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
428 $(SHL1STDLIBS) $(SHL1ARCHIVES) $(SHL1STDSHL) $(STDSHL1) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_1.cmd
429 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
430 `cat $(MISC)/$(TARGET).$(@:b)_1.cmd` \
431 >> $(MISC)/$(TARGET).$(@:b)_1.cmd
432 @cat $(MISC)/$(TARGET).$(@:b)_1.cmd
433 @+source $(MISC)/$(TARGET).$(@:b)_1.cmd
434 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
435 shl $(SHL1RPATH) $@
436 @echo "Making: $@.jnilib"
437 @macosx-create-bundle $@
438 .IF "$(UPDATER)"=="YES"
439 .IF "$(SHL1NOCHECK)"==""
440 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS1) $(SHL1TARGETN)
441 .ENDIF # "$(SHL1NOCHECK)"!=""
442 .ENDIF
443 .ELSE # "$(OS)"=="MACOSX"
444 @-$(RM) $(MISC)/$(TARGET).$(@:b)_1.cmd
445 @echo $(SHL1LINKER) $(SHL1LINKFLAGS) $(SHL1SONAME) $(LINKFLAGSSHL) $(SHL1VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL1OBJS:s/.obj/.o/) \
446 $(SHL1VERSIONOBJ) -o $@ \
447 `cat /dev/null $(SHL1LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
448 $(SHL1STDLIBS) $(SHL1ARCHIVES) $(SHL1STDSHL) $(STDSHL1) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_1.cmd
449 @cat $(MISC)/$(TARGET).$(@:b)_1.cmd
450 @+source $(MISC)/$(TARGET).$(@:b)_1.cmd
451 .IF "$(UPDATER)"=="YES"
452 .IF "$(SHL1NOCHECK)"==""
453 -$(RM) $(SHL1TARGETN:d)check_$(SHL1TARGETN:f)
454 $(RENAME) $(SHL1TARGETN) $(SHL1TARGETN:d)check_$(SHL1TARGETN:f)
455 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS1) $(SHL1TARGETN:d)check_$(SHL1TARGETN:f)
456 .ENDIF # "$(SHL1NOCHECK)"!=""
457 .ENDIF # "$(UPDATER)"=="YES"
458 .ENDIF # "$(OS)"=="MACOSX"
459 .IF "$(UNIXVERSIONNAMES)"!=""
460 $(RM) $(LB)/$(SHL1TARGETN:b)
461 cd $(LB) && ln -s $(SHL1TARGETN:f) $(SHL1TARGETN:b)
462 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
463 @ls -l $@
464 .ENDIF # "$(GUI)" == "UNX"
466 .IF "$(GUI)" == "OS2"
468 .IF "$(SHL1DEFAULTRES)"!=""
469 @+-$(RM) $(MISC)/$(SHL1DEFAULTRES:b).rc >& $(NULLDEV)
470 .IF "$(SHL1ICON)" != ""
471 @-+echo 1 ICON $(SHL1ICON) >> $(MISC)/$(SHL1DEFAULTRES:b).rc
472 .ENDIF
473 .IF "$(use_shl_versions)" != ""
474 .IF "$(SHL1ADD_VERINFO)"!=""
475 @-+echo $(EMQ)#include $(EMQ)"$(SHL1ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL1DEFAULTRES:b).rc
476 .ENDIF # "$(SHL1ADD_VERINFO)"!=""
477 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL1DEFAULTRES:b).rc
478 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL1DEFAULTRES:b).rc
479 .ENDIF # "$(use_shl_versions)" != ""
480 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
481 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL1DEFAULTRES:b).rc
482 .ENDIF # "$(SHL1DEFAULTRES)"!=""
484 .IF "$(SHL1ALLRES)"!=""
485 +$(TYPE) $(SHL1ALLRES) > $(SHL1LINKRES)
486 .ENDIF # "$(SHL1ALLRES)"!=""
488 .IF "$(USE_DEFFILE)"!=""
490 $(SHL1LINKER) $(SHL1LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
491 $(SHL1DEF) \
492 $(STDOBJ) \
493 -L$(LB) \
494 -L$(SOLARVERSION)/$(INPATH)/lib \
495 $(SHL1OBJS) $(SHL1VERSIONOBJ) \
496 $(SHL1LIBS) \
497 $(SHL1STDLIBS:^"-l") \
498 $(SHL1LINKRES) \
499 $(SHL1STDSHL:^"-l") $(STDSHL1:^"-l")
501 .ELSE # "$(USE_DEFFILE)"!=""
503 $(SHL1LINKER) -v $(SHL1LINKFLAGS) \
504 $(LINKFLAGSSHL) $(SHL1BASEX) \
505 $(SHL1STACK) -o $(SHL1TARGETN) \
506 $(SHL1DEF) \
507 $(STDOBJ) \
508 -L$(LB) \
509 -L$(SOLARVERSION)/$(INPATH)/lib \
510 $(SHL1OBJS) $(SHL1VERSIONOBJ) \
511 $(SHL1LIBS) \
512 $(SHL1STDLIBS:^"-l") \
513 $(SHL1LINKRES) \
514 $(SHL1STDSHL:^"-l") $(STDSHL1:^"-l") \
515 $(LINKOUTPUTFILTER)
516 @$(LS) $@ >& $(NULLDEV)
518 .ENDIF # "$(USE_DEFFILE)"!=""
520 .IF "$(SHL1TARGET8)" != "$(SHL1TARGET)"
521 +$(COPY) $@ $(@:d)$(SHL1TARGET8).dll
522 .ENDIF
524 .ENDIF # "$(GUI)" == "OS2"
527 .IF "$(TESTDIR)"!=""
528 .IF "$(NO_TESTS)"==""
530 ALLTAR : runtest_$(SHL1TARGET)
532 runtest_$(SHL1TARGET) : $(SHL1TARGETN)
533 testshl $(SHL1TARGETN) sce/$(SHL1TARGET).sce -msg -skip
534 .ENDIF # "$(NO_TESTS)"==""
535 .ENDIF # "$(TESTDIR)"!=""
536 .ENDIF # "$(SHL1TARGETN)"!=""
538 # unroll begin
540 .IF "$(SHL2TARGETN)"!=""
542 .IF "$(OS)"=="AIX"
543 SHL2STDLIBS=
544 .ENDIF
546 .IF "$(SHLLINKARCONLY)" != ""
547 SHL2STDLIBS=
548 STDSHL=
549 .ELSE
550 SHL2ARCHIVES=
551 .ENDIF
553 # decide how to link
554 .IF "$(SHL2CODETYPE)"=="C"
555 SHL2LINKER=$(LINKC)
556 SHL2STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
557 SHL2LINKFLAGS+=$(LINKCFLAGS)
558 .ELSE # "$(SHL2CODETYPE)"=="C"
559 SHL2LINKER=$(LINK)
560 SHL2STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
561 SHL2LINKFLAGS+=$(LINKFLAGS)
562 .ENDIF # "$(SHL2CODETYPE)"=="C"
564 SHL2RPATH*=OOO
565 LINKFLAGSRUNPATH_$(SHL2RPATH)*=/ERROR:/Bad_SHL2RPATH_value
566 SHL2LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL2RPATH))
568 .IF "$(SHL2USE_EXPORTS)"==""
569 SHL2DEF*=$(MISC)/$(SHL2TARGET).def
570 .ENDIF # "$(SHL2USE_EXPORTS)"==""
572 EXTRALIBPATHS2=$(EXTRALIBPATHS)
573 .IF "$(UPDATER)"=="YES"
574 .IF "$(SHL2NOCHECK)"==""
575 .IF "$(SOLAR_STLLIBPATH)"!=""
576 EXTRALIBPATHS2+=-L$(SOLAR_STLLIBPATH)
577 .ENDIF
578 .ENDIF # "$(SHL2NOCHECK)"!=""
579 .ENDIF
580 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
581 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
582 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
584 .IF "$(VERSIONOBJ)"!=""
585 SHL2VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL2TARGET))}$(VERSIONOBJ:f)
586 USE_VERSIONH:=$(INCCOM)/$(SHL2VERSIONOBJ:b).h
587 .IF "$(GUI)" == "UNX"
588 SHL2VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL2TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
589 .ELSE # "$(GUI)" == "UNX"
590 SHL2VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL2TARGET))}$(VERSIONOBJ:f)
591 .ENDIF # "$(GUI)" == "UNX"
592 $(MISC)/$(SHL2VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL2VERSIONOBJ:b).h
593 # $(COPY) $(SOLARENV)/src/version.c $@
594 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL2VERSIONOBJ:b).h/ > $@
596 .INIT : $(SHL2VERSIONOBJDEP)
597 .ENDIF # "$(VERSIONOBJ)"!=""
599 .IF "$(GUI)" != "UNX"
600 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
601 .IF "$(SHL2IMPLIB)" == ""
602 SHL2IMPLIB=i$(TARGET)_t2
603 .ENDIF # "$(SHL2IMPLIB)" == ""
604 .IF "$(COM)" != "GCC"
605 USE_2IMPLIB=-implib:$(LB)/$(SHL2IMPLIB).lib
606 .ENDIF # "$(COM)" != "GCC"
607 SHL2IMPLIBN=$(LB)/$(SHL2IMPLIB).lib
608 ALLTAR : $(SHL2IMPLIBN)
610 .IF "$(USE_DEFFILE)"==""
611 USE_2IMPLIB_DEPS=$(LB)/$(SHL2IMPLIB).lib
612 .ENDIF # "$(USE_DEFFILE)"==""
613 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
614 USE_SHL2DEF=$(SHL2DEF)
615 .ELSE # "$(GUI)" != "UNX"
616 USE_SHL2DEF=
617 SHL2DEPN+:=$(SHL2DEPNU)
619 .IF "$(SHL2VERSIONMAP)"==""
620 # to activate vmaps remove "#"
621 USE_SHL2VERSIONMAP=$(MISC)/$(SHL2TARGET).vmap
622 .ENDIF # "$(SHL2VERSIONMAP)"==""
624 .IF "$(USE_SHL2VERSIONMAP)"!=""
626 .IF "$(SHL2FILTERFILE)"!=""
627 .IF "$(SHL2VERSIONMAP)"!=""
628 #eine von beiden ist zuviel
629 USE_SHL2VERSIONMAP=$(MISC)/$(SHL2TARGET).vmap
630 $(USE_SHL2VERSIONMAP) .PHONY:
631 @echo -----------------------------
632 @echo you should only use versionmap OR exportfile
633 @echo -----------------------------
634 # force_dmake_to_error
636 .ENDIF # "$(SHL2VERSIONMAP)"!=""
638 .IF "$(OS)"!="IRIX"
639 SHL2VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL2VERSIONMAP)
640 .ENDIF
642 $(USE_SHL2VERSIONMAP): \
643 $(SHL2OBJS)\
644 $(SHL2LIBS)\
645 $(SHL2FILTERFILE)
646 @$(RM) $@.dump
647 .IF "$(SHL2OBJS)"!=""
648 # dump remaining objects on the fly
649 .IF "$(OS)"=="MACOSX"
650 @-nm $(SHL2OBJS:s/.obj/.o/) > $@.dump
651 .ELSE
652 @nm $(SHL2OBJS:s/.obj/.o/) > $@.dump
653 .ENDIF
654 .ENDIF # "$(SHL2OBJS)!"=""
655 @$(TYPE) /dev/null $(SHL2LIBS:s/.lib/.dump/) >> $@.dump
656 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL2INTERFACE) -f $(SHL2FILTERFILE) -m $@
658 .ELSE # "$(SHL2FILTERFILE)"!=""
659 USE_SHL2VERSIONMAP=$(MISC)/$(SHL2TARGET).vmap
660 $(USE_SHL2VERSIONMAP) :
661 @echo -----------------------------
662 @echo SHL2FILTERFILE not set!
663 @echo -----------------------------
664 @$(TOUCH) $@
665 @echo dummy file to keep the dependencies for later use.
666 # force_dmake_to_error
667 .ENDIF # "$(SHL2FILTERFILE)"!=""
668 .ELSE # "$(USE_SHL2VERSIONMAP)"!=""
670 #and now for the plain non-generic way...
671 .IF "$(SHL2VERSIONMAP)"!=""
672 USE_SHL2VERSIONMAP=$(MISC)/$(SHL2VERSIONMAP:b)_$(SHL2TARGET)$(SHL2VERSIONMAP:e)
673 .IF "$(OS)"!="IRIX"
674 SHL2VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL2VERSIONMAP)
675 .ENDIF
677 .IF "$(OS)"=="MACOSX"
678 $(USE_SHL2VERSIONMAP): $(SHL2OBJS) $(SHL2LIBS)
679 .ENDIF
681 $(USE_SHL2VERSIONMAP): $(SHL2VERSIONMAP)
682 @@-$(RM) -f $@
683 # The following files will only be generated and needed on Mac OS X as temporary files
684 # in order to generate exported symbols list out of Linux/Solaris map files
685 .IF "$(OS)"=="MACOSX"
686 @-$(RM) -f $@.symregexp >& $(NULLDEV)
687 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
688 .ENDIF
689 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
690 # happens if somebody will change it in the future
691 .IF "$(COMID)"=="gcc3"
692 tr -d "\015" < $(SHL2VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
693 .ELIF "$(COMNAME)"=="sunpro5"
694 tr -d "\015" < $(SHL2VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
695 .ELSE # "$(COMID)"=="gcc3"
696 tr -d "\015" < $(SHL2VERSIONMAP) > $@
697 .ENDIF # "$(COMID)"=="gcc3"
698 @chmod a+w $@
699 # Mac OS X post-processing generate an exported symbols list from the generated map file
700 # for details on exported symbols list see man ld on Mac OS X
701 .IF "$(OS)"=="MACOSX"
702 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
703 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
704 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
705 # Extract RTTI symbols from all the objects that will be used to build a shared library
706 .IF "$(SHL2OBJS)"!=""
707 -echo $(foreach,i,$(SHL2OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
708 .ENDIF
709 .IF "$(SHL2LIBS)"!=""
710 -$(TYPE) $(foreach,j,$(SHL2LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
711 .ENDIF
712 # overwrite the map file generate into the local output tree with the generated
713 # exported symbols list
714 cp $@.exported-symbols $@
715 .ENDIF # .IF "$(OS)"=="MACOSX"
716 .ENDIF # "$(SHL2VERSIONMAP)"!=""
717 .ENDIF # "$(USE_SHL2VERSIONMAP)"!=""
718 .ENDIF # "$(GUI)" != "UNX"
720 .IF "$(UNIXVERSIONNAMES)"!=""
721 .IF "$(OS)"!="MACOSX"
722 .IF "$(GUI)"=="UNX"
723 .IF "$(OS)"=="IRIX"
724 SHL2SONAME=$(SONAME_SWITCH)$(SHL2TARGETN:f)
725 .ELSE
726 SHL2SONAME=\"$(SONAME_SWITCH)$(SHL2TARGETN:f)\"
727 .ENDIF
728 .ENDIF # "$(GUI)"!="UNX"
729 .ENDIF # "$(OS)"!="MACOSX"
730 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
732 .IF "$(SHL2RES)"!=""
733 SHL2ALLRES+=$(SHL2RES)
734 SHL2LINKRES*=$(MISC)/$(SHL2TARGET).res
735 SHL2LINKRESO*=$(MISC)/$(SHL2TARGET)_res.o
736 .ENDIF # "$(SHL2RES)"!=""
738 .IF "$(SHL2DEFAULTRES)$(use_shl_versions)"!=""
739 SHL2DEFAULTRES*=$(MISC)/$(SHL2TARGET)_def.res
740 SHL2ALLRES+=$(SHL2DEFAULTRES)
741 SHL2LINKRES*=$(MISC)/$(SHL2TARGET).res
742 SHL2LINKRESO*=$(MISC)/$(SHL2TARGET)_res.o
743 .ENDIF # "$(SHL2DEFAULTRES)$(use_shl_versions)"!=""
745 #.IF "$(SHL2TARGETN)"!=""
747 .IF "$(linkinc)"!=""
748 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
749 .IF "$(SHL2LIBS)"!=""
750 $(MISC)/$(SHL2TARGET)_linkinc.ls .PHONY:
751 @@-$(RM) $@
752 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL2LIBS) $(i:s/.lib/.lin/)) >> $@
753 .ENDIF # "$(SHL2LIBS)"!=""
754 .ENDIF
756 LINKINCTARGETS+=$(MISC)/$(SHL2TARGETN:b)_linkinc.ls
757 $(SHL2TARGETN) : $(LINKINCTARGETS)
759 .ELSE
760 .IF "$(SHL2USE_EXPORTS)"=="name"
761 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
762 .IF "$(COM)"!="GCC"
763 .IF "$(SHL2LIBS)"!=""
764 SHL2LINKLIST=$(MISC)/$(SHL2TARGET)_link.lst
765 SHL2LINKLISTPARAM=@$(SHL2LINKLIST)
766 $(SHL2LINKLIST) : $(SHL2LIBS)
767 @@-$(RM) $@
768 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL2LIBS) $(i:s/.lib/.lin/)) >> $@
769 .ENDIF # "$(SHL2LIBS)"!=""
770 .ENDIF # "$(COM)"!="GCC"
771 .ENDIF
772 .ENDIF # "$(SHL2USE_EXPORTS)"=="name"
774 $(MISC)/%linkinc.ls:
775 echo . > $@
776 .ENDIF # "$(linkinc)"!=""
778 .IF "$(GUI)" == "OS2"
779 #21/02/2006 YD dll names must be 8.3, invoke fix script
780 #check osl/os2/module.c/osl_loadModule()
781 SHL2TARGET8=$(shell @fix_shl $(SHL2TARGET))
782 .ENDIF
784 .IF "$(GUI)" == "OS2"
785 _SHL2IMP_ORD = $(SHL2STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL2STDLIBS:^"$(LB)/")
786 SHL2IMP_ORD = $(foreach,i,$(_SHL2IMP_ORD) $(shell @-ls $i))
787 .ELSE
788 SHL2IMP_ORD =
789 .ENDIF
792 $(SHL2TARGETN) : \
793 $(SHL2OBJS)\
794 $(SHL2LIBS)\
795 $(USE_2IMPLIB_DEPS)\
796 $(USE_SHL2DEF)\
797 $(USE_SHL2VERSIONMAP)\
798 $(SHL2RES)\
799 $(SHL2DEPN) \
800 $(SHL2IMP_ORD) \
801 $(SHL2LINKLIST)
802 @echo ------------------------------
803 @echo Making: $(SHL2TARGETN)
804 .IF "$(GUI)" == "WNT"
805 .IF "$(SHL2DEFAULTRES)"!=""
806 @@-$(RM) $(MISC)/$(SHL2DEFAULTRES:b).rc
807 .IF "$(SHL2ICON)" != ""
808 @echo 1 ICON $(SHL2ICON) >> $(MISC)/$(SHL2DEFAULTRES:b).rc
809 .ENDIF
810 .IF "$(use_shl_versions)" != ""
811 .IF "$(SHL2ADD_VERINFO)"!=""
812 @echo $(EMQ)#include $(EMQ)"$(SHL2ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL2DEFAULTRES:b).rc
813 .ELSE # "$(SHL2ADD_VERINFO)"!=""
814 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL2DEFAULTRES:b).rc
815 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL2DEFAULTRES:b).rc
816 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL2DEFAULTRES:b).rc
817 .ENDIF # "$(SHL2ADD_VERINFO)"!=""
818 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL2DEFAULTRES:b).rc
819 @echo $(EMQ)#define ORG_NAME $(SHL2TARGET)$(DLLPOST) >> $(MISC)/$(SHL2DEFAULTRES:b).rc
820 @echo $(EMQ)#define INTERNAL_NAME $(SHL2TARGET:b) >> $(MISC)/$(SHL2DEFAULTRES:b).rc
821 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL2DEFAULTRES:b).rc
822 .ENDIF # "$(use_shl_versions)" != ""
823 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL2DEFAULTRES:b).rc
824 .ENDIF # "$(SHL2DEFAULTRES)"!=""
825 .IF "$(SHL2ALLRES)"!=""
826 $(TYPE) $(SHL2ALLRES) > $(SHL2LINKRES)
827 .IF "$(COM)"=="GCC"
828 windres $(SHL2LINKRES) $(SHL2LINKRESO)
829 .ENDIF # "$(COM)"=="GCC"
830 .ENDIF # "$(SHL2ALLRES)"!=""
831 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
832 @echo dlltool --input-def $(SHL2DEF) \
833 --dllname $(SHL2TARGET)$(DLLPOST) \
834 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_2.cmd
835 .IF "$(DEFLIB2NAME)"!="" # do not have to include objs
836 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_2.cmd
837 .ELSE # "$(DEFLIB2NAME)"!="" # do not have to include objs
838 @echo --output-exp $(MISC)/$(@:b)_exp.o \
839 $(STDOBJ) $(SHL2OBJS) $(SHL2LINKRESO) \
840 `$(TYPE) /dev/null $(SHL2LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_2.cmd
841 .ENDIF # "$(DEFLIB2NAME)"!=""
842 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
843 $(STDOBJ) $(SHL2VERSIONOBJ) $(SHL2DESCRIPTIONOBJ) $(SHL2OBJS) $(SHL2LINKRESO) \
844 `$(TYPE) /dev/null $(SHL2LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
845 -Wl,--exclude-libs,ALL,--start-group $(SHL2STDLIBS) -Wl,--end-group \
846 $(SHL2STDSHL) $(STDSHL2) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
847 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_2.cmd
848 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_2.cmd
849 @+source $(MISC)/$(TARGET).$(@:b)_2.cmd
850 .ELSE
851 .IF "$(linkinc)"==""
852 .IF "$(SHL2USE_EXPORTS)"!="name"
853 .IF "$(USE_DEFFILE)"!=""
854 $(SHL2LINKER) @$(mktmp \
855 $(SHL2LINKFLAGS) \
856 $(LINKFLAGSSHL) \
857 $(SHL2STACK) $(SHL2BASEX) \
858 -out:$@ \
859 -map:$(MISC)/$(@:b).map \
860 -def:$(SHL2DEF) \
861 $(USE_2IMPLIB) \
862 $(STDOBJ) \
863 $(SHL2VERSIONOBJ) $(SHL2OBJS) \
864 $(SHL2LIBS) \
865 $(SHL2STDLIBS) \
866 $(SHL2STDSHL) $(STDSHL2) \
867 $(SHL2LINKRES) \
868 ) $(LINKOUTPUTFILTER)
869 # double check if target was really written... still making sense?
870 @@$(LS) $@
871 @echo linking $@.manifest ...
872 .IF "$(VISTA_MANIFEST)"!=""
873 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
874 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
875 .ELSE
876 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
877 .ENDIF # "$(VISTA_MANIFEST)"!=""
878 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
879 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
880 .ELSE # "$(USE_DEFFILE)"!=""
881 $(SHL2LINKER) @$(mktmp $(SHL2LINKFLAGS) \
882 $(LINKFLAGSSHL) $(SHL2BASEX) \
883 $(SHL2STACK) -out:$(SHL2TARGETN) \
884 -map:$(MISC)/$(@:B).map \
885 $(LB)/$(SHL2IMPLIB).exp \
886 $(STDOBJ) \
887 $(SHL2OBJS) $(SHL2VERSIONOBJ) \
888 $(SHL2LIBS) \
889 $(SHL2STDLIBS) \
890 $(SHL2STDSHL) $(STDSHL2) \
891 $(SHL2LINKRES) \
892 ) $(LINKOUTPUTFILTER)
893 # double check if target was really written... still making sense?
894 @@$(LS) $@
895 @echo linking $@.manifest ...
896 .IF "$(VISTA_MANIFEST)"!=""
897 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
898 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
899 .ELSE
900 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
901 .ENDIF # "$(VISTA_MANIFEST)"!=""
902 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
903 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
904 .ENDIF # "$(USE_DEFFILE)"!=""
905 .ELSE # "$(SHL2USE_EXPORTS)"!="name"
906 $(SHL2LINKER) @$(mktmp $(SHL2LINKFLAGS) \
907 $(LINKFLAGSSHL) $(SHL2BASEX) \
908 $(SHL2STACK) -out:$(SHL2TARGETN) \
909 -map:$(MISC)/$(@:B).map \
910 $(USE_2IMPLIB) \
911 $(STDOBJ) \
912 $(SHL2OBJS) $(SHL2VERSIONOBJ)) \
913 $(SHL2LINKLISTPARAM) \
914 @$(mktmp $(SHL2STDLIBS) \
915 $(SHL2STDSHL) $(STDSHL2) \
916 $(SHL2LINKRES) \
918 @echo linking $@.manifest ...
919 .IF "$(VISTA_MANIFEST)"!=""
920 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
921 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
922 .ELSE
923 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
924 .ENDIF # "$(VISTA_MANIFEST)"!=""
925 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
926 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
927 .ENDIF # "$(SHL2USE_EXPORTS)"!="name"
928 .ELSE # "$(linkinc)"==""
929 -$(RM) del $(MISC)/$(SHL2TARGET).lnk
930 -$(RM) $(MISC)/$(SHL2TARGET).lst
931 $(TYPE) $(mktmp \
932 $(SHL2LINKFLAGS) \
933 $(LINKFLAGSSHL) $(SHL2BASEX) \
934 $(SHL2STACK) $(MAPFILE) \
935 -out:$@ \
936 $(LB)/$(SHL2IMPLIB).exp \
937 $(STDOBJ) \
938 $(SHL2OBJS) \
939 $(SHL2STDLIBS) \
940 $(SHL2STDSHL) $(STDSHL2) \
941 $(SHL2LINKRES) \
942 ) >> $(MISC)/$(SHL2TARGET).lnk
943 $(TYPE) $(MISC)/$(SHL2TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL2TARGET).lnk
944 $(SHL2LINKER) @$(MISC)/$(SHL2TARGET).lnk
945 @echo linking $@.manifest ...
946 .IF "$(VISTA_MANIFEST)"!=""
947 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
948 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
949 .ELSE
950 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
951 .ENDIF # "$(VISTA_MANIFEST)"!=""
952 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
953 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
954 .ENDIF # "$(linkinc)"==""
955 .ENDIF # "$(COM)"=="GCC"
956 .ENDIF # "$(GUI)" == "WNT"
957 .IF "$(GUI)"=="UNX"
958 .IF "$(OS)"=="MACOSX"
959 @-$(RM) $(MISC)/$(@:b).list
960 @-$(RM) $(MISC)/$(TARGET).$(@:b)_2.cmd
961 @echo $(STDSLO) $(SHL2OBJS:s/.obj/.o/) \
962 $(SHL2VERSIONOBJ) \
963 `cat /dev/null $(SHL2LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
964 @echo -n $(SHL2LINKER) $(SHL2LINKFLAGS) $(SHL2VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
965 $(SHL2STDLIBS) $(SHL2ARCHIVES) $(SHL2STDSHL) $(STDSHL2) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_2.cmd
966 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
967 `cat $(MISC)/$(TARGET).$(@:b)_2.cmd` \
968 >> $(MISC)/$(TARGET).$(@:b)_2.cmd
969 @cat $(MISC)/$(TARGET).$(@:b)_2.cmd
970 @+source $(MISC)/$(TARGET).$(@:b)_2.cmd
971 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
972 shl $(SHL2RPATH) $@
973 @echo "Making: $@.jnilib"
974 @macosx-create-bundle $@
975 .IF "$(UPDATER)"=="YES"
976 .IF "$(SHL2NOCHECK)"==""
977 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS2) $(SHL2TARGETN)
978 .ENDIF # "$(SHL2NOCHECK)"!=""
979 .ENDIF
980 .ELSE # "$(OS)"=="MACOSX"
981 @-$(RM) $(MISC)/$(TARGET).$(@:b)_2.cmd
982 @echo $(SHL2LINKER) $(SHL2LINKFLAGS) $(SHL2SONAME) $(LINKFLAGSSHL) $(SHL2VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL2OBJS:s/.obj/.o/) \
983 $(SHL2VERSIONOBJ) -o $@ \
984 `cat /dev/null $(SHL2LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
985 $(SHL2STDLIBS) $(SHL2ARCHIVES) $(SHL2STDSHL) $(STDSHL2) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_2.cmd
986 @cat $(MISC)/$(TARGET).$(@:b)_2.cmd
987 @+source $(MISC)/$(TARGET).$(@:b)_2.cmd
988 .IF "$(UPDATER)"=="YES"
989 .IF "$(SHL2NOCHECK)"==""
990 -$(RM) $(SHL2TARGETN:d)check_$(SHL2TARGETN:f)
991 $(RENAME) $(SHL2TARGETN) $(SHL2TARGETN:d)check_$(SHL2TARGETN:f)
992 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS2) $(SHL2TARGETN:d)check_$(SHL2TARGETN:f)
993 .ENDIF # "$(SHL2NOCHECK)"!=""
994 .ENDIF # "$(UPDATER)"=="YES"
995 .ENDIF # "$(OS)"=="MACOSX"
996 .IF "$(UNIXVERSIONNAMES)"!=""
997 $(RM) $(LB)/$(SHL2TARGETN:b)
998 cd $(LB) && ln -s $(SHL2TARGETN:f) $(SHL2TARGETN:b)
999 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
1000 @ls -l $@
1001 .ENDIF # "$(GUI)" == "UNX"
1003 .IF "$(GUI)" == "OS2"
1005 .IF "$(SHL2DEFAULTRES)"!=""
1006 @+-$(RM) $(MISC)/$(SHL2DEFAULTRES:b).rc >& $(NULLDEV)
1007 .IF "$(SHL2ICON)" != ""
1008 @-+echo 1 ICON $(SHL2ICON) >> $(MISC)/$(SHL2DEFAULTRES:b).rc
1009 .ENDIF
1010 .IF "$(use_shl_versions)" != ""
1011 .IF "$(SHL2ADD_VERINFO)"!=""
1012 @-+echo $(EMQ)#include $(EMQ)"$(SHL2ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL2DEFAULTRES:b).rc
1013 .ENDIF # "$(SHL2ADD_VERINFO)"!=""
1014 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL2DEFAULTRES:b).rc
1015 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL2DEFAULTRES:b).rc
1016 .ENDIF # "$(use_shl_versions)" != ""
1017 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
1018 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL2DEFAULTRES:b).rc
1019 .ENDIF # "$(SHL2DEFAULTRES)"!=""
1021 .IF "$(SHL2ALLRES)"!=""
1022 +$(TYPE) $(SHL2ALLRES) > $(SHL2LINKRES)
1023 .ENDIF # "$(SHL2ALLRES)"!=""
1025 .IF "$(USE_DEFFILE)"!=""
1027 $(SHL2LINKER) $(SHL2LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
1028 $(SHL2DEF) \
1029 $(STDOBJ) \
1030 -L$(LB) \
1031 -L$(SOLARVERSION)/$(INPATH)/lib \
1032 $(SHL2OBJS) $(SHL2VERSIONOBJ) \
1033 $(SHL2LIBS) \
1034 $(SHL2STDLIBS:^"-l") \
1035 $(SHL2LINKRES) \
1036 $(SHL2STDSHL:^"-l") $(STDSHL2:^"-l")
1038 .ELSE # "$(USE_DEFFILE)"!=""
1040 $(SHL2LINKER) -v $(SHL2LINKFLAGS) \
1041 $(LINKFLAGSSHL) $(SHL2BASEX) \
1042 $(SHL2STACK) -o $(SHL2TARGETN) \
1043 $(SHL2DEF) \
1044 $(STDOBJ) \
1045 -L$(LB) \
1046 -L$(SOLARVERSION)/$(INPATH)/lib \
1047 $(SHL2OBJS) $(SHL2VERSIONOBJ) \
1048 $(SHL2LIBS) \
1049 $(SHL2STDLIBS:^"-l") \
1050 $(SHL2LINKRES) \
1051 $(SHL2STDSHL:^"-l") $(STDSHL2:^"-l") \
1052 $(LINKOUTPUTFILTER)
1053 @$(LS) $@ >& $(NULLDEV)
1055 .ENDIF # "$(USE_DEFFILE)"!=""
1057 .IF "$(SHL2TARGET8)" != "$(SHL2TARGET)"
1058 +$(COPY) $@ $(@:d)$(SHL2TARGET8).dll
1059 .ENDIF
1061 .ENDIF # "$(GUI)" == "OS2"
1064 .IF "$(TESTDIR)"!=""
1065 .IF "$(NO_TESTS)"==""
1067 ALLTAR : runtest_$(SHL2TARGET)
1069 runtest_$(SHL2TARGET) : $(SHL2TARGETN)
1070 testshl $(SHL2TARGETN) sce/$(SHL2TARGET).sce -msg -skip
1071 .ENDIF # "$(NO_TESTS)"==""
1072 .ENDIF # "$(TESTDIR)"!=""
1073 .ENDIF # "$(SHL2TARGETN)"!=""
1075 # unroll begin
1077 .IF "$(SHL3TARGETN)"!=""
1079 .IF "$(OS)"=="AIX"
1080 SHL3STDLIBS=
1081 .ENDIF
1083 .IF "$(SHLLINKARCONLY)" != ""
1084 SHL3STDLIBS=
1085 STDSHL=
1086 .ELSE
1087 SHL3ARCHIVES=
1088 .ENDIF
1090 # decide how to link
1091 .IF "$(SHL3CODETYPE)"=="C"
1092 SHL3LINKER=$(LINKC)
1093 SHL3STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
1094 SHL3LINKFLAGS+=$(LINKCFLAGS)
1095 .ELSE # "$(SHL3CODETYPE)"=="C"
1096 SHL3LINKER=$(LINK)
1097 SHL3STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
1098 SHL3LINKFLAGS+=$(LINKFLAGS)
1099 .ENDIF # "$(SHL3CODETYPE)"=="C"
1101 SHL3RPATH*=OOO
1102 LINKFLAGSRUNPATH_$(SHL3RPATH)*=/ERROR:/Bad_SHL3RPATH_value
1103 SHL3LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL3RPATH))
1105 .IF "$(SHL3USE_EXPORTS)"==""
1106 SHL3DEF*=$(MISC)/$(SHL3TARGET).def
1107 .ENDIF # "$(SHL3USE_EXPORTS)"==""
1109 EXTRALIBPATHS3=$(EXTRALIBPATHS)
1110 .IF "$(UPDATER)"=="YES"
1111 .IF "$(SHL3NOCHECK)"==""
1112 .IF "$(SOLAR_STLLIBPATH)"!=""
1113 EXTRALIBPATHS3+=-L$(SOLAR_STLLIBPATH)
1114 .ENDIF
1115 .ENDIF # "$(SHL3NOCHECK)"!=""
1116 .ENDIF
1117 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1118 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
1119 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1121 .IF "$(VERSIONOBJ)"!=""
1122 SHL3VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL3TARGET))}$(VERSIONOBJ:f)
1123 USE_VERSIONH:=$(INCCOM)/$(SHL3VERSIONOBJ:b).h
1124 .IF "$(GUI)" == "UNX"
1125 SHL3VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL3TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
1126 .ELSE # "$(GUI)" == "UNX"
1127 SHL3VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL3TARGET))}$(VERSIONOBJ:f)
1128 .ENDIF # "$(GUI)" == "UNX"
1129 $(MISC)/$(SHL3VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL3VERSIONOBJ:b).h
1130 # $(COPY) $(SOLARENV)/src/version.c $@
1131 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL3VERSIONOBJ:b).h/ > $@
1133 .INIT : $(SHL3VERSIONOBJDEP)
1134 .ENDIF # "$(VERSIONOBJ)"!=""
1136 .IF "$(GUI)" != "UNX"
1137 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
1138 .IF "$(SHL3IMPLIB)" == ""
1139 SHL3IMPLIB=i$(TARGET)_t3
1140 .ENDIF # "$(SHL3IMPLIB)" == ""
1141 .IF "$(COM)" != "GCC"
1142 USE_3IMPLIB=-implib:$(LB)/$(SHL3IMPLIB).lib
1143 .ENDIF # "$(COM)" != "GCC"
1144 SHL3IMPLIBN=$(LB)/$(SHL3IMPLIB).lib
1145 ALLTAR : $(SHL3IMPLIBN)
1147 .IF "$(USE_DEFFILE)"==""
1148 USE_3IMPLIB_DEPS=$(LB)/$(SHL3IMPLIB).lib
1149 .ENDIF # "$(USE_DEFFILE)"==""
1150 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
1151 USE_SHL3DEF=$(SHL3DEF)
1152 .ELSE # "$(GUI)" != "UNX"
1153 USE_SHL3DEF=
1154 SHL3DEPN+:=$(SHL3DEPNU)
1156 .IF "$(SHL3VERSIONMAP)"==""
1157 # to activate vmaps remove "#"
1158 USE_SHL3VERSIONMAP=$(MISC)/$(SHL3TARGET).vmap
1159 .ENDIF # "$(SHL3VERSIONMAP)"==""
1161 .IF "$(USE_SHL3VERSIONMAP)"!=""
1163 .IF "$(SHL3FILTERFILE)"!=""
1164 .IF "$(SHL3VERSIONMAP)"!=""
1165 #eine von beiden ist zuviel
1166 USE_SHL3VERSIONMAP=$(MISC)/$(SHL3TARGET).vmap
1167 $(USE_SHL3VERSIONMAP) .PHONY:
1168 @echo -----------------------------
1169 @echo you should only use versionmap OR exportfile
1170 @echo -----------------------------
1171 # force_dmake_to_error
1173 .ENDIF # "$(SHL3VERSIONMAP)"!=""
1175 .IF "$(OS)"!="IRIX"
1176 SHL3VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL3VERSIONMAP)
1177 .ENDIF
1179 $(USE_SHL3VERSIONMAP): \
1180 $(SHL3OBJS)\
1181 $(SHL3LIBS)\
1182 $(SHL3FILTERFILE)
1183 @$(RM) $@.dump
1184 .IF "$(SHL3OBJS)"!=""
1185 # dump remaining objects on the fly
1186 .IF "$(OS)"=="MACOSX"
1187 @-nm $(SHL3OBJS:s/.obj/.o/) > $@.dump
1188 .ELSE
1189 @nm $(SHL3OBJS:s/.obj/.o/) > $@.dump
1190 .ENDIF
1191 .ENDIF # "$(SHL3OBJS)!"=""
1192 @$(TYPE) /dev/null $(SHL3LIBS:s/.lib/.dump/) >> $@.dump
1193 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL3INTERFACE) -f $(SHL3FILTERFILE) -m $@
1195 .ELSE # "$(SHL3FILTERFILE)"!=""
1196 USE_SHL3VERSIONMAP=$(MISC)/$(SHL3TARGET).vmap
1197 $(USE_SHL3VERSIONMAP) :
1198 @echo -----------------------------
1199 @echo SHL3FILTERFILE not set!
1200 @echo -----------------------------
1201 @$(TOUCH) $@
1202 @echo dummy file to keep the dependencies for later use.
1203 # force_dmake_to_error
1204 .ENDIF # "$(SHL3FILTERFILE)"!=""
1205 .ELSE # "$(USE_SHL3VERSIONMAP)"!=""
1207 #and now for the plain non-generic way...
1208 .IF "$(SHL3VERSIONMAP)"!=""
1209 USE_SHL3VERSIONMAP=$(MISC)/$(SHL3VERSIONMAP:b)_$(SHL3TARGET)$(SHL3VERSIONMAP:e)
1210 .IF "$(OS)"!="IRIX"
1211 SHL3VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL3VERSIONMAP)
1212 .ENDIF
1214 .IF "$(OS)"=="MACOSX"
1215 $(USE_SHL3VERSIONMAP): $(SHL3OBJS) $(SHL3LIBS)
1216 .ENDIF
1218 $(USE_SHL3VERSIONMAP): $(SHL3VERSIONMAP)
1219 @@-$(RM) -f $@
1220 # The following files will only be generated and needed on Mac OS X as temporary files
1221 # in order to generate exported symbols list out of Linux/Solaris map files
1222 .IF "$(OS)"=="MACOSX"
1223 @-$(RM) -f $@.symregexp >& $(NULLDEV)
1224 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
1225 .ENDIF
1226 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
1227 # happens if somebody will change it in the future
1228 .IF "$(COMID)"=="gcc3"
1229 tr -d "\015" < $(SHL3VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
1230 .ELIF "$(COMNAME)"=="sunpro5"
1231 tr -d "\015" < $(SHL3VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
1232 .ELSE # "$(COMID)"=="gcc3"
1233 tr -d "\015" < $(SHL3VERSIONMAP) > $@
1234 .ENDIF # "$(COMID)"=="gcc3"
1235 @chmod a+w $@
1236 # Mac OS X post-processing generate an exported symbols list from the generated map file
1237 # for details on exported symbols list see man ld on Mac OS X
1238 .IF "$(OS)"=="MACOSX"
1239 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
1240 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
1241 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
1242 # Extract RTTI symbols from all the objects that will be used to build a shared library
1243 .IF "$(SHL3OBJS)"!=""
1244 -echo $(foreach,i,$(SHL3OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
1245 .ENDIF
1246 .IF "$(SHL3LIBS)"!=""
1247 -$(TYPE) $(foreach,j,$(SHL3LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
1248 .ENDIF
1249 # overwrite the map file generate into the local output tree with the generated
1250 # exported symbols list
1251 cp $@.exported-symbols $@
1252 .ENDIF # .IF "$(OS)"=="MACOSX"
1253 .ENDIF # "$(SHL3VERSIONMAP)"!=""
1254 .ENDIF # "$(USE_SHL3VERSIONMAP)"!=""
1255 .ENDIF # "$(GUI)" != "UNX"
1257 .IF "$(UNIXVERSIONNAMES)"!=""
1258 .IF "$(OS)"!="MACOSX"
1259 .IF "$(GUI)"=="UNX"
1260 .IF "$(OS)"=="IRIX"
1261 SHL3SONAME=$(SONAME_SWITCH)$(SHL3TARGETN:f)
1262 .ELSE
1263 SHL3SONAME=\"$(SONAME_SWITCH)$(SHL3TARGETN:f)\"
1264 .ENDIF
1265 .ENDIF # "$(GUI)"!="UNX"
1266 .ENDIF # "$(OS)"!="MACOSX"
1267 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
1269 .IF "$(SHL3RES)"!=""
1270 SHL3ALLRES+=$(SHL3RES)
1271 SHL3LINKRES*=$(MISC)/$(SHL3TARGET).res
1272 SHL3LINKRESO*=$(MISC)/$(SHL3TARGET)_res.o
1273 .ENDIF # "$(SHL3RES)"!=""
1275 .IF "$(SHL3DEFAULTRES)$(use_shl_versions)"!=""
1276 SHL3DEFAULTRES*=$(MISC)/$(SHL3TARGET)_def.res
1277 SHL3ALLRES+=$(SHL3DEFAULTRES)
1278 SHL3LINKRES*=$(MISC)/$(SHL3TARGET).res
1279 SHL3LINKRESO*=$(MISC)/$(SHL3TARGET)_res.o
1280 .ENDIF # "$(SHL3DEFAULTRES)$(use_shl_versions)"!=""
1282 #.IF "$(SHL3TARGETN)"!=""
1284 .IF "$(linkinc)"!=""
1285 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
1286 .IF "$(SHL3LIBS)"!=""
1287 $(MISC)/$(SHL3TARGET)_linkinc.ls .PHONY:
1288 @@-$(RM) $@
1289 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL3LIBS) $(i:s/.lib/.lin/)) >> $@
1290 .ENDIF # "$(SHL3LIBS)"!=""
1291 .ENDIF
1293 LINKINCTARGETS+=$(MISC)/$(SHL3TARGETN:b)_linkinc.ls
1294 $(SHL3TARGETN) : $(LINKINCTARGETS)
1296 .ELSE
1297 .IF "$(SHL3USE_EXPORTS)"=="name"
1298 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
1299 .IF "$(COM)"!="GCC"
1300 .IF "$(SHL3LIBS)"!=""
1301 SHL3LINKLIST=$(MISC)/$(SHL3TARGET)_link.lst
1302 SHL3LINKLISTPARAM=@$(SHL3LINKLIST)
1303 $(SHL3LINKLIST) : $(SHL3LIBS)
1304 @@-$(RM) $@
1305 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL3LIBS) $(i:s/.lib/.lin/)) >> $@
1306 .ENDIF # "$(SHL3LIBS)"!=""
1307 .ENDIF # "$(COM)"!="GCC"
1308 .ENDIF
1309 .ENDIF # "$(SHL3USE_EXPORTS)"=="name"
1311 $(MISC)/%linkinc.ls:
1312 echo . > $@
1313 .ENDIF # "$(linkinc)"!=""
1315 .IF "$(GUI)" == "OS2"
1316 #21/02/2006 YD dll names must be 8.3, invoke fix script
1317 #check osl/os2/module.c/osl_loadModule()
1318 SHL3TARGET8=$(shell @fix_shl $(SHL3TARGET))
1319 .ENDIF
1321 .IF "$(GUI)" == "OS2"
1322 _SHL3IMP_ORD = $(SHL3STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL3STDLIBS:^"$(LB)/")
1323 SHL3IMP_ORD = $(foreach,i,$(_SHL3IMP_ORD) $(shell @-ls $i))
1324 .ELSE
1325 SHL3IMP_ORD =
1326 .ENDIF
1329 $(SHL3TARGETN) : \
1330 $(SHL3OBJS)\
1331 $(SHL3LIBS)\
1332 $(USE_3IMPLIB_DEPS)\
1333 $(USE_SHL3DEF)\
1334 $(USE_SHL3VERSIONMAP)\
1335 $(SHL3RES)\
1336 $(SHL3DEPN) \
1337 $(SHL3IMP_ORD) \
1338 $(SHL3LINKLIST)
1339 @echo ------------------------------
1340 @echo Making: $(SHL3TARGETN)
1341 .IF "$(GUI)" == "WNT"
1342 .IF "$(SHL3DEFAULTRES)"!=""
1343 @@-$(RM) $(MISC)/$(SHL3DEFAULTRES:b).rc
1344 .IF "$(SHL3ICON)" != ""
1345 @echo 1 ICON $(SHL3ICON) >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1346 .ENDIF
1347 .IF "$(use_shl_versions)" != ""
1348 .IF "$(SHL3ADD_VERINFO)"!=""
1349 @echo $(EMQ)#include $(EMQ)"$(SHL3ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1350 .ELSE # "$(SHL3ADD_VERINFO)"!=""
1351 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1352 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1353 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1354 .ENDIF # "$(SHL3ADD_VERINFO)"!=""
1355 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1356 @echo $(EMQ)#define ORG_NAME $(SHL3TARGET)$(DLLPOST) >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1357 @echo $(EMQ)#define INTERNAL_NAME $(SHL3TARGET:b) >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1358 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1359 .ENDIF # "$(use_shl_versions)" != ""
1360 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL3DEFAULTRES:b).rc
1361 .ENDIF # "$(SHL3DEFAULTRES)"!=""
1362 .IF "$(SHL3ALLRES)"!=""
1363 $(TYPE) $(SHL3ALLRES) > $(SHL3LINKRES)
1364 .IF "$(COM)"=="GCC"
1365 windres $(SHL3LINKRES) $(SHL3LINKRESO)
1366 .ENDIF # "$(COM)"=="GCC"
1367 .ENDIF # "$(SHL3ALLRES)"!=""
1368 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
1369 @echo dlltool --input-def $(SHL3DEF) \
1370 --dllname $(SHL3TARGET)$(DLLPOST) \
1371 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_3.cmd
1372 .IF "$(DEFLIB3NAME)"!="" # do not have to include objs
1373 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_3.cmd
1374 .ELSE # "$(DEFLIB3NAME)"!="" # do not have to include objs
1375 @echo --output-exp $(MISC)/$(@:b)_exp.o \
1376 $(STDOBJ) $(SHL3OBJS) $(SHL3LINKRESO) \
1377 `$(TYPE) /dev/null $(SHL3LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_3.cmd
1378 .ENDIF # "$(DEFLIB3NAME)"!=""
1379 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
1380 $(STDOBJ) $(SHL3VERSIONOBJ) $(SHL3DESCRIPTIONOBJ) $(SHL3OBJS) $(SHL3LINKRESO) \
1381 `$(TYPE) /dev/null $(SHL3LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
1382 -Wl,--exclude-libs,ALL,--start-group $(SHL3STDLIBS) -Wl,--end-group \
1383 $(SHL3STDSHL) $(STDSHL3) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
1384 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_3.cmd
1385 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_3.cmd
1386 @+source $(MISC)/$(TARGET).$(@:b)_3.cmd
1387 .ELSE
1388 .IF "$(linkinc)"==""
1389 .IF "$(SHL3USE_EXPORTS)"!="name"
1390 .IF "$(USE_DEFFILE)"!=""
1391 $(SHL3LINKER) @$(mktmp \
1392 $(SHL3LINKFLAGS) \
1393 $(LINKFLAGSSHL) \
1394 $(SHL3STACK) $(SHL3BASEX) \
1395 -out:$@ \
1396 -map:$(MISC)/$(@:b).map \
1397 -def:$(SHL3DEF) \
1398 $(USE_3IMPLIB) \
1399 $(STDOBJ) \
1400 $(SHL3VERSIONOBJ) $(SHL3OBJS) \
1401 $(SHL3LIBS) \
1402 $(SHL3STDLIBS) \
1403 $(SHL3STDSHL) $(STDSHL3) \
1404 $(SHL3LINKRES) \
1405 ) $(LINKOUTPUTFILTER)
1406 # double check if target was really written... still making sense?
1407 @@$(LS) $@
1408 @echo linking $@.manifest ...
1409 .IF "$(VISTA_MANIFEST)"!=""
1410 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
1411 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
1412 .ELSE
1413 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
1414 .ENDIF # "$(VISTA_MANIFEST)"!=""
1415 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
1416 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
1417 .ELSE # "$(USE_DEFFILE)"!=""
1418 $(SHL3LINKER) @$(mktmp $(SHL3LINKFLAGS) \
1419 $(LINKFLAGSSHL) $(SHL3BASEX) \
1420 $(SHL3STACK) -out:$(SHL3TARGETN) \
1421 -map:$(MISC)/$(@:B).map \
1422 $(LB)/$(SHL3IMPLIB).exp \
1423 $(STDOBJ) \
1424 $(SHL3OBJS) $(SHL3VERSIONOBJ) \
1425 $(SHL3LIBS) \
1426 $(SHL3STDLIBS) \
1427 $(SHL3STDSHL) $(STDSHL3) \
1428 $(SHL3LINKRES) \
1429 ) $(LINKOUTPUTFILTER)
1430 # double check if target was really written... still making sense?
1431 @@$(LS) $@
1432 @echo linking $@.manifest ...
1433 .IF "$(VISTA_MANIFEST)"!=""
1434 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
1435 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
1436 .ELSE
1437 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
1438 .ENDIF # "$(VISTA_MANIFEST)"!=""
1439 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
1440 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
1441 .ENDIF # "$(USE_DEFFILE)"!=""
1442 .ELSE # "$(SHL3USE_EXPORTS)"!="name"
1443 $(SHL3LINKER) @$(mktmp $(SHL3LINKFLAGS) \
1444 $(LINKFLAGSSHL) $(SHL3BASEX) \
1445 $(SHL3STACK) -out:$(SHL3TARGETN) \
1446 -map:$(MISC)/$(@:B).map \
1447 $(USE_3IMPLIB) \
1448 $(STDOBJ) \
1449 $(SHL3OBJS) $(SHL3VERSIONOBJ)) \
1450 $(SHL3LINKLISTPARAM) \
1451 @$(mktmp $(SHL3STDLIBS) \
1452 $(SHL3STDSHL) $(STDSHL3) \
1453 $(SHL3LINKRES) \
1455 @echo linking $@.manifest ...
1456 .IF "$(VISTA_MANIFEST)"!=""
1457 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
1458 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
1459 .ELSE
1460 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
1461 .ENDIF # "$(VISTA_MANIFEST)"!=""
1462 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
1463 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
1464 .ENDIF # "$(SHL3USE_EXPORTS)"!="name"
1465 .ELSE # "$(linkinc)"==""
1466 -$(RM) del $(MISC)/$(SHL3TARGET).lnk
1467 -$(RM) $(MISC)/$(SHL3TARGET).lst
1468 $(TYPE) $(mktmp \
1469 $(SHL3LINKFLAGS) \
1470 $(LINKFLAGSSHL) $(SHL3BASEX) \
1471 $(SHL3STACK) $(MAPFILE) \
1472 -out:$@ \
1473 $(LB)/$(SHL3IMPLIB).exp \
1474 $(STDOBJ) \
1475 $(SHL3OBJS) \
1476 $(SHL3STDLIBS) \
1477 $(SHL3STDSHL) $(STDSHL3) \
1478 $(SHL3LINKRES) \
1479 ) >> $(MISC)/$(SHL3TARGET).lnk
1480 $(TYPE) $(MISC)/$(SHL3TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL3TARGET).lnk
1481 $(SHL3LINKER) @$(MISC)/$(SHL3TARGET).lnk
1482 @echo linking $@.manifest ...
1483 .IF "$(VISTA_MANIFEST)"!=""
1484 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
1485 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
1486 .ELSE
1487 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
1488 .ENDIF # "$(VISTA_MANIFEST)"!=""
1489 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
1490 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
1491 .ENDIF # "$(linkinc)"==""
1492 .ENDIF # "$(COM)"=="GCC"
1493 .ENDIF # "$(GUI)" == "WNT"
1494 .IF "$(GUI)"=="UNX"
1495 .IF "$(OS)"=="MACOSX"
1496 @-$(RM) $(MISC)/$(@:b).list
1497 @-$(RM) $(MISC)/$(TARGET).$(@:b)_3.cmd
1498 @echo $(STDSLO) $(SHL3OBJS:s/.obj/.o/) \
1499 $(SHL3VERSIONOBJ) \
1500 `cat /dev/null $(SHL3LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
1501 @echo -n $(SHL3LINKER) $(SHL3LINKFLAGS) $(SHL3VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
1502 $(SHL3STDLIBS) $(SHL3ARCHIVES) $(SHL3STDSHL) $(STDSHL3) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_3.cmd
1503 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
1504 `cat $(MISC)/$(TARGET).$(@:b)_3.cmd` \
1505 >> $(MISC)/$(TARGET).$(@:b)_3.cmd
1506 @cat $(MISC)/$(TARGET).$(@:b)_3.cmd
1507 @+source $(MISC)/$(TARGET).$(@:b)_3.cmd
1508 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
1509 shl $(SHL3RPATH) $@
1510 @echo "Making: $@.jnilib"
1511 @macosx-create-bundle $@
1512 .IF "$(UPDATER)"=="YES"
1513 .IF "$(SHL3NOCHECK)"==""
1514 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS3) $(SHL3TARGETN)
1515 .ENDIF # "$(SHL3NOCHECK)"!=""
1516 .ENDIF
1517 .ELSE # "$(OS)"=="MACOSX"
1518 @-$(RM) $(MISC)/$(TARGET).$(@:b)_3.cmd
1519 @echo $(SHL3LINKER) $(SHL3LINKFLAGS) $(SHL3SONAME) $(LINKFLAGSSHL) $(SHL3VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL3OBJS:s/.obj/.o/) \
1520 $(SHL3VERSIONOBJ) -o $@ \
1521 `cat /dev/null $(SHL3LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
1522 $(SHL3STDLIBS) $(SHL3ARCHIVES) $(SHL3STDSHL) $(STDSHL3) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_3.cmd
1523 @cat $(MISC)/$(TARGET).$(@:b)_3.cmd
1524 @+source $(MISC)/$(TARGET).$(@:b)_3.cmd
1525 .IF "$(UPDATER)"=="YES"
1526 .IF "$(SHL3NOCHECK)"==""
1527 -$(RM) $(SHL3TARGETN:d)check_$(SHL3TARGETN:f)
1528 $(RENAME) $(SHL3TARGETN) $(SHL3TARGETN:d)check_$(SHL3TARGETN:f)
1529 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS3) $(SHL3TARGETN:d)check_$(SHL3TARGETN:f)
1530 .ENDIF # "$(SHL3NOCHECK)"!=""
1531 .ENDIF # "$(UPDATER)"=="YES"
1532 .ENDIF # "$(OS)"=="MACOSX"
1533 .IF "$(UNIXVERSIONNAMES)"!=""
1534 $(RM) $(LB)/$(SHL3TARGETN:b)
1535 cd $(LB) && ln -s $(SHL3TARGETN:f) $(SHL3TARGETN:b)
1536 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
1537 @ls -l $@
1538 .ENDIF # "$(GUI)" == "UNX"
1540 .IF "$(GUI)" == "OS2"
1542 .IF "$(SHL3DEFAULTRES)"!=""
1543 @+-$(RM) $(MISC)/$(SHL3DEFAULTRES:b).rc >& $(NULLDEV)
1544 .IF "$(SHL3ICON)" != ""
1545 @-+echo 1 ICON $(SHL3ICON) >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1546 .ENDIF
1547 .IF "$(use_shl_versions)" != ""
1548 .IF "$(SHL3ADD_VERINFO)"!=""
1549 @-+echo $(EMQ)#include $(EMQ)"$(SHL3ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1550 .ENDIF # "$(SHL3ADD_VERINFO)"!=""
1551 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1552 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL3DEFAULTRES:b).rc
1553 .ENDIF # "$(use_shl_versions)" != ""
1554 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
1555 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL3DEFAULTRES:b).rc
1556 .ENDIF # "$(SHL3DEFAULTRES)"!=""
1558 .IF "$(SHL3ALLRES)"!=""
1559 +$(TYPE) $(SHL3ALLRES) > $(SHL3LINKRES)
1560 .ENDIF # "$(SHL3ALLRES)"!=""
1562 .IF "$(USE_DEFFILE)"!=""
1564 $(SHL3LINKER) $(SHL3LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
1565 $(SHL3DEF) \
1566 $(STDOBJ) \
1567 -L$(LB) \
1568 -L$(SOLARVERSION)/$(INPATH)/lib \
1569 $(SHL3OBJS) $(SHL3VERSIONOBJ) \
1570 $(SHL3LIBS) \
1571 $(SHL3STDLIBS:^"-l") \
1572 $(SHL3LINKRES) \
1573 $(SHL3STDSHL:^"-l") $(STDSHL3:^"-l")
1575 .ELSE # "$(USE_DEFFILE)"!=""
1577 $(SHL3LINKER) -v $(SHL3LINKFLAGS) \
1578 $(LINKFLAGSSHL) $(SHL3BASEX) \
1579 $(SHL3STACK) -o $(SHL3TARGETN) \
1580 $(SHL3DEF) \
1581 $(STDOBJ) \
1582 -L$(LB) \
1583 -L$(SOLARVERSION)/$(INPATH)/lib \
1584 $(SHL3OBJS) $(SHL3VERSIONOBJ) \
1585 $(SHL3LIBS) \
1586 $(SHL3STDLIBS:^"-l") \
1587 $(SHL3LINKRES) \
1588 $(SHL3STDSHL:^"-l") $(STDSHL3:^"-l") \
1589 $(LINKOUTPUTFILTER)
1590 @$(LS) $@ >& $(NULLDEV)
1592 .ENDIF # "$(USE_DEFFILE)"!=""
1594 .IF "$(SHL3TARGET8)" != "$(SHL3TARGET)"
1595 +$(COPY) $@ $(@:d)$(SHL3TARGET8).dll
1596 .ENDIF
1598 .ENDIF # "$(GUI)" == "OS2"
1601 .IF "$(TESTDIR)"!=""
1602 .IF "$(NO_TESTS)"==""
1604 ALLTAR : runtest_$(SHL3TARGET)
1606 runtest_$(SHL3TARGET) : $(SHL3TARGETN)
1607 testshl $(SHL3TARGETN) sce/$(SHL3TARGET).sce -msg -skip
1608 .ENDIF # "$(NO_TESTS)"==""
1609 .ENDIF # "$(TESTDIR)"!=""
1610 .ENDIF # "$(SHL3TARGETN)"!=""
1612 # unroll begin
1614 .IF "$(SHL4TARGETN)"!=""
1616 .IF "$(OS)"=="AIX"
1617 SHL4STDLIBS=
1618 .ENDIF
1620 .IF "$(SHLLINKARCONLY)" != ""
1621 SHL4STDLIBS=
1622 STDSHL=
1623 .ELSE
1624 SHL4ARCHIVES=
1625 .ENDIF
1627 # decide how to link
1628 .IF "$(SHL4CODETYPE)"=="C"
1629 SHL4LINKER=$(LINKC)
1630 SHL4STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
1631 SHL4LINKFLAGS+=$(LINKCFLAGS)
1632 .ELSE # "$(SHL4CODETYPE)"=="C"
1633 SHL4LINKER=$(LINK)
1634 SHL4STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
1635 SHL4LINKFLAGS+=$(LINKFLAGS)
1636 .ENDIF # "$(SHL4CODETYPE)"=="C"
1638 SHL4RPATH*=OOO
1639 LINKFLAGSRUNPATH_$(SHL4RPATH)*=/ERROR:/Bad_SHL4RPATH_value
1640 SHL4LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL4RPATH))
1642 .IF "$(SHL4USE_EXPORTS)"==""
1643 SHL4DEF*=$(MISC)/$(SHL4TARGET).def
1644 .ENDIF # "$(SHL4USE_EXPORTS)"==""
1646 EXTRALIBPATHS4=$(EXTRALIBPATHS)
1647 .IF "$(UPDATER)"=="YES"
1648 .IF "$(SHL4NOCHECK)"==""
1649 .IF "$(SOLAR_STLLIBPATH)"!=""
1650 EXTRALIBPATHS4+=-L$(SOLAR_STLLIBPATH)
1651 .ENDIF
1652 .ENDIF # "$(SHL4NOCHECK)"!=""
1653 .ENDIF
1654 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1655 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
1656 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1658 .IF "$(VERSIONOBJ)"!=""
1659 SHL4VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL4TARGET))}$(VERSIONOBJ:f)
1660 USE_VERSIONH:=$(INCCOM)/$(SHL4VERSIONOBJ:b).h
1661 .IF "$(GUI)" == "UNX"
1662 SHL4VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL4TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
1663 .ELSE # "$(GUI)" == "UNX"
1664 SHL4VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL4TARGET))}$(VERSIONOBJ:f)
1665 .ENDIF # "$(GUI)" == "UNX"
1666 $(MISC)/$(SHL4VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL4VERSIONOBJ:b).h
1667 # $(COPY) $(SOLARENV)/src/version.c $@
1668 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL4VERSIONOBJ:b).h/ > $@
1670 .INIT : $(SHL4VERSIONOBJDEP)
1671 .ENDIF # "$(VERSIONOBJ)"!=""
1673 .IF "$(GUI)" != "UNX"
1674 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
1675 .IF "$(SHL4IMPLIB)" == ""
1676 SHL4IMPLIB=i$(TARGET)_t4
1677 .ENDIF # "$(SHL4IMPLIB)" == ""
1678 .IF "$(COM)" != "GCC"
1679 USE_4IMPLIB=-implib:$(LB)/$(SHL4IMPLIB).lib
1680 .ENDIF # "$(COM)" != "GCC"
1681 SHL4IMPLIBN=$(LB)/$(SHL4IMPLIB).lib
1682 ALLTAR : $(SHL4IMPLIBN)
1684 .IF "$(USE_DEFFILE)"==""
1685 USE_4IMPLIB_DEPS=$(LB)/$(SHL4IMPLIB).lib
1686 .ENDIF # "$(USE_DEFFILE)"==""
1687 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
1688 USE_SHL4DEF=$(SHL4DEF)
1689 .ELSE # "$(GUI)" != "UNX"
1690 USE_SHL4DEF=
1691 SHL4DEPN+:=$(SHL4DEPNU)
1693 .IF "$(SHL4VERSIONMAP)"==""
1694 # to activate vmaps remove "#"
1695 USE_SHL4VERSIONMAP=$(MISC)/$(SHL4TARGET).vmap
1696 .ENDIF # "$(SHL4VERSIONMAP)"==""
1698 .IF "$(USE_SHL4VERSIONMAP)"!=""
1700 .IF "$(SHL4FILTERFILE)"!=""
1701 .IF "$(SHL4VERSIONMAP)"!=""
1702 #eine von beiden ist zuviel
1703 USE_SHL4VERSIONMAP=$(MISC)/$(SHL4TARGET).vmap
1704 $(USE_SHL4VERSIONMAP) .PHONY:
1705 @echo -----------------------------
1706 @echo you should only use versionmap OR exportfile
1707 @echo -----------------------------
1708 # force_dmake_to_error
1710 .ENDIF # "$(SHL4VERSIONMAP)"!=""
1712 .IF "$(OS)"!="IRIX"
1713 SHL4VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL4VERSIONMAP)
1714 .ENDIF
1716 $(USE_SHL4VERSIONMAP): \
1717 $(SHL4OBJS)\
1718 $(SHL4LIBS)\
1719 $(SHL4FILTERFILE)
1720 @$(RM) $@.dump
1721 .IF "$(SHL4OBJS)"!=""
1722 # dump remaining objects on the fly
1723 .IF "$(OS)"=="MACOSX"
1724 @-nm $(SHL4OBJS:s/.obj/.o/) > $@.dump
1725 .ELSE
1726 @nm $(SHL4OBJS:s/.obj/.o/) > $@.dump
1727 .ENDIF
1728 .ENDIF # "$(SHL4OBJS)!"=""
1729 @$(TYPE) /dev/null $(SHL4LIBS:s/.lib/.dump/) >> $@.dump
1730 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL4INTERFACE) -f $(SHL4FILTERFILE) -m $@
1732 .ELSE # "$(SHL4FILTERFILE)"!=""
1733 USE_SHL4VERSIONMAP=$(MISC)/$(SHL4TARGET).vmap
1734 $(USE_SHL4VERSIONMAP) :
1735 @echo -----------------------------
1736 @echo SHL4FILTERFILE not set!
1737 @echo -----------------------------
1738 @$(TOUCH) $@
1739 @echo dummy file to keep the dependencies for later use.
1740 # force_dmake_to_error
1741 .ENDIF # "$(SHL4FILTERFILE)"!=""
1742 .ELSE # "$(USE_SHL4VERSIONMAP)"!=""
1744 #and now for the plain non-generic way...
1745 .IF "$(SHL4VERSIONMAP)"!=""
1746 USE_SHL4VERSIONMAP=$(MISC)/$(SHL4VERSIONMAP:b)_$(SHL4TARGET)$(SHL4VERSIONMAP:e)
1747 .IF "$(OS)"!="IRIX"
1748 SHL4VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL4VERSIONMAP)
1749 .ENDIF
1751 .IF "$(OS)"=="MACOSX"
1752 $(USE_SHL4VERSIONMAP): $(SHL4OBJS) $(SHL4LIBS)
1753 .ENDIF
1755 $(USE_SHL4VERSIONMAP): $(SHL4VERSIONMAP)
1756 @@-$(RM) -f $@
1757 # The following files will only be generated and needed on Mac OS X as temporary files
1758 # in order to generate exported symbols list out of Linux/Solaris map files
1759 .IF "$(OS)"=="MACOSX"
1760 @-$(RM) -f $@.symregexp >& $(NULLDEV)
1761 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
1762 .ENDIF
1763 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
1764 # happens if somebody will change it in the future
1765 .IF "$(COMID)"=="gcc3"
1766 tr -d "\015" < $(SHL4VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
1767 .ELIF "$(COMNAME)"=="sunpro5"
1768 tr -d "\015" < $(SHL4VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
1769 .ELSE # "$(COMID)"=="gcc3"
1770 tr -d "\015" < $(SHL4VERSIONMAP) > $@
1771 .ENDIF # "$(COMID)"=="gcc3"
1772 @chmod a+w $@
1773 # Mac OS X post-processing generate an exported symbols list from the generated map file
1774 # for details on exported symbols list see man ld on Mac OS X
1775 .IF "$(OS)"=="MACOSX"
1776 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
1777 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
1778 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
1779 # Extract RTTI symbols from all the objects that will be used to build a shared library
1780 .IF "$(SHL4OBJS)"!=""
1781 -echo $(foreach,i,$(SHL4OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
1782 .ENDIF
1783 .IF "$(SHL4LIBS)"!=""
1784 -$(TYPE) $(foreach,j,$(SHL4LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
1785 .ENDIF
1786 # overwrite the map file generate into the local output tree with the generated
1787 # exported symbols list
1788 cp $@.exported-symbols $@
1789 .ENDIF # .IF "$(OS)"=="MACOSX"
1790 .ENDIF # "$(SHL4VERSIONMAP)"!=""
1791 .ENDIF # "$(USE_SHL4VERSIONMAP)"!=""
1792 .ENDIF # "$(GUI)" != "UNX"
1794 .IF "$(UNIXVERSIONNAMES)"!=""
1795 .IF "$(OS)"!="MACOSX"
1796 .IF "$(GUI)"=="UNX"
1797 .IF "$(OS)"=="IRIX"
1798 SHL4SONAME=$(SONAME_SWITCH)$(SHL4TARGETN:f)
1799 .ELSE
1800 SHL4SONAME=\"$(SONAME_SWITCH)$(SHL4TARGETN:f)\"
1801 .ENDIF
1802 .ENDIF # "$(GUI)"!="UNX"
1803 .ENDIF # "$(OS)"!="MACOSX"
1804 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
1806 .IF "$(SHL4RES)"!=""
1807 SHL4ALLRES+=$(SHL4RES)
1808 SHL4LINKRES*=$(MISC)/$(SHL4TARGET).res
1809 SHL4LINKRESO*=$(MISC)/$(SHL4TARGET)_res.o
1810 .ENDIF # "$(SHL4RES)"!=""
1812 .IF "$(SHL4DEFAULTRES)$(use_shl_versions)"!=""
1813 SHL4DEFAULTRES*=$(MISC)/$(SHL4TARGET)_def.res
1814 SHL4ALLRES+=$(SHL4DEFAULTRES)
1815 SHL4LINKRES*=$(MISC)/$(SHL4TARGET).res
1816 SHL4LINKRESO*=$(MISC)/$(SHL4TARGET)_res.o
1817 .ENDIF # "$(SHL4DEFAULTRES)$(use_shl_versions)"!=""
1819 #.IF "$(SHL4TARGETN)"!=""
1821 .IF "$(linkinc)"!=""
1822 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
1823 .IF "$(SHL4LIBS)"!=""
1824 $(MISC)/$(SHL4TARGET)_linkinc.ls .PHONY:
1825 @@-$(RM) $@
1826 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL4LIBS) $(i:s/.lib/.lin/)) >> $@
1827 .ENDIF # "$(SHL4LIBS)"!=""
1828 .ENDIF
1830 LINKINCTARGETS+=$(MISC)/$(SHL4TARGETN:b)_linkinc.ls
1831 $(SHL4TARGETN) : $(LINKINCTARGETS)
1833 .ELSE
1834 .IF "$(SHL4USE_EXPORTS)"=="name"
1835 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
1836 .IF "$(COM)"!="GCC"
1837 .IF "$(SHL4LIBS)"!=""
1838 SHL4LINKLIST=$(MISC)/$(SHL4TARGET)_link.lst
1839 SHL4LINKLISTPARAM=@$(SHL4LINKLIST)
1840 $(SHL4LINKLIST) : $(SHL4LIBS)
1841 @@-$(RM) $@
1842 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL4LIBS) $(i:s/.lib/.lin/)) >> $@
1843 .ENDIF # "$(SHL4LIBS)"!=""
1844 .ENDIF # "$(COM)"!="GCC"
1845 .ENDIF
1846 .ENDIF # "$(SHL4USE_EXPORTS)"=="name"
1848 $(MISC)/%linkinc.ls:
1849 echo . > $@
1850 .ENDIF # "$(linkinc)"!=""
1852 .IF "$(GUI)" == "OS2"
1853 #21/02/2006 YD dll names must be 8.3, invoke fix script
1854 #check osl/os2/module.c/osl_loadModule()
1855 SHL4TARGET8=$(shell @fix_shl $(SHL4TARGET))
1856 .ENDIF
1858 .IF "$(GUI)" == "OS2"
1859 _SHL4IMP_ORD = $(SHL4STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL4STDLIBS:^"$(LB)/")
1860 SHL4IMP_ORD = $(foreach,i,$(_SHL4IMP_ORD) $(shell @-ls $i))
1861 .ELSE
1862 SHL4IMP_ORD =
1863 .ENDIF
1866 $(SHL4TARGETN) : \
1867 $(SHL4OBJS)\
1868 $(SHL4LIBS)\
1869 $(USE_4IMPLIB_DEPS)\
1870 $(USE_SHL4DEF)\
1871 $(USE_SHL4VERSIONMAP)\
1872 $(SHL4RES)\
1873 $(SHL4DEPN) \
1874 $(SHL4IMP_ORD) \
1875 $(SHL4LINKLIST)
1876 @echo ------------------------------
1877 @echo Making: $(SHL4TARGETN)
1878 .IF "$(GUI)" == "WNT"
1879 .IF "$(SHL4DEFAULTRES)"!=""
1880 @@-$(RM) $(MISC)/$(SHL4DEFAULTRES:b).rc
1881 .IF "$(SHL4ICON)" != ""
1882 @echo 1 ICON $(SHL4ICON) >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1883 .ENDIF
1884 .IF "$(use_shl_versions)" != ""
1885 .IF "$(SHL4ADD_VERINFO)"!=""
1886 @echo $(EMQ)#include $(EMQ)"$(SHL4ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1887 .ELSE # "$(SHL4ADD_VERINFO)"!=""
1888 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1889 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1890 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1891 .ENDIF # "$(SHL4ADD_VERINFO)"!=""
1892 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1893 @echo $(EMQ)#define ORG_NAME $(SHL4TARGET)$(DLLPOST) >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1894 @echo $(EMQ)#define INTERNAL_NAME $(SHL4TARGET:b) >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1895 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL4DEFAULTRES:b).rc
1896 .ENDIF # "$(use_shl_versions)" != ""
1897 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL4DEFAULTRES:b).rc
1898 .ENDIF # "$(SHL4DEFAULTRES)"!=""
1899 .IF "$(SHL4ALLRES)"!=""
1900 $(TYPE) $(SHL4ALLRES) > $(SHL4LINKRES)
1901 .IF "$(COM)"=="GCC"
1902 windres $(SHL4LINKRES) $(SHL4LINKRESO)
1903 .ENDIF # "$(COM)"=="GCC"
1904 .ENDIF # "$(SHL4ALLRES)"!=""
1905 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
1906 @echo dlltool --input-def $(SHL4DEF) \
1907 --dllname $(SHL4TARGET)$(DLLPOST) \
1908 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_4.cmd
1909 .IF "$(DEFLIB4NAME)"!="" # do not have to include objs
1910 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_4.cmd
1911 .ELSE # "$(DEFLIB4NAME)"!="" # do not have to include objs
1912 @echo --output-exp $(MISC)/$(@:b)_exp.o \
1913 $(STDOBJ) $(SHL4OBJS) $(SHL4LINKRESO) \
1914 `$(TYPE) /dev/null $(SHL4LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_4.cmd
1915 .ENDIF # "$(DEFLIB4NAME)"!=""
1916 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
1917 $(STDOBJ) $(SHL4VERSIONOBJ) $(SHL4DESCRIPTIONOBJ) $(SHL4OBJS) $(SHL4LINKRESO) \
1918 `$(TYPE) /dev/null $(SHL4LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
1919 -Wl,--exclude-libs,ALL,--start-group $(SHL4STDLIBS) -Wl,--end-group \
1920 $(SHL4STDSHL) $(STDSHL4) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
1921 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_4.cmd
1922 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_4.cmd
1923 @+source $(MISC)/$(TARGET).$(@:b)_4.cmd
1924 .ELSE
1925 .IF "$(linkinc)"==""
1926 .IF "$(SHL4USE_EXPORTS)"!="name"
1927 .IF "$(USE_DEFFILE)"!=""
1928 $(SHL4LINKER) @$(mktmp \
1929 $(SHL4LINKFLAGS) \
1930 $(LINKFLAGSSHL) \
1931 $(SHL4STACK) $(SHL4BASEX) \
1932 -out:$@ \
1933 -map:$(MISC)/$(@:b).map \
1934 -def:$(SHL4DEF) \
1935 $(USE_4IMPLIB) \
1936 $(STDOBJ) \
1937 $(SHL4VERSIONOBJ) $(SHL4OBJS) \
1938 $(SHL4LIBS) \
1939 $(SHL4STDLIBS) \
1940 $(SHL4STDSHL) $(STDSHL4) \
1941 $(SHL4LINKRES) \
1942 ) $(LINKOUTPUTFILTER)
1943 # double check if target was really written... still making sense?
1944 @@$(LS) $@
1945 @echo linking $@.manifest ...
1946 .IF "$(VISTA_MANIFEST)"!=""
1947 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
1948 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
1949 .ELSE
1950 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
1951 .ENDIF # "$(VISTA_MANIFEST)"!=""
1952 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
1953 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
1954 .ELSE # "$(USE_DEFFILE)"!=""
1955 $(SHL4LINKER) @$(mktmp $(SHL4LINKFLAGS) \
1956 $(LINKFLAGSSHL) $(SHL4BASEX) \
1957 $(SHL4STACK) -out:$(SHL4TARGETN) \
1958 -map:$(MISC)/$(@:B).map \
1959 $(LB)/$(SHL4IMPLIB).exp \
1960 $(STDOBJ) \
1961 $(SHL4OBJS) $(SHL4VERSIONOBJ) \
1962 $(SHL4LIBS) \
1963 $(SHL4STDLIBS) \
1964 $(SHL4STDSHL) $(STDSHL4) \
1965 $(SHL4LINKRES) \
1966 ) $(LINKOUTPUTFILTER)
1967 # double check if target was really written... still making sense?
1968 @@$(LS) $@
1969 @echo linking $@.manifest ...
1970 .IF "$(VISTA_MANIFEST)"!=""
1971 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
1972 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
1973 .ELSE
1974 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
1975 .ENDIF # "$(VISTA_MANIFEST)"!=""
1976 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
1977 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
1978 .ENDIF # "$(USE_DEFFILE)"!=""
1979 .ELSE # "$(SHL4USE_EXPORTS)"!="name"
1980 $(SHL4LINKER) @$(mktmp $(SHL4LINKFLAGS) \
1981 $(LINKFLAGSSHL) $(SHL4BASEX) \
1982 $(SHL4STACK) -out:$(SHL4TARGETN) \
1983 -map:$(MISC)/$(@:B).map \
1984 $(USE_4IMPLIB) \
1985 $(STDOBJ) \
1986 $(SHL4OBJS) $(SHL4VERSIONOBJ)) \
1987 $(SHL4LINKLISTPARAM) \
1988 @$(mktmp $(SHL4STDLIBS) \
1989 $(SHL4STDSHL) $(STDSHL4) \
1990 $(SHL4LINKRES) \
1992 @echo linking $@.manifest ...
1993 .IF "$(VISTA_MANIFEST)"!=""
1994 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
1995 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
1996 .ELSE
1997 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
1998 .ENDIF # "$(VISTA_MANIFEST)"!=""
1999 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
2000 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2001 .ENDIF # "$(SHL4USE_EXPORTS)"!="name"
2002 .ELSE # "$(linkinc)"==""
2003 -$(RM) del $(MISC)/$(SHL4TARGET).lnk
2004 -$(RM) $(MISC)/$(SHL4TARGET).lst
2005 $(TYPE) $(mktmp \
2006 $(SHL4LINKFLAGS) \
2007 $(LINKFLAGSSHL) $(SHL4BASEX) \
2008 $(SHL4STACK) $(MAPFILE) \
2009 -out:$@ \
2010 $(LB)/$(SHL4IMPLIB).exp \
2011 $(STDOBJ) \
2012 $(SHL4OBJS) \
2013 $(SHL4STDLIBS) \
2014 $(SHL4STDSHL) $(STDSHL4) \
2015 $(SHL4LINKRES) \
2016 ) >> $(MISC)/$(SHL4TARGET).lnk
2017 $(TYPE) $(MISC)/$(SHL4TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL4TARGET).lnk
2018 $(SHL4LINKER) @$(MISC)/$(SHL4TARGET).lnk
2019 @echo linking $@.manifest ...
2020 .IF "$(VISTA_MANIFEST)"!=""
2021 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
2022 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
2023 .ELSE
2024 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
2025 .ENDIF # "$(VISTA_MANIFEST)"!=""
2026 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
2027 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2028 .ENDIF # "$(linkinc)"==""
2029 .ENDIF # "$(COM)"=="GCC"
2030 .ENDIF # "$(GUI)" == "WNT"
2031 .IF "$(GUI)"=="UNX"
2032 .IF "$(OS)"=="MACOSX"
2033 @-$(RM) $(MISC)/$(@:b).list
2034 @-$(RM) $(MISC)/$(TARGET).$(@:b)_4.cmd
2035 @echo $(STDSLO) $(SHL4OBJS:s/.obj/.o/) \
2036 $(SHL4VERSIONOBJ) \
2037 `cat /dev/null $(SHL4LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
2038 @echo -n $(SHL4LINKER) $(SHL4LINKFLAGS) $(SHL4VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
2039 $(SHL4STDLIBS) $(SHL4ARCHIVES) $(SHL4STDSHL) $(STDSHL4) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_4.cmd
2040 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
2041 `cat $(MISC)/$(TARGET).$(@:b)_4.cmd` \
2042 >> $(MISC)/$(TARGET).$(@:b)_4.cmd
2043 @cat $(MISC)/$(TARGET).$(@:b)_4.cmd
2044 @+source $(MISC)/$(TARGET).$(@:b)_4.cmd
2045 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
2046 shl $(SHL4RPATH) $@
2047 @echo "Making: $@.jnilib"
2048 @macosx-create-bundle $@
2049 .IF "$(UPDATER)"=="YES"
2050 .IF "$(SHL4NOCHECK)"==""
2051 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS4) $(SHL4TARGETN)
2052 .ENDIF # "$(SHL4NOCHECK)"!=""
2053 .ENDIF
2054 .ELSE # "$(OS)"=="MACOSX"
2055 @-$(RM) $(MISC)/$(TARGET).$(@:b)_4.cmd
2056 @echo $(SHL4LINKER) $(SHL4LINKFLAGS) $(SHL4SONAME) $(LINKFLAGSSHL) $(SHL4VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL4OBJS:s/.obj/.o/) \
2057 $(SHL4VERSIONOBJ) -o $@ \
2058 `cat /dev/null $(SHL4LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
2059 $(SHL4STDLIBS) $(SHL4ARCHIVES) $(SHL4STDSHL) $(STDSHL4) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_4.cmd
2060 @cat $(MISC)/$(TARGET).$(@:b)_4.cmd
2061 @+source $(MISC)/$(TARGET).$(@:b)_4.cmd
2062 .IF "$(UPDATER)"=="YES"
2063 .IF "$(SHL4NOCHECK)"==""
2064 -$(RM) $(SHL4TARGETN:d)check_$(SHL4TARGETN:f)
2065 $(RENAME) $(SHL4TARGETN) $(SHL4TARGETN:d)check_$(SHL4TARGETN:f)
2066 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS4) $(SHL4TARGETN:d)check_$(SHL4TARGETN:f)
2067 .ENDIF # "$(SHL4NOCHECK)"!=""
2068 .ENDIF # "$(UPDATER)"=="YES"
2069 .ENDIF # "$(OS)"=="MACOSX"
2070 .IF "$(UNIXVERSIONNAMES)"!=""
2071 $(RM) $(LB)/$(SHL4TARGETN:b)
2072 cd $(LB) && ln -s $(SHL4TARGETN:f) $(SHL4TARGETN:b)
2073 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
2074 @ls -l $@
2075 .ENDIF # "$(GUI)" == "UNX"
2077 .IF "$(GUI)" == "OS2"
2079 .IF "$(SHL4DEFAULTRES)"!=""
2080 @+-$(RM) $(MISC)/$(SHL4DEFAULTRES:b).rc >& $(NULLDEV)
2081 .IF "$(SHL4ICON)" != ""
2082 @-+echo 1 ICON $(SHL4ICON) >> $(MISC)/$(SHL4DEFAULTRES:b).rc
2083 .ENDIF
2084 .IF "$(use_shl_versions)" != ""
2085 .IF "$(SHL4ADD_VERINFO)"!=""
2086 @-+echo $(EMQ)#include $(EMQ)"$(SHL4ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL4DEFAULTRES:b).rc
2087 .ENDIF # "$(SHL4ADD_VERINFO)"!=""
2088 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL4DEFAULTRES:b).rc
2089 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL4DEFAULTRES:b).rc
2090 .ENDIF # "$(use_shl_versions)" != ""
2091 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
2092 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL4DEFAULTRES:b).rc
2093 .ENDIF # "$(SHL4DEFAULTRES)"!=""
2095 .IF "$(SHL4ALLRES)"!=""
2096 +$(TYPE) $(SHL4ALLRES) > $(SHL4LINKRES)
2097 .ENDIF # "$(SHL4ALLRES)"!=""
2099 .IF "$(USE_DEFFILE)"!=""
2101 $(SHL4LINKER) $(SHL4LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
2102 $(SHL4DEF) \
2103 $(STDOBJ) \
2104 -L$(LB) \
2105 -L$(SOLARVERSION)/$(INPATH)/lib \
2106 $(SHL4OBJS) $(SHL4VERSIONOBJ) \
2107 $(SHL4LIBS) \
2108 $(SHL4STDLIBS:^"-l") \
2109 $(SHL4LINKRES) \
2110 $(SHL4STDSHL:^"-l") $(STDSHL4:^"-l")
2112 .ELSE # "$(USE_DEFFILE)"!=""
2114 $(SHL4LINKER) -v $(SHL4LINKFLAGS) \
2115 $(LINKFLAGSSHL) $(SHL4BASEX) \
2116 $(SHL4STACK) -o $(SHL4TARGETN) \
2117 $(SHL4DEF) \
2118 $(STDOBJ) \
2119 -L$(LB) \
2120 -L$(SOLARVERSION)/$(INPATH)/lib \
2121 $(SHL4OBJS) $(SHL4VERSIONOBJ) \
2122 $(SHL4LIBS) \
2123 $(SHL4STDLIBS:^"-l") \
2124 $(SHL4LINKRES) \
2125 $(SHL4STDSHL:^"-l") $(STDSHL4:^"-l") \
2126 $(LINKOUTPUTFILTER)
2127 @$(LS) $@ >& $(NULLDEV)
2129 .ENDIF # "$(USE_DEFFILE)"!=""
2131 .IF "$(SHL4TARGET8)" != "$(SHL4TARGET)"
2132 +$(COPY) $@ $(@:d)$(SHL4TARGET8).dll
2133 .ENDIF
2135 .ENDIF # "$(GUI)" == "OS2"
2138 .IF "$(TESTDIR)"!=""
2139 .IF "$(NO_TESTS)"==""
2141 ALLTAR : runtest_$(SHL4TARGET)
2143 runtest_$(SHL4TARGET) : $(SHL4TARGETN)
2144 testshl $(SHL4TARGETN) sce/$(SHL4TARGET).sce -msg -skip
2145 .ENDIF # "$(NO_TESTS)"==""
2146 .ENDIF # "$(TESTDIR)"!=""
2147 .ENDIF # "$(SHL4TARGETN)"!=""
2149 # unroll begin
2151 .IF "$(SHL5TARGETN)"!=""
2153 .IF "$(OS)"=="AIX"
2154 SHL5STDLIBS=
2155 .ENDIF
2157 .IF "$(SHLLINKARCONLY)" != ""
2158 SHL5STDLIBS=
2159 STDSHL=
2160 .ELSE
2161 SHL5ARCHIVES=
2162 .ENDIF
2164 # decide how to link
2165 .IF "$(SHL5CODETYPE)"=="C"
2166 SHL5LINKER=$(LINKC)
2167 SHL5STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
2168 SHL5LINKFLAGS+=$(LINKCFLAGS)
2169 .ELSE # "$(SHL5CODETYPE)"=="C"
2170 SHL5LINKER=$(LINK)
2171 SHL5STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
2172 SHL5LINKFLAGS+=$(LINKFLAGS)
2173 .ENDIF # "$(SHL5CODETYPE)"=="C"
2175 SHL5RPATH*=OOO
2176 LINKFLAGSRUNPATH_$(SHL5RPATH)*=/ERROR:/Bad_SHL5RPATH_value
2177 SHL5LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL5RPATH))
2179 .IF "$(SHL5USE_EXPORTS)"==""
2180 SHL5DEF*=$(MISC)/$(SHL5TARGET).def
2181 .ENDIF # "$(SHL5USE_EXPORTS)"==""
2183 EXTRALIBPATHS5=$(EXTRALIBPATHS)
2184 .IF "$(UPDATER)"=="YES"
2185 .IF "$(SHL5NOCHECK)"==""
2186 .IF "$(SOLAR_STLLIBPATH)"!=""
2187 EXTRALIBPATHS5+=-L$(SOLAR_STLLIBPATH)
2188 .ENDIF
2189 .ENDIF # "$(SHL5NOCHECK)"!=""
2190 .ENDIF
2191 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2192 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
2193 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2195 .IF "$(VERSIONOBJ)"!=""
2196 SHL5VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL5TARGET))}$(VERSIONOBJ:f)
2197 USE_VERSIONH:=$(INCCOM)/$(SHL5VERSIONOBJ:b).h
2198 .IF "$(GUI)" == "UNX"
2199 SHL5VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL5TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
2200 .ELSE # "$(GUI)" == "UNX"
2201 SHL5VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL5TARGET))}$(VERSIONOBJ:f)
2202 .ENDIF # "$(GUI)" == "UNX"
2203 $(MISC)/$(SHL5VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL5VERSIONOBJ:b).h
2204 # $(COPY) $(SOLARENV)/src/version.c $@
2205 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL5VERSIONOBJ:b).h/ > $@
2207 .INIT : $(SHL5VERSIONOBJDEP)
2208 .ENDIF # "$(VERSIONOBJ)"!=""
2210 .IF "$(GUI)" != "UNX"
2211 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
2212 .IF "$(SHL5IMPLIB)" == ""
2213 SHL5IMPLIB=i$(TARGET)_t5
2214 .ENDIF # "$(SHL5IMPLIB)" == ""
2215 .IF "$(COM)" != "GCC"
2216 USE_5IMPLIB=-implib:$(LB)/$(SHL5IMPLIB).lib
2217 .ENDIF # "$(COM)" != "GCC"
2218 SHL5IMPLIBN=$(LB)/$(SHL5IMPLIB).lib
2219 ALLTAR : $(SHL5IMPLIBN)
2221 .IF "$(USE_DEFFILE)"==""
2222 USE_5IMPLIB_DEPS=$(LB)/$(SHL5IMPLIB).lib
2223 .ENDIF # "$(USE_DEFFILE)"==""
2224 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
2225 USE_SHL5DEF=$(SHL5DEF)
2226 .ELSE # "$(GUI)" != "UNX"
2227 USE_SHL5DEF=
2228 SHL5DEPN+:=$(SHL5DEPNU)
2230 .IF "$(SHL5VERSIONMAP)"==""
2231 # to activate vmaps remove "#"
2232 USE_SHL5VERSIONMAP=$(MISC)/$(SHL5TARGET).vmap
2233 .ENDIF # "$(SHL5VERSIONMAP)"==""
2235 .IF "$(USE_SHL5VERSIONMAP)"!=""
2237 .IF "$(SHL5FILTERFILE)"!=""
2238 .IF "$(SHL5VERSIONMAP)"!=""
2239 #eine von beiden ist zuviel
2240 USE_SHL5VERSIONMAP=$(MISC)/$(SHL5TARGET).vmap
2241 $(USE_SHL5VERSIONMAP) .PHONY:
2242 @echo -----------------------------
2243 @echo you should only use versionmap OR exportfile
2244 @echo -----------------------------
2245 # force_dmake_to_error
2247 .ENDIF # "$(SHL5VERSIONMAP)"!=""
2249 .IF "$(OS)"!="IRIX"
2250 SHL5VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL5VERSIONMAP)
2251 .ENDIF
2253 $(USE_SHL5VERSIONMAP): \
2254 $(SHL5OBJS)\
2255 $(SHL5LIBS)\
2256 $(SHL5FILTERFILE)
2257 @$(RM) $@.dump
2258 .IF "$(SHL5OBJS)"!=""
2259 # dump remaining objects on the fly
2260 .IF "$(OS)"=="MACOSX"
2261 @-nm $(SHL5OBJS:s/.obj/.o/) > $@.dump
2262 .ELSE
2263 @nm $(SHL5OBJS:s/.obj/.o/) > $@.dump
2264 .ENDIF
2265 .ENDIF # "$(SHL5OBJS)!"=""
2266 @$(TYPE) /dev/null $(SHL5LIBS:s/.lib/.dump/) >> $@.dump
2267 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL5INTERFACE) -f $(SHL5FILTERFILE) -m $@
2269 .ELSE # "$(SHL5FILTERFILE)"!=""
2270 USE_SHL5VERSIONMAP=$(MISC)/$(SHL5TARGET).vmap
2271 $(USE_SHL5VERSIONMAP) :
2272 @echo -----------------------------
2273 @echo SHL5FILTERFILE not set!
2274 @echo -----------------------------
2275 @$(TOUCH) $@
2276 @echo dummy file to keep the dependencies for later use.
2277 # force_dmake_to_error
2278 .ENDIF # "$(SHL5FILTERFILE)"!=""
2279 .ELSE # "$(USE_SHL5VERSIONMAP)"!=""
2281 #and now for the plain non-generic way...
2282 .IF "$(SHL5VERSIONMAP)"!=""
2283 USE_SHL5VERSIONMAP=$(MISC)/$(SHL5VERSIONMAP:b)_$(SHL5TARGET)$(SHL5VERSIONMAP:e)
2284 .IF "$(OS)"!="IRIX"
2285 SHL5VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL5VERSIONMAP)
2286 .ENDIF
2288 .IF "$(OS)"=="MACOSX"
2289 $(USE_SHL5VERSIONMAP): $(SHL5OBJS) $(SHL5LIBS)
2290 .ENDIF
2292 $(USE_SHL5VERSIONMAP): $(SHL5VERSIONMAP)
2293 @@-$(RM) -f $@
2294 # The following files will only be generated and needed on Mac OS X as temporary files
2295 # in order to generate exported symbols list out of Linux/Solaris map files
2296 .IF "$(OS)"=="MACOSX"
2297 @-$(RM) -f $@.symregexp >& $(NULLDEV)
2298 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
2299 .ENDIF
2300 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
2301 # happens if somebody will change it in the future
2302 .IF "$(COMID)"=="gcc3"
2303 tr -d "\015" < $(SHL5VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
2304 .ELIF "$(COMNAME)"=="sunpro5"
2305 tr -d "\015" < $(SHL5VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
2306 .ELSE # "$(COMID)"=="gcc3"
2307 tr -d "\015" < $(SHL5VERSIONMAP) > $@
2308 .ENDIF # "$(COMID)"=="gcc3"
2309 @chmod a+w $@
2310 # Mac OS X post-processing generate an exported symbols list from the generated map file
2311 # for details on exported symbols list see man ld on Mac OS X
2312 .IF "$(OS)"=="MACOSX"
2313 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
2314 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
2315 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
2316 # Extract RTTI symbols from all the objects that will be used to build a shared library
2317 .IF "$(SHL5OBJS)"!=""
2318 -echo $(foreach,i,$(SHL5OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
2319 .ENDIF
2320 .IF "$(SHL5LIBS)"!=""
2321 -$(TYPE) $(foreach,j,$(SHL5LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
2322 .ENDIF
2323 # overwrite the map file generate into the local output tree with the generated
2324 # exported symbols list
2325 cp $@.exported-symbols $@
2326 .ENDIF # .IF "$(OS)"=="MACOSX"
2327 .ENDIF # "$(SHL5VERSIONMAP)"!=""
2328 .ENDIF # "$(USE_SHL5VERSIONMAP)"!=""
2329 .ENDIF # "$(GUI)" != "UNX"
2331 .IF "$(UNIXVERSIONNAMES)"!=""
2332 .IF "$(OS)"!="MACOSX"
2333 .IF "$(GUI)"=="UNX"
2334 .IF "$(OS)"=="IRIX"
2335 SHL5SONAME=$(SONAME_SWITCH)$(SHL5TARGETN:f)
2336 .ELSE
2337 SHL5SONAME=\"$(SONAME_SWITCH)$(SHL5TARGETN:f)\"
2338 .ENDIF
2339 .ENDIF # "$(GUI)"!="UNX"
2340 .ENDIF # "$(OS)"!="MACOSX"
2341 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
2343 .IF "$(SHL5RES)"!=""
2344 SHL5ALLRES+=$(SHL5RES)
2345 SHL5LINKRES*=$(MISC)/$(SHL5TARGET).res
2346 SHL5LINKRESO*=$(MISC)/$(SHL5TARGET)_res.o
2347 .ENDIF # "$(SHL5RES)"!=""
2349 .IF "$(SHL5DEFAULTRES)$(use_shl_versions)"!=""
2350 SHL5DEFAULTRES*=$(MISC)/$(SHL5TARGET)_def.res
2351 SHL5ALLRES+=$(SHL5DEFAULTRES)
2352 SHL5LINKRES*=$(MISC)/$(SHL5TARGET).res
2353 SHL5LINKRESO*=$(MISC)/$(SHL5TARGET)_res.o
2354 .ENDIF # "$(SHL5DEFAULTRES)$(use_shl_versions)"!=""
2356 #.IF "$(SHL5TARGETN)"!=""
2358 .IF "$(linkinc)"!=""
2359 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
2360 .IF "$(SHL5LIBS)"!=""
2361 $(MISC)/$(SHL5TARGET)_linkinc.ls .PHONY:
2362 @@-$(RM) $@
2363 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL5LIBS) $(i:s/.lib/.lin/)) >> $@
2364 .ENDIF # "$(SHL5LIBS)"!=""
2365 .ENDIF
2367 LINKINCTARGETS+=$(MISC)/$(SHL5TARGETN:b)_linkinc.ls
2368 $(SHL5TARGETN) : $(LINKINCTARGETS)
2370 .ELSE
2371 .IF "$(SHL5USE_EXPORTS)"=="name"
2372 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
2373 .IF "$(COM)"!="GCC"
2374 .IF "$(SHL5LIBS)"!=""
2375 SHL5LINKLIST=$(MISC)/$(SHL5TARGET)_link.lst
2376 SHL5LINKLISTPARAM=@$(SHL5LINKLIST)
2377 $(SHL5LINKLIST) : $(SHL5LIBS)
2378 @@-$(RM) $@
2379 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL5LIBS) $(i:s/.lib/.lin/)) >> $@
2380 .ENDIF # "$(SHL5LIBS)"!=""
2381 .ENDIF # "$(COM)"!="GCC"
2382 .ENDIF
2383 .ENDIF # "$(SHL5USE_EXPORTS)"=="name"
2385 $(MISC)/%linkinc.ls:
2386 echo . > $@
2387 .ENDIF # "$(linkinc)"!=""
2389 .IF "$(GUI)" == "OS2"
2390 #21/02/2006 YD dll names must be 8.3, invoke fix script
2391 #check osl/os2/module.c/osl_loadModule()
2392 SHL5TARGET8=$(shell @fix_shl $(SHL5TARGET))
2393 .ENDIF
2395 .IF "$(GUI)" == "OS2"
2396 _SHL5IMP_ORD = $(SHL5STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL5STDLIBS:^"$(LB)/")
2397 SHL5IMP_ORD = $(foreach,i,$(_SHL5IMP_ORD) $(shell @-ls $i))
2398 .ELSE
2399 SHL5IMP_ORD =
2400 .ENDIF
2403 $(SHL5TARGETN) : \
2404 $(SHL5OBJS)\
2405 $(SHL5LIBS)\
2406 $(USE_5IMPLIB_DEPS)\
2407 $(USE_SHL5DEF)\
2408 $(USE_SHL5VERSIONMAP)\
2409 $(SHL5RES)\
2410 $(SHL5DEPN) \
2411 $(SHL5IMP_ORD) \
2412 $(SHL5LINKLIST)
2413 @echo ------------------------------
2414 @echo Making: $(SHL5TARGETN)
2415 .IF "$(GUI)" == "WNT"
2416 .IF "$(SHL5DEFAULTRES)"!=""
2417 @@-$(RM) $(MISC)/$(SHL5DEFAULTRES:b).rc
2418 .IF "$(SHL5ICON)" != ""
2419 @echo 1 ICON $(SHL5ICON) >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2420 .ENDIF
2421 .IF "$(use_shl_versions)" != ""
2422 .IF "$(SHL5ADD_VERINFO)"!=""
2423 @echo $(EMQ)#include $(EMQ)"$(SHL5ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2424 .ELSE # "$(SHL5ADD_VERINFO)"!=""
2425 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2426 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2427 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2428 .ENDIF # "$(SHL5ADD_VERINFO)"!=""
2429 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2430 @echo $(EMQ)#define ORG_NAME $(SHL5TARGET)$(DLLPOST) >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2431 @echo $(EMQ)#define INTERNAL_NAME $(SHL5TARGET:b) >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2432 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2433 .ENDIF # "$(use_shl_versions)" != ""
2434 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL5DEFAULTRES:b).rc
2435 .ENDIF # "$(SHL5DEFAULTRES)"!=""
2436 .IF "$(SHL5ALLRES)"!=""
2437 $(TYPE) $(SHL5ALLRES) > $(SHL5LINKRES)
2438 .IF "$(COM)"=="GCC"
2439 windres $(SHL5LINKRES) $(SHL5LINKRESO)
2440 .ENDIF # "$(COM)"=="GCC"
2441 .ENDIF # "$(SHL5ALLRES)"!=""
2442 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
2443 @echo dlltool --input-def $(SHL5DEF) \
2444 --dllname $(SHL5TARGET)$(DLLPOST) \
2445 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_5.cmd
2446 .IF "$(DEFLIB5NAME)"!="" # do not have to include objs
2447 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_5.cmd
2448 .ELSE # "$(DEFLIB5NAME)"!="" # do not have to include objs
2449 @echo --output-exp $(MISC)/$(@:b)_exp.o \
2450 $(STDOBJ) $(SHL5OBJS) $(SHL5LINKRESO) \
2451 `$(TYPE) /dev/null $(SHL5LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_5.cmd
2452 .ENDIF # "$(DEFLIB5NAME)"!=""
2453 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
2454 $(STDOBJ) $(SHL5VERSIONOBJ) $(SHL5DESCRIPTIONOBJ) $(SHL5OBJS) $(SHL5LINKRESO) \
2455 `$(TYPE) /dev/null $(SHL5LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
2456 -Wl,--exclude-libs,ALL,--start-group $(SHL5STDLIBS) -Wl,--end-group \
2457 $(SHL5STDSHL) $(STDSHL5) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
2458 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_5.cmd
2459 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_5.cmd
2460 @+source $(MISC)/$(TARGET).$(@:b)_5.cmd
2461 .ELSE
2462 .IF "$(linkinc)"==""
2463 .IF "$(SHL5USE_EXPORTS)"!="name"
2464 .IF "$(USE_DEFFILE)"!=""
2465 $(SHL5LINKER) @$(mktmp \
2466 $(SHL5LINKFLAGS) \
2467 $(LINKFLAGSSHL) \
2468 $(SHL5STACK) $(SHL5BASEX) \
2469 -out:$@ \
2470 -map:$(MISC)/$(@:b).map \
2471 -def:$(SHL5DEF) \
2472 $(USE_5IMPLIB) \
2473 $(STDOBJ) \
2474 $(SHL5VERSIONOBJ) $(SHL5OBJS) \
2475 $(SHL5LIBS) \
2476 $(SHL5STDLIBS) \
2477 $(SHL5STDSHL) $(STDSHL5) \
2478 $(SHL5LINKRES) \
2479 ) $(LINKOUTPUTFILTER)
2480 # double check if target was really written... still making sense?
2481 @@$(LS) $@
2482 @echo linking $@.manifest ...
2483 .IF "$(VISTA_MANIFEST)"!=""
2484 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
2485 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
2486 .ELSE
2487 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
2488 .ENDIF # "$(VISTA_MANIFEST)"!=""
2489 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
2490 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2491 .ELSE # "$(USE_DEFFILE)"!=""
2492 $(SHL5LINKER) @$(mktmp $(SHL5LINKFLAGS) \
2493 $(LINKFLAGSSHL) $(SHL5BASEX) \
2494 $(SHL5STACK) -out:$(SHL5TARGETN) \
2495 -map:$(MISC)/$(@:B).map \
2496 $(LB)/$(SHL5IMPLIB).exp \
2497 $(STDOBJ) \
2498 $(SHL5OBJS) $(SHL5VERSIONOBJ) \
2499 $(SHL5LIBS) \
2500 $(SHL5STDLIBS) \
2501 $(SHL5STDSHL) $(STDSHL5) \
2502 $(SHL5LINKRES) \
2503 ) $(LINKOUTPUTFILTER)
2504 # double check if target was really written... still making sense?
2505 @@$(LS) $@
2506 @echo linking $@.manifest ...
2507 .IF "$(VISTA_MANIFEST)"!=""
2508 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
2509 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
2510 .ELSE
2511 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
2512 .ENDIF # "$(VISTA_MANIFEST)"!=""
2513 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
2514 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2515 .ENDIF # "$(USE_DEFFILE)"!=""
2516 .ELSE # "$(SHL5USE_EXPORTS)"!="name"
2517 $(SHL5LINKER) @$(mktmp $(SHL5LINKFLAGS) \
2518 $(LINKFLAGSSHL) $(SHL5BASEX) \
2519 $(SHL5STACK) -out:$(SHL5TARGETN) \
2520 -map:$(MISC)/$(@:B).map \
2521 $(USE_5IMPLIB) \
2522 $(STDOBJ) \
2523 $(SHL5OBJS) $(SHL5VERSIONOBJ)) \
2524 $(SHL5LINKLISTPARAM) \
2525 @$(mktmp $(SHL5STDLIBS) \
2526 $(SHL5STDSHL) $(STDSHL5) \
2527 $(SHL5LINKRES) \
2529 @echo linking $@.manifest ...
2530 .IF "$(VISTA_MANIFEST)"!=""
2531 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
2532 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
2533 .ELSE
2534 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
2535 .ENDIF # "$(VISTA_MANIFEST)"!=""
2536 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
2537 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2538 .ENDIF # "$(SHL5USE_EXPORTS)"!="name"
2539 .ELSE # "$(linkinc)"==""
2540 -$(RM) del $(MISC)/$(SHL5TARGET).lnk
2541 -$(RM) $(MISC)/$(SHL5TARGET).lst
2542 $(TYPE) $(mktmp \
2543 $(SHL5LINKFLAGS) \
2544 $(LINKFLAGSSHL) $(SHL5BASEX) \
2545 $(SHL5STACK) $(MAPFILE) \
2546 -out:$@ \
2547 $(LB)/$(SHL5IMPLIB).exp \
2548 $(STDOBJ) \
2549 $(SHL5OBJS) \
2550 $(SHL5STDLIBS) \
2551 $(SHL5STDSHL) $(STDSHL5) \
2552 $(SHL5LINKRES) \
2553 ) >> $(MISC)/$(SHL5TARGET).lnk
2554 $(TYPE) $(MISC)/$(SHL5TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL5TARGET).lnk
2555 $(SHL5LINKER) @$(MISC)/$(SHL5TARGET).lnk
2556 @echo linking $@.manifest ...
2557 .IF "$(VISTA_MANIFEST)"!=""
2558 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
2559 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
2560 .ELSE
2561 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
2562 .ENDIF # "$(VISTA_MANIFEST)"!=""
2563 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
2564 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2565 .ENDIF # "$(linkinc)"==""
2566 .ENDIF # "$(COM)"=="GCC"
2567 .ENDIF # "$(GUI)" == "WNT"
2568 .IF "$(GUI)"=="UNX"
2569 .IF "$(OS)"=="MACOSX"
2570 @-$(RM) $(MISC)/$(@:b).list
2571 @-$(RM) $(MISC)/$(TARGET).$(@:b)_5.cmd
2572 @echo $(STDSLO) $(SHL5OBJS:s/.obj/.o/) \
2573 $(SHL5VERSIONOBJ) \
2574 `cat /dev/null $(SHL5LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
2575 @echo -n $(SHL5LINKER) $(SHL5LINKFLAGS) $(SHL5VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
2576 $(SHL5STDLIBS) $(SHL5ARCHIVES) $(SHL5STDSHL) $(STDSHL5) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_5.cmd
2577 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
2578 `cat $(MISC)/$(TARGET).$(@:b)_5.cmd` \
2579 >> $(MISC)/$(TARGET).$(@:b)_5.cmd
2580 @cat $(MISC)/$(TARGET).$(@:b)_5.cmd
2581 @+source $(MISC)/$(TARGET).$(@:b)_5.cmd
2582 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
2583 shl $(SHL5RPATH) $@
2584 @echo "Making: $@.jnilib"
2585 @macosx-create-bundle $@
2586 .IF "$(UPDATER)"=="YES"
2587 .IF "$(SHL5NOCHECK)"==""
2588 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS5) $(SHL5TARGETN)
2589 .ENDIF # "$(SHL5NOCHECK)"!=""
2590 .ENDIF
2591 .ELSE # "$(OS)"=="MACOSX"
2592 @-$(RM) $(MISC)/$(TARGET).$(@:b)_5.cmd
2593 @echo $(SHL5LINKER) $(SHL5LINKFLAGS) $(SHL5SONAME) $(LINKFLAGSSHL) $(SHL5VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL5OBJS:s/.obj/.o/) \
2594 $(SHL5VERSIONOBJ) -o $@ \
2595 `cat /dev/null $(SHL5LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
2596 $(SHL5STDLIBS) $(SHL5ARCHIVES) $(SHL5STDSHL) $(STDSHL5) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_5.cmd
2597 @cat $(MISC)/$(TARGET).$(@:b)_5.cmd
2598 @+source $(MISC)/$(TARGET).$(@:b)_5.cmd
2599 .IF "$(UPDATER)"=="YES"
2600 .IF "$(SHL5NOCHECK)"==""
2601 -$(RM) $(SHL5TARGETN:d)check_$(SHL5TARGETN:f)
2602 $(RENAME) $(SHL5TARGETN) $(SHL5TARGETN:d)check_$(SHL5TARGETN:f)
2603 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS5) $(SHL5TARGETN:d)check_$(SHL5TARGETN:f)
2604 .ENDIF # "$(SHL5NOCHECK)"!=""
2605 .ENDIF # "$(UPDATER)"=="YES"
2606 .ENDIF # "$(OS)"=="MACOSX"
2607 .IF "$(UNIXVERSIONNAMES)"!=""
2608 $(RM) $(LB)/$(SHL5TARGETN:b)
2609 cd $(LB) && ln -s $(SHL5TARGETN:f) $(SHL5TARGETN:b)
2610 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
2611 @ls -l $@
2612 .ENDIF # "$(GUI)" == "UNX"
2614 .IF "$(GUI)" == "OS2"
2616 .IF "$(SHL5DEFAULTRES)"!=""
2617 @+-$(RM) $(MISC)/$(SHL5DEFAULTRES:b).rc >& $(NULLDEV)
2618 .IF "$(SHL5ICON)" != ""
2619 @-+echo 1 ICON $(SHL5ICON) >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2620 .ENDIF
2621 .IF "$(use_shl_versions)" != ""
2622 .IF "$(SHL5ADD_VERINFO)"!=""
2623 @-+echo $(EMQ)#include $(EMQ)"$(SHL5ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2624 .ENDIF # "$(SHL5ADD_VERINFO)"!=""
2625 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2626 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL5DEFAULTRES:b).rc
2627 .ENDIF # "$(use_shl_versions)" != ""
2628 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
2629 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL5DEFAULTRES:b).rc
2630 .ENDIF # "$(SHL5DEFAULTRES)"!=""
2632 .IF "$(SHL5ALLRES)"!=""
2633 +$(TYPE) $(SHL5ALLRES) > $(SHL5LINKRES)
2634 .ENDIF # "$(SHL5ALLRES)"!=""
2636 .IF "$(USE_DEFFILE)"!=""
2638 $(SHL5LINKER) $(SHL5LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
2639 $(SHL5DEF) \
2640 $(STDOBJ) \
2641 -L$(LB) \
2642 -L$(SOLARVERSION)/$(INPATH)/lib \
2643 $(SHL5OBJS) $(SHL5VERSIONOBJ) \
2644 $(SHL5LIBS) \
2645 $(SHL5STDLIBS:^"-l") \
2646 $(SHL5LINKRES) \
2647 $(SHL5STDSHL:^"-l") $(STDSHL5:^"-l")
2649 .ELSE # "$(USE_DEFFILE)"!=""
2651 $(SHL5LINKER) -v $(SHL5LINKFLAGS) \
2652 $(LINKFLAGSSHL) $(SHL5BASEX) \
2653 $(SHL5STACK) -o $(SHL5TARGETN) \
2654 $(SHL5DEF) \
2655 $(STDOBJ) \
2656 -L$(LB) \
2657 -L$(SOLARVERSION)/$(INPATH)/lib \
2658 $(SHL5OBJS) $(SHL5VERSIONOBJ) \
2659 $(SHL5LIBS) \
2660 $(SHL5STDLIBS:^"-l") \
2661 $(SHL5LINKRES) \
2662 $(SHL5STDSHL:^"-l") $(STDSHL5:^"-l") \
2663 $(LINKOUTPUTFILTER)
2664 @$(LS) $@ >& $(NULLDEV)
2666 .ENDIF # "$(USE_DEFFILE)"!=""
2668 .IF "$(SHL5TARGET8)" != "$(SHL5TARGET)"
2669 +$(COPY) $@ $(@:d)$(SHL5TARGET8).dll
2670 .ENDIF
2672 .ENDIF # "$(GUI)" == "OS2"
2675 .IF "$(TESTDIR)"!=""
2676 .IF "$(NO_TESTS)"==""
2678 ALLTAR : runtest_$(SHL5TARGET)
2680 runtest_$(SHL5TARGET) : $(SHL5TARGETN)
2681 testshl $(SHL5TARGETN) sce/$(SHL5TARGET).sce -msg -skip
2682 .ENDIF # "$(NO_TESTS)"==""
2683 .ENDIF # "$(TESTDIR)"!=""
2684 .ENDIF # "$(SHL5TARGETN)"!=""
2686 # unroll begin
2688 .IF "$(SHL6TARGETN)"!=""
2690 .IF "$(OS)"=="AIX"
2691 SHL6STDLIBS=
2692 .ENDIF
2694 .IF "$(SHLLINKARCONLY)" != ""
2695 SHL6STDLIBS=
2696 STDSHL=
2697 .ELSE
2698 SHL6ARCHIVES=
2699 .ENDIF
2701 # decide how to link
2702 .IF "$(SHL6CODETYPE)"=="C"
2703 SHL6LINKER=$(LINKC)
2704 SHL6STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
2705 SHL6LINKFLAGS+=$(LINKCFLAGS)
2706 .ELSE # "$(SHL6CODETYPE)"=="C"
2707 SHL6LINKER=$(LINK)
2708 SHL6STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
2709 SHL6LINKFLAGS+=$(LINKFLAGS)
2710 .ENDIF # "$(SHL6CODETYPE)"=="C"
2712 SHL6RPATH*=OOO
2713 LINKFLAGSRUNPATH_$(SHL6RPATH)*=/ERROR:/Bad_SHL6RPATH_value
2714 SHL6LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL6RPATH))
2716 .IF "$(SHL6USE_EXPORTS)"==""
2717 SHL6DEF*=$(MISC)/$(SHL6TARGET).def
2718 .ENDIF # "$(SHL6USE_EXPORTS)"==""
2720 EXTRALIBPATHS6=$(EXTRALIBPATHS)
2721 .IF "$(UPDATER)"=="YES"
2722 .IF "$(SHL6NOCHECK)"==""
2723 .IF "$(SOLAR_STLLIBPATH)"!=""
2724 EXTRALIBPATHS6+=-L$(SOLAR_STLLIBPATH)
2725 .ENDIF
2726 .ENDIF # "$(SHL6NOCHECK)"!=""
2727 .ENDIF
2728 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2729 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
2730 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2732 .IF "$(VERSIONOBJ)"!=""
2733 SHL6VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL6TARGET))}$(VERSIONOBJ:f)
2734 USE_VERSIONH:=$(INCCOM)/$(SHL6VERSIONOBJ:b).h
2735 .IF "$(GUI)" == "UNX"
2736 SHL6VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL6TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
2737 .ELSE # "$(GUI)" == "UNX"
2738 SHL6VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL6TARGET))}$(VERSIONOBJ:f)
2739 .ENDIF # "$(GUI)" == "UNX"
2740 $(MISC)/$(SHL6VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL6VERSIONOBJ:b).h
2741 # $(COPY) $(SOLARENV)/src/version.c $@
2742 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL6VERSIONOBJ:b).h/ > $@
2744 .INIT : $(SHL6VERSIONOBJDEP)
2745 .ENDIF # "$(VERSIONOBJ)"!=""
2747 .IF "$(GUI)" != "UNX"
2748 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
2749 .IF "$(SHL6IMPLIB)" == ""
2750 SHL6IMPLIB=i$(TARGET)_t6
2751 .ENDIF # "$(SHL6IMPLIB)" == ""
2752 .IF "$(COM)" != "GCC"
2753 USE_6IMPLIB=-implib:$(LB)/$(SHL6IMPLIB).lib
2754 .ENDIF # "$(COM)" != "GCC"
2755 SHL6IMPLIBN=$(LB)/$(SHL6IMPLIB).lib
2756 ALLTAR : $(SHL6IMPLIBN)
2758 .IF "$(USE_DEFFILE)"==""
2759 USE_6IMPLIB_DEPS=$(LB)/$(SHL6IMPLIB).lib
2760 .ENDIF # "$(USE_DEFFILE)"==""
2761 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
2762 USE_SHL6DEF=$(SHL6DEF)
2763 .ELSE # "$(GUI)" != "UNX"
2764 USE_SHL6DEF=
2765 SHL6DEPN+:=$(SHL6DEPNU)
2767 .IF "$(SHL6VERSIONMAP)"==""
2768 # to activate vmaps remove "#"
2769 USE_SHL6VERSIONMAP=$(MISC)/$(SHL6TARGET).vmap
2770 .ENDIF # "$(SHL6VERSIONMAP)"==""
2772 .IF "$(USE_SHL6VERSIONMAP)"!=""
2774 .IF "$(SHL6FILTERFILE)"!=""
2775 .IF "$(SHL6VERSIONMAP)"!=""
2776 #eine von beiden ist zuviel
2777 USE_SHL6VERSIONMAP=$(MISC)/$(SHL6TARGET).vmap
2778 $(USE_SHL6VERSIONMAP) .PHONY:
2779 @echo -----------------------------
2780 @echo you should only use versionmap OR exportfile
2781 @echo -----------------------------
2782 # force_dmake_to_error
2784 .ENDIF # "$(SHL6VERSIONMAP)"!=""
2786 .IF "$(OS)"!="IRIX"
2787 SHL6VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL6VERSIONMAP)
2788 .ENDIF
2790 $(USE_SHL6VERSIONMAP): \
2791 $(SHL6OBJS)\
2792 $(SHL6LIBS)\
2793 $(SHL6FILTERFILE)
2794 @$(RM) $@.dump
2795 .IF "$(SHL6OBJS)"!=""
2796 # dump remaining objects on the fly
2797 .IF "$(OS)"=="MACOSX"
2798 @-nm $(SHL6OBJS:s/.obj/.o/) > $@.dump
2799 .ELSE
2800 @nm $(SHL6OBJS:s/.obj/.o/) > $@.dump
2801 .ENDIF
2802 .ENDIF # "$(SHL6OBJS)!"=""
2803 @$(TYPE) /dev/null $(SHL6LIBS:s/.lib/.dump/) >> $@.dump
2804 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL6INTERFACE) -f $(SHL6FILTERFILE) -m $@
2806 .ELSE # "$(SHL6FILTERFILE)"!=""
2807 USE_SHL6VERSIONMAP=$(MISC)/$(SHL6TARGET).vmap
2808 $(USE_SHL6VERSIONMAP) :
2809 @echo -----------------------------
2810 @echo SHL6FILTERFILE not set!
2811 @echo -----------------------------
2812 @$(TOUCH) $@
2813 @echo dummy file to keep the dependencies for later use.
2814 # force_dmake_to_error
2815 .ENDIF # "$(SHL6FILTERFILE)"!=""
2816 .ELSE # "$(USE_SHL6VERSIONMAP)"!=""
2818 #and now for the plain non-generic way...
2819 .IF "$(SHL6VERSIONMAP)"!=""
2820 USE_SHL6VERSIONMAP=$(MISC)/$(SHL6VERSIONMAP:b)_$(SHL6TARGET)$(SHL6VERSIONMAP:e)
2821 .IF "$(OS)"!="IRIX"
2822 SHL6VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL6VERSIONMAP)
2823 .ENDIF
2825 .IF "$(OS)"=="MACOSX"
2826 $(USE_SHL6VERSIONMAP): $(SHL6OBJS) $(SHL6LIBS)
2827 .ENDIF
2829 $(USE_SHL6VERSIONMAP): $(SHL6VERSIONMAP)
2830 @@-$(RM) -f $@
2831 # The following files will only be generated and needed on Mac OS X as temporary files
2832 # in order to generate exported symbols list out of Linux/Solaris map files
2833 .IF "$(OS)"=="MACOSX"
2834 @-$(RM) -f $@.symregexp >& $(NULLDEV)
2835 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
2836 .ENDIF
2837 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
2838 # happens if somebody will change it in the future
2839 .IF "$(COMID)"=="gcc3"
2840 tr -d "\015" < $(SHL6VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
2841 .ELIF "$(COMNAME)"=="sunpro5"
2842 tr -d "\015" < $(SHL6VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
2843 .ELSE # "$(COMID)"=="gcc3"
2844 tr -d "\015" < $(SHL6VERSIONMAP) > $@
2845 .ENDIF # "$(COMID)"=="gcc3"
2846 @chmod a+w $@
2847 # Mac OS X post-processing generate an exported symbols list from the generated map file
2848 # for details on exported symbols list see man ld on Mac OS X
2849 .IF "$(OS)"=="MACOSX"
2850 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
2851 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
2852 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
2853 # Extract RTTI symbols from all the objects that will be used to build a shared library
2854 .IF "$(SHL6OBJS)"!=""
2855 -echo $(foreach,i,$(SHL6OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
2856 .ENDIF
2857 .IF "$(SHL6LIBS)"!=""
2858 -$(TYPE) $(foreach,j,$(SHL6LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
2859 .ENDIF
2860 # overwrite the map file generate into the local output tree with the generated
2861 # exported symbols list
2862 cp $@.exported-symbols $@
2863 .ENDIF # .IF "$(OS)"=="MACOSX"
2864 .ENDIF # "$(SHL6VERSIONMAP)"!=""
2865 .ENDIF # "$(USE_SHL6VERSIONMAP)"!=""
2866 .ENDIF # "$(GUI)" != "UNX"
2868 .IF "$(UNIXVERSIONNAMES)"!=""
2869 .IF "$(OS)"!="MACOSX"
2870 .IF "$(GUI)"=="UNX"
2871 .IF "$(OS)"=="IRIX"
2872 SHL6SONAME=$(SONAME_SWITCH)$(SHL6TARGETN:f)
2873 .ELSE
2874 SHL6SONAME=\"$(SONAME_SWITCH)$(SHL6TARGETN:f)\"
2875 .ENDIF
2876 .ENDIF # "$(GUI)"!="UNX"
2877 .ENDIF # "$(OS)"!="MACOSX"
2878 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
2880 .IF "$(SHL6RES)"!=""
2881 SHL6ALLRES+=$(SHL6RES)
2882 SHL6LINKRES*=$(MISC)/$(SHL6TARGET).res
2883 SHL6LINKRESO*=$(MISC)/$(SHL6TARGET)_res.o
2884 .ENDIF # "$(SHL6RES)"!=""
2886 .IF "$(SHL6DEFAULTRES)$(use_shl_versions)"!=""
2887 SHL6DEFAULTRES*=$(MISC)/$(SHL6TARGET)_def.res
2888 SHL6ALLRES+=$(SHL6DEFAULTRES)
2889 SHL6LINKRES*=$(MISC)/$(SHL6TARGET).res
2890 SHL6LINKRESO*=$(MISC)/$(SHL6TARGET)_res.o
2891 .ENDIF # "$(SHL6DEFAULTRES)$(use_shl_versions)"!=""
2893 #.IF "$(SHL6TARGETN)"!=""
2895 .IF "$(linkinc)"!=""
2896 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
2897 .IF "$(SHL6LIBS)"!=""
2898 $(MISC)/$(SHL6TARGET)_linkinc.ls .PHONY:
2899 @@-$(RM) $@
2900 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL6LIBS) $(i:s/.lib/.lin/)) >> $@
2901 .ENDIF # "$(SHL6LIBS)"!=""
2902 .ENDIF
2904 LINKINCTARGETS+=$(MISC)/$(SHL6TARGETN:b)_linkinc.ls
2905 $(SHL6TARGETN) : $(LINKINCTARGETS)
2907 .ELSE
2908 .IF "$(SHL6USE_EXPORTS)"=="name"
2909 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
2910 .IF "$(COM)"!="GCC"
2911 .IF "$(SHL6LIBS)"!=""
2912 SHL6LINKLIST=$(MISC)/$(SHL6TARGET)_link.lst
2913 SHL6LINKLISTPARAM=@$(SHL6LINKLIST)
2914 $(SHL6LINKLIST) : $(SHL6LIBS)
2915 @@-$(RM) $@
2916 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL6LIBS) $(i:s/.lib/.lin/)) >> $@
2917 .ENDIF # "$(SHL6LIBS)"!=""
2918 .ENDIF # "$(COM)"!="GCC"
2919 .ENDIF
2920 .ENDIF # "$(SHL6USE_EXPORTS)"=="name"
2922 $(MISC)/%linkinc.ls:
2923 echo . > $@
2924 .ENDIF # "$(linkinc)"!=""
2926 .IF "$(GUI)" == "OS2"
2927 #21/02/2006 YD dll names must be 8.3, invoke fix script
2928 #check osl/os2/module.c/osl_loadModule()
2929 SHL6TARGET8=$(shell @fix_shl $(SHL6TARGET))
2930 .ENDIF
2932 .IF "$(GUI)" == "OS2"
2933 _SHL6IMP_ORD = $(SHL6STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL6STDLIBS:^"$(LB)/")
2934 SHL6IMP_ORD = $(foreach,i,$(_SHL6IMP_ORD) $(shell @-ls $i))
2935 .ELSE
2936 SHL6IMP_ORD =
2937 .ENDIF
2940 $(SHL6TARGETN) : \
2941 $(SHL6OBJS)\
2942 $(SHL6LIBS)\
2943 $(USE_6IMPLIB_DEPS)\
2944 $(USE_SHL6DEF)\
2945 $(USE_SHL6VERSIONMAP)\
2946 $(SHL6RES)\
2947 $(SHL6DEPN) \
2948 $(SHL6IMP_ORD) \
2949 $(SHL6LINKLIST)
2950 @echo ------------------------------
2951 @echo Making: $(SHL6TARGETN)
2952 .IF "$(GUI)" == "WNT"
2953 .IF "$(SHL6DEFAULTRES)"!=""
2954 @@-$(RM) $(MISC)/$(SHL6DEFAULTRES:b).rc
2955 .IF "$(SHL6ICON)" != ""
2956 @echo 1 ICON $(SHL6ICON) >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2957 .ENDIF
2958 .IF "$(use_shl_versions)" != ""
2959 .IF "$(SHL6ADD_VERINFO)"!=""
2960 @echo $(EMQ)#include $(EMQ)"$(SHL6ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2961 .ELSE # "$(SHL6ADD_VERINFO)"!=""
2962 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2963 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2964 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2965 .ENDIF # "$(SHL6ADD_VERINFO)"!=""
2966 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2967 @echo $(EMQ)#define ORG_NAME $(SHL6TARGET)$(DLLPOST) >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2968 @echo $(EMQ)#define INTERNAL_NAME $(SHL6TARGET:b) >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2969 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL6DEFAULTRES:b).rc
2970 .ENDIF # "$(use_shl_versions)" != ""
2971 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL6DEFAULTRES:b).rc
2972 .ENDIF # "$(SHL6DEFAULTRES)"!=""
2973 .IF "$(SHL6ALLRES)"!=""
2974 $(TYPE) $(SHL6ALLRES) > $(SHL6LINKRES)
2975 .IF "$(COM)"=="GCC"
2976 windres $(SHL6LINKRES) $(SHL6LINKRESO)
2977 .ENDIF # "$(COM)"=="GCC"
2978 .ENDIF # "$(SHL6ALLRES)"!=""
2979 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
2980 @echo dlltool --input-def $(SHL6DEF) \
2981 --dllname $(SHL6TARGET)$(DLLPOST) \
2982 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_6.cmd
2983 .IF "$(DEFLIB6NAME)"!="" # do not have to include objs
2984 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_6.cmd
2985 .ELSE # "$(DEFLIB6NAME)"!="" # do not have to include objs
2986 @echo --output-exp $(MISC)/$(@:b)_exp.o \
2987 $(STDOBJ) $(SHL6OBJS) $(SHL6LINKRESO) \
2988 `$(TYPE) /dev/null $(SHL6LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_6.cmd
2989 .ENDIF # "$(DEFLIB6NAME)"!=""
2990 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
2991 $(STDOBJ) $(SHL6VERSIONOBJ) $(SHL6DESCRIPTIONOBJ) $(SHL6OBJS) $(SHL6LINKRESO) \
2992 `$(TYPE) /dev/null $(SHL6LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
2993 -Wl,--exclude-libs,ALL,--start-group $(SHL6STDLIBS) -Wl,--end-group \
2994 $(SHL6STDSHL) $(STDSHL6) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
2995 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_6.cmd
2996 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_6.cmd
2997 @+source $(MISC)/$(TARGET).$(@:b)_6.cmd
2998 .ELSE
2999 .IF "$(linkinc)"==""
3000 .IF "$(SHL6USE_EXPORTS)"!="name"
3001 .IF "$(USE_DEFFILE)"!=""
3002 $(SHL6LINKER) @$(mktmp \
3003 $(SHL6LINKFLAGS) \
3004 $(LINKFLAGSSHL) \
3005 $(SHL6STACK) $(SHL6BASEX) \
3006 -out:$@ \
3007 -map:$(MISC)/$(@:b).map \
3008 -def:$(SHL6DEF) \
3009 $(USE_6IMPLIB) \
3010 $(STDOBJ) \
3011 $(SHL6VERSIONOBJ) $(SHL6OBJS) \
3012 $(SHL6LIBS) \
3013 $(SHL6STDLIBS) \
3014 $(SHL6STDSHL) $(STDSHL6) \
3015 $(SHL6LINKRES) \
3016 ) $(LINKOUTPUTFILTER)
3017 # double check if target was really written... still making sense?
3018 @@$(LS) $@
3019 @echo linking $@.manifest ...
3020 .IF "$(VISTA_MANIFEST)"!=""
3021 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
3022 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
3023 .ELSE
3024 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
3025 .ENDIF # "$(VISTA_MANIFEST)"!=""
3026 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
3027 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
3028 .ELSE # "$(USE_DEFFILE)"!=""
3029 $(SHL6LINKER) @$(mktmp $(SHL6LINKFLAGS) \
3030 $(LINKFLAGSSHL) $(SHL6BASEX) \
3031 $(SHL6STACK) -out:$(SHL6TARGETN) \
3032 -map:$(MISC)/$(@:B).map \
3033 $(LB)/$(SHL6IMPLIB).exp \
3034 $(STDOBJ) \
3035 $(SHL6OBJS) $(SHL6VERSIONOBJ) \
3036 $(SHL6LIBS) \
3037 $(SHL6STDLIBS) \
3038 $(SHL6STDSHL) $(STDSHL6) \
3039 $(SHL6LINKRES) \
3040 ) $(LINKOUTPUTFILTER)
3041 # double check if target was really written... still making sense?
3042 @@$(LS) $@
3043 @echo linking $@.manifest ...
3044 .IF "$(VISTA_MANIFEST)"!=""
3045 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
3046 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
3047 .ELSE
3048 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
3049 .ENDIF # "$(VISTA_MANIFEST)"!=""
3050 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
3051 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
3052 .ENDIF # "$(USE_DEFFILE)"!=""
3053 .ELSE # "$(SHL6USE_EXPORTS)"!="name"
3054 $(SHL6LINKER) @$(mktmp $(SHL6LINKFLAGS) \
3055 $(LINKFLAGSSHL) $(SHL6BASEX) \
3056 $(SHL6STACK) -out:$(SHL6TARGETN) \
3057 -map:$(MISC)/$(@:B).map \
3058 $(USE_6IMPLIB) \
3059 $(STDOBJ) \
3060 $(SHL6OBJS) $(SHL6VERSIONOBJ)) \
3061 $(SHL6LINKLISTPARAM) \
3062 @$(mktmp $(SHL6STDLIBS) \
3063 $(SHL6STDSHL) $(STDSHL6) \
3064 $(SHL6LINKRES) \
3066 @echo linking $@.manifest ...
3067 .IF "$(VISTA_MANIFEST)"!=""
3068 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
3069 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
3070 .ELSE
3071 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
3072 .ENDIF # "$(VISTA_MANIFEST)"!=""
3073 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
3074 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
3075 .ENDIF # "$(SHL6USE_EXPORTS)"!="name"
3076 .ELSE # "$(linkinc)"==""
3077 -$(RM) del $(MISC)/$(SHL6TARGET).lnk
3078 -$(RM) $(MISC)/$(SHL6TARGET).lst
3079 $(TYPE) $(mktmp \
3080 $(SHL6LINKFLAGS) \
3081 $(LINKFLAGSSHL) $(SHL6BASEX) \
3082 $(SHL6STACK) $(MAPFILE) \
3083 -out:$@ \
3084 $(LB)/$(SHL6IMPLIB).exp \
3085 $(STDOBJ) \
3086 $(SHL6OBJS) \
3087 $(SHL6STDLIBS) \
3088 $(SHL6STDSHL) $(STDSHL6) \
3089 $(SHL6LINKRES) \
3090 ) >> $(MISC)/$(SHL6TARGET).lnk
3091 $(TYPE) $(MISC)/$(SHL6TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL6TARGET).lnk
3092 $(SHL6LINKER) @$(MISC)/$(SHL6TARGET).lnk
3093 @echo linking $@.manifest ...
3094 .IF "$(VISTA_MANIFEST)"!=""
3095 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
3096 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
3097 .ELSE
3098 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
3099 .ENDIF # "$(VISTA_MANIFEST)"!=""
3100 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
3101 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
3102 .ENDIF # "$(linkinc)"==""
3103 .ENDIF # "$(COM)"=="GCC"
3104 .ENDIF # "$(GUI)" == "WNT"
3105 .IF "$(GUI)"=="UNX"
3106 .IF "$(OS)"=="MACOSX"
3107 @-$(RM) $(MISC)/$(@:b).list
3108 @-$(RM) $(MISC)/$(TARGET).$(@:b)_6.cmd
3109 @echo $(STDSLO) $(SHL6OBJS:s/.obj/.o/) \
3110 $(SHL6VERSIONOBJ) \
3111 `cat /dev/null $(SHL6LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
3112 @echo -n $(SHL6LINKER) $(SHL6LINKFLAGS) $(SHL6VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
3113 $(SHL6STDLIBS) $(SHL6ARCHIVES) $(SHL6STDSHL) $(STDSHL6) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_6.cmd
3114 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
3115 `cat $(MISC)/$(TARGET).$(@:b)_6.cmd` \
3116 >> $(MISC)/$(TARGET).$(@:b)_6.cmd
3117 @cat $(MISC)/$(TARGET).$(@:b)_6.cmd
3118 @+source $(MISC)/$(TARGET).$(@:b)_6.cmd
3119 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
3120 shl $(SHL6RPATH) $@
3121 @echo "Making: $@.jnilib"
3122 @macosx-create-bundle $@
3123 .IF "$(UPDATER)"=="YES"
3124 .IF "$(SHL6NOCHECK)"==""
3125 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS6) $(SHL6TARGETN)
3126 .ENDIF # "$(SHL6NOCHECK)"!=""
3127 .ENDIF
3128 .ELSE # "$(OS)"=="MACOSX"
3129 @-$(RM) $(MISC)/$(TARGET).$(@:b)_6.cmd
3130 @echo $(SHL6LINKER) $(SHL6LINKFLAGS) $(SHL6SONAME) $(LINKFLAGSSHL) $(SHL6VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL6OBJS:s/.obj/.o/) \
3131 $(SHL6VERSIONOBJ) -o $@ \
3132 `cat /dev/null $(SHL6LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
3133 $(SHL6STDLIBS) $(SHL6ARCHIVES) $(SHL6STDSHL) $(STDSHL6) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_6.cmd
3134 @cat $(MISC)/$(TARGET).$(@:b)_6.cmd
3135 @+source $(MISC)/$(TARGET).$(@:b)_6.cmd
3136 .IF "$(UPDATER)"=="YES"
3137 .IF "$(SHL6NOCHECK)"==""
3138 -$(RM) $(SHL6TARGETN:d)check_$(SHL6TARGETN:f)
3139 $(RENAME) $(SHL6TARGETN) $(SHL6TARGETN:d)check_$(SHL6TARGETN:f)
3140 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS6) $(SHL6TARGETN:d)check_$(SHL6TARGETN:f)
3141 .ENDIF # "$(SHL6NOCHECK)"!=""
3142 .ENDIF # "$(UPDATER)"=="YES"
3143 .ENDIF # "$(OS)"=="MACOSX"
3144 .IF "$(UNIXVERSIONNAMES)"!=""
3145 $(RM) $(LB)/$(SHL6TARGETN:b)
3146 cd $(LB) && ln -s $(SHL6TARGETN:f) $(SHL6TARGETN:b)
3147 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
3148 @ls -l $@
3149 .ENDIF # "$(GUI)" == "UNX"
3151 .IF "$(GUI)" == "OS2"
3153 .IF "$(SHL6DEFAULTRES)"!=""
3154 @+-$(RM) $(MISC)/$(SHL6DEFAULTRES:b).rc >& $(NULLDEV)
3155 .IF "$(SHL6ICON)" != ""
3156 @-+echo 1 ICON $(SHL6ICON) >> $(MISC)/$(SHL6DEFAULTRES:b).rc
3157 .ENDIF
3158 .IF "$(use_shl_versions)" != ""
3159 .IF "$(SHL6ADD_VERINFO)"!=""
3160 @-+echo $(EMQ)#include $(EMQ)"$(SHL6ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL6DEFAULTRES:b).rc
3161 .ENDIF # "$(SHL6ADD_VERINFO)"!=""
3162 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL6DEFAULTRES:b).rc
3163 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL6DEFAULTRES:b).rc
3164 .ENDIF # "$(use_shl_versions)" != ""
3165 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
3166 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL6DEFAULTRES:b).rc
3167 .ENDIF # "$(SHL6DEFAULTRES)"!=""
3169 .IF "$(SHL6ALLRES)"!=""
3170 +$(TYPE) $(SHL6ALLRES) > $(SHL6LINKRES)
3171 .ENDIF # "$(SHL6ALLRES)"!=""
3173 .IF "$(USE_DEFFILE)"!=""
3175 $(SHL6LINKER) $(SHL6LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
3176 $(SHL6DEF) \
3177 $(STDOBJ) \
3178 -L$(LB) \
3179 -L$(SOLARVERSION)/$(INPATH)/lib \
3180 $(SHL6OBJS) $(SHL6VERSIONOBJ) \
3181 $(SHL6LIBS) \
3182 $(SHL6STDLIBS:^"-l") \
3183 $(SHL6LINKRES) \
3184 $(SHL6STDSHL:^"-l") $(STDSHL6:^"-l")
3186 .ELSE # "$(USE_DEFFILE)"!=""
3188 $(SHL6LINKER) -v $(SHL6LINKFLAGS) \
3189 $(LINKFLAGSSHL) $(SHL6BASEX) \
3190 $(SHL6STACK) -o $(SHL6TARGETN) \
3191 $(SHL6DEF) \
3192 $(STDOBJ) \
3193 -L$(LB) \
3194 -L$(SOLARVERSION)/$(INPATH)/lib \
3195 $(SHL6OBJS) $(SHL6VERSIONOBJ) \
3196 $(SHL6LIBS) \
3197 $(SHL6STDLIBS:^"-l") \
3198 $(SHL6LINKRES) \
3199 $(SHL6STDSHL:^"-l") $(STDSHL6:^"-l") \
3200 $(LINKOUTPUTFILTER)
3201 @$(LS) $@ >& $(NULLDEV)
3203 .ENDIF # "$(USE_DEFFILE)"!=""
3205 .IF "$(SHL6TARGET8)" != "$(SHL6TARGET)"
3206 +$(COPY) $@ $(@:d)$(SHL6TARGET8).dll
3207 .ENDIF
3209 .ENDIF # "$(GUI)" == "OS2"
3212 .IF "$(TESTDIR)"!=""
3213 .IF "$(NO_TESTS)"==""
3215 ALLTAR : runtest_$(SHL6TARGET)
3217 runtest_$(SHL6TARGET) : $(SHL6TARGETN)
3218 testshl $(SHL6TARGETN) sce/$(SHL6TARGET).sce -msg -skip
3219 .ENDIF # "$(NO_TESTS)"==""
3220 .ENDIF # "$(TESTDIR)"!=""
3221 .ENDIF # "$(SHL6TARGETN)"!=""
3223 # unroll begin
3225 .IF "$(SHL7TARGETN)"!=""
3227 .IF "$(OS)"=="AIX"
3228 SHL7STDLIBS=
3229 .ENDIF
3231 .IF "$(SHLLINKARCONLY)" != ""
3232 SHL7STDLIBS=
3233 STDSHL=
3234 .ELSE
3235 SHL7ARCHIVES=
3236 .ENDIF
3238 # decide how to link
3239 .IF "$(SHL7CODETYPE)"=="C"
3240 SHL7LINKER=$(LINKC)
3241 SHL7STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
3242 SHL7LINKFLAGS+=$(LINKCFLAGS)
3243 .ELSE # "$(SHL7CODETYPE)"=="C"
3244 SHL7LINKER=$(LINK)
3245 SHL7STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
3246 SHL7LINKFLAGS+=$(LINKFLAGS)
3247 .ENDIF # "$(SHL7CODETYPE)"=="C"
3249 SHL7RPATH*=OOO
3250 LINKFLAGSRUNPATH_$(SHL7RPATH)*=/ERROR:/Bad_SHL7RPATH_value
3251 SHL7LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL7RPATH))
3253 .IF "$(SHL7USE_EXPORTS)"==""
3254 SHL7DEF*=$(MISC)/$(SHL7TARGET).def
3255 .ENDIF # "$(SHL7USE_EXPORTS)"==""
3257 EXTRALIBPATHS7=$(EXTRALIBPATHS)
3258 .IF "$(UPDATER)"=="YES"
3259 .IF "$(SHL7NOCHECK)"==""
3260 .IF "$(SOLAR_STLLIBPATH)"!=""
3261 EXTRALIBPATHS7+=-L$(SOLAR_STLLIBPATH)
3262 .ENDIF
3263 .ENDIF # "$(SHL7NOCHECK)"!=""
3264 .ENDIF
3265 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3266 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
3267 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3269 .IF "$(VERSIONOBJ)"!=""
3270 SHL7VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL7TARGET))}$(VERSIONOBJ:f)
3271 USE_VERSIONH:=$(INCCOM)/$(SHL7VERSIONOBJ:b).h
3272 .IF "$(GUI)" == "UNX"
3273 SHL7VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL7TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
3274 .ELSE # "$(GUI)" == "UNX"
3275 SHL7VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL7TARGET))}$(VERSIONOBJ:f)
3276 .ENDIF # "$(GUI)" == "UNX"
3277 $(MISC)/$(SHL7VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL7VERSIONOBJ:b).h
3278 # $(COPY) $(SOLARENV)/src/version.c $@
3279 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL7VERSIONOBJ:b).h/ > $@
3281 .INIT : $(SHL7VERSIONOBJDEP)
3282 .ENDIF # "$(VERSIONOBJ)"!=""
3284 .IF "$(GUI)" != "UNX"
3285 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
3286 .IF "$(SHL7IMPLIB)" == ""
3287 SHL7IMPLIB=i$(TARGET)_t7
3288 .ENDIF # "$(SHL7IMPLIB)" == ""
3289 .IF "$(COM)" != "GCC"
3290 USE_7IMPLIB=-implib:$(LB)/$(SHL7IMPLIB).lib
3291 .ENDIF # "$(COM)" != "GCC"
3292 SHL7IMPLIBN=$(LB)/$(SHL7IMPLIB).lib
3293 ALLTAR : $(SHL7IMPLIBN)
3295 .IF "$(USE_DEFFILE)"==""
3296 USE_7IMPLIB_DEPS=$(LB)/$(SHL7IMPLIB).lib
3297 .ENDIF # "$(USE_DEFFILE)"==""
3298 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
3299 USE_SHL7DEF=$(SHL7DEF)
3300 .ELSE # "$(GUI)" != "UNX"
3301 USE_SHL7DEF=
3302 SHL7DEPN+:=$(SHL7DEPNU)
3304 .IF "$(SHL7VERSIONMAP)"==""
3305 # to activate vmaps remove "#"
3306 USE_SHL7VERSIONMAP=$(MISC)/$(SHL7TARGET).vmap
3307 .ENDIF # "$(SHL7VERSIONMAP)"==""
3309 .IF "$(USE_SHL7VERSIONMAP)"!=""
3311 .IF "$(SHL7FILTERFILE)"!=""
3312 .IF "$(SHL7VERSIONMAP)"!=""
3313 #eine von beiden ist zuviel
3314 USE_SHL7VERSIONMAP=$(MISC)/$(SHL7TARGET).vmap
3315 $(USE_SHL7VERSIONMAP) .PHONY:
3316 @echo -----------------------------
3317 @echo you should only use versionmap OR exportfile
3318 @echo -----------------------------
3319 # force_dmake_to_error
3321 .ENDIF # "$(SHL7VERSIONMAP)"!=""
3323 .IF "$(OS)"!="IRIX"
3324 SHL7VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL7VERSIONMAP)
3325 .ENDIF
3327 $(USE_SHL7VERSIONMAP): \
3328 $(SHL7OBJS)\
3329 $(SHL7LIBS)\
3330 $(SHL7FILTERFILE)
3331 @$(RM) $@.dump
3332 .IF "$(SHL7OBJS)"!=""
3333 # dump remaining objects on the fly
3334 .IF "$(OS)"=="MACOSX"
3335 @-nm $(SHL7OBJS:s/.obj/.o/) > $@.dump
3336 .ELSE
3337 @nm $(SHL7OBJS:s/.obj/.o/) > $@.dump
3338 .ENDIF
3339 .ENDIF # "$(SHL7OBJS)!"=""
3340 @$(TYPE) /dev/null $(SHL7LIBS:s/.lib/.dump/) >> $@.dump
3341 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL7INTERFACE) -f $(SHL7FILTERFILE) -m $@
3343 .ELSE # "$(SHL7FILTERFILE)"!=""
3344 USE_SHL7VERSIONMAP=$(MISC)/$(SHL7TARGET).vmap
3345 $(USE_SHL7VERSIONMAP) :
3346 @echo -----------------------------
3347 @echo SHL7FILTERFILE not set!
3348 @echo -----------------------------
3349 @$(TOUCH) $@
3350 @echo dummy file to keep the dependencies for later use.
3351 # force_dmake_to_error
3352 .ENDIF # "$(SHL7FILTERFILE)"!=""
3353 .ELSE # "$(USE_SHL7VERSIONMAP)"!=""
3355 #and now for the plain non-generic way...
3356 .IF "$(SHL7VERSIONMAP)"!=""
3357 USE_SHL7VERSIONMAP=$(MISC)/$(SHL7VERSIONMAP:b)_$(SHL7TARGET)$(SHL7VERSIONMAP:e)
3358 .IF "$(OS)"!="IRIX"
3359 SHL7VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL7VERSIONMAP)
3360 .ENDIF
3362 .IF "$(OS)"=="MACOSX"
3363 $(USE_SHL7VERSIONMAP): $(SHL7OBJS) $(SHL7LIBS)
3364 .ENDIF
3366 $(USE_SHL7VERSIONMAP): $(SHL7VERSIONMAP)
3367 @@-$(RM) -f $@
3368 # The following files will only be generated and needed on Mac OS X as temporary files
3369 # in order to generate exported symbols list out of Linux/Solaris map files
3370 .IF "$(OS)"=="MACOSX"
3371 @-$(RM) -f $@.symregexp >& $(NULLDEV)
3372 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
3373 .ENDIF
3374 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
3375 # happens if somebody will change it in the future
3376 .IF "$(COMID)"=="gcc3"
3377 tr -d "\015" < $(SHL7VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
3378 .ELIF "$(COMNAME)"=="sunpro5"
3379 tr -d "\015" < $(SHL7VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
3380 .ELSE # "$(COMID)"=="gcc3"
3381 tr -d "\015" < $(SHL7VERSIONMAP) > $@
3382 .ENDIF # "$(COMID)"=="gcc3"
3383 @chmod a+w $@
3384 # Mac OS X post-processing generate an exported symbols list from the generated map file
3385 # for details on exported symbols list see man ld on Mac OS X
3386 .IF "$(OS)"=="MACOSX"
3387 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
3388 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
3389 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
3390 # Extract RTTI symbols from all the objects that will be used to build a shared library
3391 .IF "$(SHL7OBJS)"!=""
3392 -echo $(foreach,i,$(SHL7OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
3393 .ENDIF
3394 .IF "$(SHL7LIBS)"!=""
3395 -$(TYPE) $(foreach,j,$(SHL7LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
3396 .ENDIF
3397 # overwrite the map file generate into the local output tree with the generated
3398 # exported symbols list
3399 cp $@.exported-symbols $@
3400 .ENDIF # .IF "$(OS)"=="MACOSX"
3401 .ENDIF # "$(SHL7VERSIONMAP)"!=""
3402 .ENDIF # "$(USE_SHL7VERSIONMAP)"!=""
3403 .ENDIF # "$(GUI)" != "UNX"
3405 .IF "$(UNIXVERSIONNAMES)"!=""
3406 .IF "$(OS)"!="MACOSX"
3407 .IF "$(GUI)"=="UNX"
3408 .IF "$(OS)"=="IRIX"
3409 SHL7SONAME=$(SONAME_SWITCH)$(SHL7TARGETN:f)
3410 .ELSE
3411 SHL7SONAME=\"$(SONAME_SWITCH)$(SHL7TARGETN:f)\"
3412 .ENDIF
3413 .ENDIF # "$(GUI)"!="UNX"
3414 .ENDIF # "$(OS)"!="MACOSX"
3415 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
3417 .IF "$(SHL7RES)"!=""
3418 SHL7ALLRES+=$(SHL7RES)
3419 SHL7LINKRES*=$(MISC)/$(SHL7TARGET).res
3420 SHL7LINKRESO*=$(MISC)/$(SHL7TARGET)_res.o
3421 .ENDIF # "$(SHL7RES)"!=""
3423 .IF "$(SHL7DEFAULTRES)$(use_shl_versions)"!=""
3424 SHL7DEFAULTRES*=$(MISC)/$(SHL7TARGET)_def.res
3425 SHL7ALLRES+=$(SHL7DEFAULTRES)
3426 SHL7LINKRES*=$(MISC)/$(SHL7TARGET).res
3427 SHL7LINKRESO*=$(MISC)/$(SHL7TARGET)_res.o
3428 .ENDIF # "$(SHL7DEFAULTRES)$(use_shl_versions)"!=""
3430 #.IF "$(SHL7TARGETN)"!=""
3432 .IF "$(linkinc)"!=""
3433 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
3434 .IF "$(SHL7LIBS)"!=""
3435 $(MISC)/$(SHL7TARGET)_linkinc.ls .PHONY:
3436 @@-$(RM) $@
3437 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL7LIBS) $(i:s/.lib/.lin/)) >> $@
3438 .ENDIF # "$(SHL7LIBS)"!=""
3439 .ENDIF
3441 LINKINCTARGETS+=$(MISC)/$(SHL7TARGETN:b)_linkinc.ls
3442 $(SHL7TARGETN) : $(LINKINCTARGETS)
3444 .ELSE
3445 .IF "$(SHL7USE_EXPORTS)"=="name"
3446 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
3447 .IF "$(COM)"!="GCC"
3448 .IF "$(SHL7LIBS)"!=""
3449 SHL7LINKLIST=$(MISC)/$(SHL7TARGET)_link.lst
3450 SHL7LINKLISTPARAM=@$(SHL7LINKLIST)
3451 $(SHL7LINKLIST) : $(SHL7LIBS)
3452 @@-$(RM) $@
3453 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL7LIBS) $(i:s/.lib/.lin/)) >> $@
3454 .ENDIF # "$(SHL7LIBS)"!=""
3455 .ENDIF # "$(COM)"!="GCC"
3456 .ENDIF
3457 .ENDIF # "$(SHL7USE_EXPORTS)"=="name"
3459 $(MISC)/%linkinc.ls:
3460 echo . > $@
3461 .ENDIF # "$(linkinc)"!=""
3463 .IF "$(GUI)" == "OS2"
3464 #21/02/2006 YD dll names must be 8.3, invoke fix script
3465 #check osl/os2/module.c/osl_loadModule()
3466 SHL7TARGET8=$(shell @fix_shl $(SHL7TARGET))
3467 .ENDIF
3469 .IF "$(GUI)" == "OS2"
3470 _SHL7IMP_ORD = $(SHL7STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL7STDLIBS:^"$(LB)/")
3471 SHL7IMP_ORD = $(foreach,i,$(_SHL7IMP_ORD) $(shell @-ls $i))
3472 .ELSE
3473 SHL7IMP_ORD =
3474 .ENDIF
3477 $(SHL7TARGETN) : \
3478 $(SHL7OBJS)\
3479 $(SHL7LIBS)\
3480 $(USE_7IMPLIB_DEPS)\
3481 $(USE_SHL7DEF)\
3482 $(USE_SHL7VERSIONMAP)\
3483 $(SHL7RES)\
3484 $(SHL7DEPN) \
3485 $(SHL7IMP_ORD) \
3486 $(SHL7LINKLIST)
3487 @echo ------------------------------
3488 @echo Making: $(SHL7TARGETN)
3489 .IF "$(GUI)" == "WNT"
3490 .IF "$(SHL7DEFAULTRES)"!=""
3491 @@-$(RM) $(MISC)/$(SHL7DEFAULTRES:b).rc
3492 .IF "$(SHL7ICON)" != ""
3493 @echo 1 ICON $(SHL7ICON) >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3494 .ENDIF
3495 .IF "$(use_shl_versions)" != ""
3496 .IF "$(SHL7ADD_VERINFO)"!=""
3497 @echo $(EMQ)#include $(EMQ)"$(SHL7ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3498 .ELSE # "$(SHL7ADD_VERINFO)"!=""
3499 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3500 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3501 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3502 .ENDIF # "$(SHL7ADD_VERINFO)"!=""
3503 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3504 @echo $(EMQ)#define ORG_NAME $(SHL7TARGET)$(DLLPOST) >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3505 @echo $(EMQ)#define INTERNAL_NAME $(SHL7TARGET:b) >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3506 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3507 .ENDIF # "$(use_shl_versions)" != ""
3508 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL7DEFAULTRES:b).rc
3509 .ENDIF # "$(SHL7DEFAULTRES)"!=""
3510 .IF "$(SHL7ALLRES)"!=""
3511 $(TYPE) $(SHL7ALLRES) > $(SHL7LINKRES)
3512 .IF "$(COM)"=="GCC"
3513 windres $(SHL7LINKRES) $(SHL7LINKRESO)
3514 .ENDIF # "$(COM)"=="GCC"
3515 .ENDIF # "$(SHL7ALLRES)"!=""
3516 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
3517 @echo dlltool --input-def $(SHL7DEF) \
3518 --dllname $(SHL7TARGET)$(DLLPOST) \
3519 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_7.cmd
3520 .IF "$(DEFLIB7NAME)"!="" # do not have to include objs
3521 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_7.cmd
3522 .ELSE # "$(DEFLIB7NAME)"!="" # do not have to include objs
3523 @echo --output-exp $(MISC)/$(@:b)_exp.o \
3524 $(STDOBJ) $(SHL7OBJS) $(SHL7LINKRESO) \
3525 `$(TYPE) /dev/null $(SHL7LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_7.cmd
3526 .ENDIF # "$(DEFLIB7NAME)"!=""
3527 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
3528 $(STDOBJ) $(SHL7VERSIONOBJ) $(SHL7DESCRIPTIONOBJ) $(SHL7OBJS) $(SHL7LINKRESO) \
3529 `$(TYPE) /dev/null $(SHL7LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
3530 -Wl,--exclude-libs,ALL,--start-group $(SHL7STDLIBS) -Wl,--end-group \
3531 $(SHL7STDSHL) $(STDSHL7) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
3532 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_7.cmd
3533 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_7.cmd
3534 @+source $(MISC)/$(TARGET).$(@:b)_7.cmd
3535 .ELSE
3536 .IF "$(linkinc)"==""
3537 .IF "$(SHL7USE_EXPORTS)"!="name"
3538 .IF "$(USE_DEFFILE)"!=""
3539 $(SHL7LINKER) @$(mktmp \
3540 $(SHL7LINKFLAGS) \
3541 $(LINKFLAGSSHL) \
3542 $(SHL7STACK) $(SHL7BASEX) \
3543 -out:$@ \
3544 -map:$(MISC)/$(@:b).map \
3545 -def:$(SHL7DEF) \
3546 $(USE_7IMPLIB) \
3547 $(STDOBJ) \
3548 $(SHL7VERSIONOBJ) $(SHL7OBJS) \
3549 $(SHL7LIBS) \
3550 $(SHL7STDLIBS) \
3551 $(SHL7STDSHL) $(STDSHL7) \
3552 $(SHL7LINKRES) \
3553 ) $(LINKOUTPUTFILTER)
3554 # double check if target was really written... still making sense?
3555 @@$(LS) $@
3556 @echo linking $@.manifest ...
3557 .IF "$(VISTA_MANIFEST)"!=""
3558 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
3559 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
3560 .ELSE
3561 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
3562 .ENDIF # "$(VISTA_MANIFEST)"!=""
3563 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
3564 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
3565 .ELSE # "$(USE_DEFFILE)"!=""
3566 $(SHL7LINKER) @$(mktmp $(SHL7LINKFLAGS) \
3567 $(LINKFLAGSSHL) $(SHL7BASEX) \
3568 $(SHL7STACK) -out:$(SHL7TARGETN) \
3569 -map:$(MISC)/$(@:B).map \
3570 $(LB)/$(SHL7IMPLIB).exp \
3571 $(STDOBJ) \
3572 $(SHL7OBJS) $(SHL7VERSIONOBJ) \
3573 $(SHL7LIBS) \
3574 $(SHL7STDLIBS) \
3575 $(SHL7STDSHL) $(STDSHL7) \
3576 $(SHL7LINKRES) \
3577 ) $(LINKOUTPUTFILTER)
3578 # double check if target was really written... still making sense?
3579 @@$(LS) $@
3580 @echo linking $@.manifest ...
3581 .IF "$(VISTA_MANIFEST)"!=""
3582 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
3583 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
3584 .ELSE
3585 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
3586 .ENDIF # "$(VISTA_MANIFEST)"!=""
3587 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
3588 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
3589 .ENDIF # "$(USE_DEFFILE)"!=""
3590 .ELSE # "$(SHL7USE_EXPORTS)"!="name"
3591 $(SHL7LINKER) @$(mktmp $(SHL7LINKFLAGS) \
3592 $(LINKFLAGSSHL) $(SHL7BASEX) \
3593 $(SHL7STACK) -out:$(SHL7TARGETN) \
3594 -map:$(MISC)/$(@:B).map \
3595 $(USE_7IMPLIB) \
3596 $(STDOBJ) \
3597 $(SHL7OBJS) $(SHL7VERSIONOBJ)) \
3598 $(SHL7LINKLISTPARAM) \
3599 @$(mktmp $(SHL7STDLIBS) \
3600 $(SHL7STDSHL) $(STDSHL7) \
3601 $(SHL7LINKRES) \
3603 @echo linking $@.manifest ...
3604 .IF "$(VISTA_MANIFEST)"!=""
3605 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
3606 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
3607 .ELSE
3608 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
3609 .ENDIF # "$(VISTA_MANIFEST)"!=""
3610 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
3611 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
3612 .ENDIF # "$(SHL7USE_EXPORTS)"!="name"
3613 .ELSE # "$(linkinc)"==""
3614 -$(RM) del $(MISC)/$(SHL7TARGET).lnk
3615 -$(RM) $(MISC)/$(SHL7TARGET).lst
3616 $(TYPE) $(mktmp \
3617 $(SHL7LINKFLAGS) \
3618 $(LINKFLAGSSHL) $(SHL7BASEX) \
3619 $(SHL7STACK) $(MAPFILE) \
3620 -out:$@ \
3621 $(LB)/$(SHL7IMPLIB).exp \
3622 $(STDOBJ) \
3623 $(SHL7OBJS) \
3624 $(SHL7STDLIBS) \
3625 $(SHL7STDSHL) $(STDSHL7) \
3626 $(SHL7LINKRES) \
3627 ) >> $(MISC)/$(SHL7TARGET).lnk
3628 $(TYPE) $(MISC)/$(SHL7TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL7TARGET).lnk
3629 $(SHL7LINKER) @$(MISC)/$(SHL7TARGET).lnk
3630 @echo linking $@.manifest ...
3631 .IF "$(VISTA_MANIFEST)"!=""
3632 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
3633 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
3634 .ELSE
3635 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
3636 .ENDIF # "$(VISTA_MANIFEST)"!=""
3637 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
3638 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
3639 .ENDIF # "$(linkinc)"==""
3640 .ENDIF # "$(COM)"=="GCC"
3641 .ENDIF # "$(GUI)" == "WNT"
3642 .IF "$(GUI)"=="UNX"
3643 .IF "$(OS)"=="MACOSX"
3644 @-$(RM) $(MISC)/$(@:b).list
3645 @-$(RM) $(MISC)/$(TARGET).$(@:b)_7.cmd
3646 @echo $(STDSLO) $(SHL7OBJS:s/.obj/.o/) \
3647 $(SHL7VERSIONOBJ) \
3648 `cat /dev/null $(SHL7LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
3649 @echo -n $(SHL7LINKER) $(SHL7LINKFLAGS) $(SHL7VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
3650 $(SHL7STDLIBS) $(SHL7ARCHIVES) $(SHL7STDSHL) $(STDSHL7) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_7.cmd
3651 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
3652 `cat $(MISC)/$(TARGET).$(@:b)_7.cmd` \
3653 >> $(MISC)/$(TARGET).$(@:b)_7.cmd
3654 @cat $(MISC)/$(TARGET).$(@:b)_7.cmd
3655 @+source $(MISC)/$(TARGET).$(@:b)_7.cmd
3656 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
3657 shl $(SHL7RPATH) $@
3658 @echo "Making: $@.jnilib"
3659 @macosx-create-bundle $@
3660 .IF "$(UPDATER)"=="YES"
3661 .IF "$(SHL7NOCHECK)"==""
3662 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS7) $(SHL7TARGETN)
3663 .ENDIF # "$(SHL7NOCHECK)"!=""
3664 .ENDIF
3665 .ELSE # "$(OS)"=="MACOSX"
3666 @-$(RM) $(MISC)/$(TARGET).$(@:b)_7.cmd
3667 @echo $(SHL7LINKER) $(SHL7LINKFLAGS) $(SHL7SONAME) $(LINKFLAGSSHL) $(SHL7VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL7OBJS:s/.obj/.o/) \
3668 $(SHL7VERSIONOBJ) -o $@ \
3669 `cat /dev/null $(SHL7LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
3670 $(SHL7STDLIBS) $(SHL7ARCHIVES) $(SHL7STDSHL) $(STDSHL7) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_7.cmd
3671 @cat $(MISC)/$(TARGET).$(@:b)_7.cmd
3672 @+source $(MISC)/$(TARGET).$(@:b)_7.cmd
3673 .IF "$(UPDATER)"=="YES"
3674 .IF "$(SHL7NOCHECK)"==""
3675 -$(RM) $(SHL7TARGETN:d)check_$(SHL7TARGETN:f)
3676 $(RENAME) $(SHL7TARGETN) $(SHL7TARGETN:d)check_$(SHL7TARGETN:f)
3677 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS7) $(SHL7TARGETN:d)check_$(SHL7TARGETN:f)
3678 .ENDIF # "$(SHL7NOCHECK)"!=""
3679 .ENDIF # "$(UPDATER)"=="YES"
3680 .ENDIF # "$(OS)"=="MACOSX"
3681 .IF "$(UNIXVERSIONNAMES)"!=""
3682 $(RM) $(LB)/$(SHL7TARGETN:b)
3683 cd $(LB) && ln -s $(SHL7TARGETN:f) $(SHL7TARGETN:b)
3684 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
3685 @ls -l $@
3686 .ENDIF # "$(GUI)" == "UNX"
3688 .IF "$(GUI)" == "OS2"
3690 .IF "$(SHL7DEFAULTRES)"!=""
3691 @+-$(RM) $(MISC)/$(SHL7DEFAULTRES:b).rc >& $(NULLDEV)
3692 .IF "$(SHL7ICON)" != ""
3693 @-+echo 1 ICON $(SHL7ICON) >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3694 .ENDIF
3695 .IF "$(use_shl_versions)" != ""
3696 .IF "$(SHL7ADD_VERINFO)"!=""
3697 @-+echo $(EMQ)#include $(EMQ)"$(SHL7ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3698 .ENDIF # "$(SHL7ADD_VERINFO)"!=""
3699 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3700 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL7DEFAULTRES:b).rc
3701 .ENDIF # "$(use_shl_versions)" != ""
3702 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
3703 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL7DEFAULTRES:b).rc
3704 .ENDIF # "$(SHL7DEFAULTRES)"!=""
3706 .IF "$(SHL7ALLRES)"!=""
3707 +$(TYPE) $(SHL7ALLRES) > $(SHL7LINKRES)
3708 .ENDIF # "$(SHL7ALLRES)"!=""
3710 .IF "$(USE_DEFFILE)"!=""
3712 $(SHL7LINKER) $(SHL7LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
3713 $(SHL7DEF) \
3714 $(STDOBJ) \
3715 -L$(LB) \
3716 -L$(SOLARVERSION)/$(INPATH)/lib \
3717 $(SHL7OBJS) $(SHL7VERSIONOBJ) \
3718 $(SHL7LIBS) \
3719 $(SHL7STDLIBS:^"-l") \
3720 $(SHL7LINKRES) \
3721 $(SHL7STDSHL:^"-l") $(STDSHL7:^"-l")
3723 .ELSE # "$(USE_DEFFILE)"!=""
3725 $(SHL7LINKER) -v $(SHL7LINKFLAGS) \
3726 $(LINKFLAGSSHL) $(SHL7BASEX) \
3727 $(SHL7STACK) -o $(SHL7TARGETN) \
3728 $(SHL7DEF) \
3729 $(STDOBJ) \
3730 -L$(LB) \
3731 -L$(SOLARVERSION)/$(INPATH)/lib \
3732 $(SHL7OBJS) $(SHL7VERSIONOBJ) \
3733 $(SHL7LIBS) \
3734 $(SHL7STDLIBS:^"-l") \
3735 $(SHL7LINKRES) \
3736 $(SHL7STDSHL:^"-l") $(STDSHL7:^"-l") \
3737 $(LINKOUTPUTFILTER)
3738 @$(LS) $@ >& $(NULLDEV)
3740 .ENDIF # "$(USE_DEFFILE)"!=""
3742 .IF "$(SHL7TARGET8)" != "$(SHL7TARGET)"
3743 +$(COPY) $@ $(@:d)$(SHL7TARGET8).dll
3744 .ENDIF
3746 .ENDIF # "$(GUI)" == "OS2"
3749 .IF "$(TESTDIR)"!=""
3750 .IF "$(NO_TESTS)"==""
3752 ALLTAR : runtest_$(SHL7TARGET)
3754 runtest_$(SHL7TARGET) : $(SHL7TARGETN)
3755 testshl $(SHL7TARGETN) sce/$(SHL7TARGET).sce -msg -skip
3756 .ENDIF # "$(NO_TESTS)"==""
3757 .ENDIF # "$(TESTDIR)"!=""
3758 .ENDIF # "$(SHL7TARGETN)"!=""
3760 # unroll begin
3762 .IF "$(SHL8TARGETN)"!=""
3764 .IF "$(OS)"=="AIX"
3765 SHL8STDLIBS=
3766 .ENDIF
3768 .IF "$(SHLLINKARCONLY)" != ""
3769 SHL8STDLIBS=
3770 STDSHL=
3771 .ELSE
3772 SHL8ARCHIVES=
3773 .ENDIF
3775 # decide how to link
3776 .IF "$(SHL8CODETYPE)"=="C"
3777 SHL8LINKER=$(LINKC)
3778 SHL8STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
3779 SHL8LINKFLAGS+=$(LINKCFLAGS)
3780 .ELSE # "$(SHL8CODETYPE)"=="C"
3781 SHL8LINKER=$(LINK)
3782 SHL8STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
3783 SHL8LINKFLAGS+=$(LINKFLAGS)
3784 .ENDIF # "$(SHL8CODETYPE)"=="C"
3786 SHL8RPATH*=OOO
3787 LINKFLAGSRUNPATH_$(SHL8RPATH)*=/ERROR:/Bad_SHL8RPATH_value
3788 SHL8LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL8RPATH))
3790 .IF "$(SHL8USE_EXPORTS)"==""
3791 SHL8DEF*=$(MISC)/$(SHL8TARGET).def
3792 .ENDIF # "$(SHL8USE_EXPORTS)"==""
3794 EXTRALIBPATHS8=$(EXTRALIBPATHS)
3795 .IF "$(UPDATER)"=="YES"
3796 .IF "$(SHL8NOCHECK)"==""
3797 .IF "$(SOLAR_STLLIBPATH)"!=""
3798 EXTRALIBPATHS8+=-L$(SOLAR_STLLIBPATH)
3799 .ENDIF
3800 .ENDIF # "$(SHL8NOCHECK)"!=""
3801 .ENDIF
3802 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3803 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
3804 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3806 .IF "$(VERSIONOBJ)"!=""
3807 SHL8VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL8TARGET))}$(VERSIONOBJ:f)
3808 USE_VERSIONH:=$(INCCOM)/$(SHL8VERSIONOBJ:b).h
3809 .IF "$(GUI)" == "UNX"
3810 SHL8VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL8TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
3811 .ELSE # "$(GUI)" == "UNX"
3812 SHL8VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL8TARGET))}$(VERSIONOBJ:f)
3813 .ENDIF # "$(GUI)" == "UNX"
3814 $(MISC)/$(SHL8VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL8VERSIONOBJ:b).h
3815 # $(COPY) $(SOLARENV)/src/version.c $@
3816 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL8VERSIONOBJ:b).h/ > $@
3818 .INIT : $(SHL8VERSIONOBJDEP)
3819 .ENDIF # "$(VERSIONOBJ)"!=""
3821 .IF "$(GUI)" != "UNX"
3822 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
3823 .IF "$(SHL8IMPLIB)" == ""
3824 SHL8IMPLIB=i$(TARGET)_t8
3825 .ENDIF # "$(SHL8IMPLIB)" == ""
3826 .IF "$(COM)" != "GCC"
3827 USE_8IMPLIB=-implib:$(LB)/$(SHL8IMPLIB).lib
3828 .ENDIF # "$(COM)" != "GCC"
3829 SHL8IMPLIBN=$(LB)/$(SHL8IMPLIB).lib
3830 ALLTAR : $(SHL8IMPLIBN)
3832 .IF "$(USE_DEFFILE)"==""
3833 USE_8IMPLIB_DEPS=$(LB)/$(SHL8IMPLIB).lib
3834 .ENDIF # "$(USE_DEFFILE)"==""
3835 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
3836 USE_SHL8DEF=$(SHL8DEF)
3837 .ELSE # "$(GUI)" != "UNX"
3838 USE_SHL8DEF=
3839 SHL8DEPN+:=$(SHL8DEPNU)
3841 .IF "$(SHL8VERSIONMAP)"==""
3842 # to activate vmaps remove "#"
3843 USE_SHL8VERSIONMAP=$(MISC)/$(SHL8TARGET).vmap
3844 .ENDIF # "$(SHL8VERSIONMAP)"==""
3846 .IF "$(USE_SHL8VERSIONMAP)"!=""
3848 .IF "$(SHL8FILTERFILE)"!=""
3849 .IF "$(SHL8VERSIONMAP)"!=""
3850 #eine von beiden ist zuviel
3851 USE_SHL8VERSIONMAP=$(MISC)/$(SHL8TARGET).vmap
3852 $(USE_SHL8VERSIONMAP) .PHONY:
3853 @echo -----------------------------
3854 @echo you should only use versionmap OR exportfile
3855 @echo -----------------------------
3856 # force_dmake_to_error
3858 .ENDIF # "$(SHL8VERSIONMAP)"!=""
3860 .IF "$(OS)"!="IRIX"
3861 SHL8VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL8VERSIONMAP)
3862 .ENDIF
3864 $(USE_SHL8VERSIONMAP): \
3865 $(SHL8OBJS)\
3866 $(SHL8LIBS)\
3867 $(SHL8FILTERFILE)
3868 @$(RM) $@.dump
3869 .IF "$(SHL8OBJS)"!=""
3870 # dump remaining objects on the fly
3871 .IF "$(OS)"=="MACOSX"
3872 @-nm $(SHL8OBJS:s/.obj/.o/) > $@.dump
3873 .ELSE
3874 @nm $(SHL8OBJS:s/.obj/.o/) > $@.dump
3875 .ENDIF
3876 .ENDIF # "$(SHL8OBJS)!"=""
3877 @$(TYPE) /dev/null $(SHL8LIBS:s/.lib/.dump/) >> $@.dump
3878 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL8INTERFACE) -f $(SHL8FILTERFILE) -m $@
3880 .ELSE # "$(SHL8FILTERFILE)"!=""
3881 USE_SHL8VERSIONMAP=$(MISC)/$(SHL8TARGET).vmap
3882 $(USE_SHL8VERSIONMAP) :
3883 @echo -----------------------------
3884 @echo SHL8FILTERFILE not set!
3885 @echo -----------------------------
3886 @$(TOUCH) $@
3887 @echo dummy file to keep the dependencies for later use.
3888 # force_dmake_to_error
3889 .ENDIF # "$(SHL8FILTERFILE)"!=""
3890 .ELSE # "$(USE_SHL8VERSIONMAP)"!=""
3892 #and now for the plain non-generic way...
3893 .IF "$(SHL8VERSIONMAP)"!=""
3894 USE_SHL8VERSIONMAP=$(MISC)/$(SHL8VERSIONMAP:b)_$(SHL8TARGET)$(SHL8VERSIONMAP:e)
3895 .IF "$(OS)"!="IRIX"
3896 SHL8VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL8VERSIONMAP)
3897 .ENDIF
3899 .IF "$(OS)"=="MACOSX"
3900 $(USE_SHL8VERSIONMAP): $(SHL8OBJS) $(SHL8LIBS)
3901 .ENDIF
3903 $(USE_SHL8VERSIONMAP): $(SHL8VERSIONMAP)
3904 @@-$(RM) -f $@
3905 # The following files will only be generated and needed on Mac OS X as temporary files
3906 # in order to generate exported symbols list out of Linux/Solaris map files
3907 .IF "$(OS)"=="MACOSX"
3908 @-$(RM) -f $@.symregexp >& $(NULLDEV)
3909 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
3910 .ENDIF
3911 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
3912 # happens if somebody will change it in the future
3913 .IF "$(COMID)"=="gcc3"
3914 tr -d "\015" < $(SHL8VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
3915 .ELIF "$(COMNAME)"=="sunpro5"
3916 tr -d "\015" < $(SHL8VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
3917 .ELSE # "$(COMID)"=="gcc3"
3918 tr -d "\015" < $(SHL8VERSIONMAP) > $@
3919 .ENDIF # "$(COMID)"=="gcc3"
3920 @chmod a+w $@
3921 # Mac OS X post-processing generate an exported symbols list from the generated map file
3922 # for details on exported symbols list see man ld on Mac OS X
3923 .IF "$(OS)"=="MACOSX"
3924 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
3925 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
3926 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
3927 # Extract RTTI symbols from all the objects that will be used to build a shared library
3928 .IF "$(SHL8OBJS)"!=""
3929 -echo $(foreach,i,$(SHL8OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
3930 .ENDIF
3931 .IF "$(SHL8LIBS)"!=""
3932 -$(TYPE) $(foreach,j,$(SHL8LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
3933 .ENDIF
3934 # overwrite the map file generate into the local output tree with the generated
3935 # exported symbols list
3936 cp $@.exported-symbols $@
3937 .ENDIF # .IF "$(OS)"=="MACOSX"
3938 .ENDIF # "$(SHL8VERSIONMAP)"!=""
3939 .ENDIF # "$(USE_SHL8VERSIONMAP)"!=""
3940 .ENDIF # "$(GUI)" != "UNX"
3942 .IF "$(UNIXVERSIONNAMES)"!=""
3943 .IF "$(OS)"!="MACOSX"
3944 .IF "$(GUI)"=="UNX"
3945 .IF "$(OS)"=="IRIX"
3946 SHL8SONAME=$(SONAME_SWITCH)$(SHL8TARGETN:f)
3947 .ELSE
3948 SHL8SONAME=\"$(SONAME_SWITCH)$(SHL8TARGETN:f)\"
3949 .ENDIF
3950 .ENDIF # "$(GUI)"!="UNX"
3951 .ENDIF # "$(OS)"!="MACOSX"
3952 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
3954 .IF "$(SHL8RES)"!=""
3955 SHL8ALLRES+=$(SHL8RES)
3956 SHL8LINKRES*=$(MISC)/$(SHL8TARGET).res
3957 SHL8LINKRESO*=$(MISC)/$(SHL8TARGET)_res.o
3958 .ENDIF # "$(SHL8RES)"!=""
3960 .IF "$(SHL8DEFAULTRES)$(use_shl_versions)"!=""
3961 SHL8DEFAULTRES*=$(MISC)/$(SHL8TARGET)_def.res
3962 SHL8ALLRES+=$(SHL8DEFAULTRES)
3963 SHL8LINKRES*=$(MISC)/$(SHL8TARGET).res
3964 SHL8LINKRESO*=$(MISC)/$(SHL8TARGET)_res.o
3965 .ENDIF # "$(SHL8DEFAULTRES)$(use_shl_versions)"!=""
3967 #.IF "$(SHL8TARGETN)"!=""
3969 .IF "$(linkinc)"!=""
3970 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
3971 .IF "$(SHL8LIBS)"!=""
3972 $(MISC)/$(SHL8TARGET)_linkinc.ls .PHONY:
3973 @@-$(RM) $@
3974 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL8LIBS) $(i:s/.lib/.lin/)) >> $@
3975 .ENDIF # "$(SHL8LIBS)"!=""
3976 .ENDIF
3978 LINKINCTARGETS+=$(MISC)/$(SHL8TARGETN:b)_linkinc.ls
3979 $(SHL8TARGETN) : $(LINKINCTARGETS)
3981 .ELSE
3982 .IF "$(SHL8USE_EXPORTS)"=="name"
3983 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
3984 .IF "$(COM)"!="GCC"
3985 .IF "$(SHL8LIBS)"!=""
3986 SHL8LINKLIST=$(MISC)/$(SHL8TARGET)_link.lst
3987 SHL8LINKLISTPARAM=@$(SHL8LINKLIST)
3988 $(SHL8LINKLIST) : $(SHL8LIBS)
3989 @@-$(RM) $@
3990 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL8LIBS) $(i:s/.lib/.lin/)) >> $@
3991 .ENDIF # "$(SHL8LIBS)"!=""
3992 .ENDIF # "$(COM)"!="GCC"
3993 .ENDIF
3994 .ENDIF # "$(SHL8USE_EXPORTS)"=="name"
3996 $(MISC)/%linkinc.ls:
3997 echo . > $@
3998 .ENDIF # "$(linkinc)"!=""
4000 .IF "$(GUI)" == "OS2"
4001 #21/02/2006 YD dll names must be 8.3, invoke fix script
4002 #check osl/os2/module.c/osl_loadModule()
4003 SHL8TARGET8=$(shell @fix_shl $(SHL8TARGET))
4004 .ENDIF
4006 .IF "$(GUI)" == "OS2"
4007 _SHL8IMP_ORD = $(SHL8STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL8STDLIBS:^"$(LB)/")
4008 SHL8IMP_ORD = $(foreach,i,$(_SHL8IMP_ORD) $(shell @-ls $i))
4009 .ELSE
4010 SHL8IMP_ORD =
4011 .ENDIF
4014 $(SHL8TARGETN) : \
4015 $(SHL8OBJS)\
4016 $(SHL8LIBS)\
4017 $(USE_8IMPLIB_DEPS)\
4018 $(USE_SHL8DEF)\
4019 $(USE_SHL8VERSIONMAP)\
4020 $(SHL8RES)\
4021 $(SHL8DEPN) \
4022 $(SHL8IMP_ORD) \
4023 $(SHL8LINKLIST)
4024 @echo ------------------------------
4025 @echo Making: $(SHL8TARGETN)
4026 .IF "$(GUI)" == "WNT"
4027 .IF "$(SHL8DEFAULTRES)"!=""
4028 @@-$(RM) $(MISC)/$(SHL8DEFAULTRES:b).rc
4029 .IF "$(SHL8ICON)" != ""
4030 @echo 1 ICON $(SHL8ICON) >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4031 .ENDIF
4032 .IF "$(use_shl_versions)" != ""
4033 .IF "$(SHL8ADD_VERINFO)"!=""
4034 @echo $(EMQ)#include $(EMQ)"$(SHL8ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4035 .ELSE # "$(SHL8ADD_VERINFO)"!=""
4036 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4037 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4038 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4039 .ENDIF # "$(SHL8ADD_VERINFO)"!=""
4040 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4041 @echo $(EMQ)#define ORG_NAME $(SHL8TARGET)$(DLLPOST) >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4042 @echo $(EMQ)#define INTERNAL_NAME $(SHL8TARGET:b) >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4043 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4044 .ENDIF # "$(use_shl_versions)" != ""
4045 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL8DEFAULTRES:b).rc
4046 .ENDIF # "$(SHL8DEFAULTRES)"!=""
4047 .IF "$(SHL8ALLRES)"!=""
4048 $(TYPE) $(SHL8ALLRES) > $(SHL8LINKRES)
4049 .IF "$(COM)"=="GCC"
4050 windres $(SHL8LINKRES) $(SHL8LINKRESO)
4051 .ENDIF # "$(COM)"=="GCC"
4052 .ENDIF # "$(SHL8ALLRES)"!=""
4053 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
4054 @echo dlltool --input-def $(SHL8DEF) \
4055 --dllname $(SHL8TARGET)$(DLLPOST) \
4056 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_8.cmd
4057 .IF "$(DEFLIB8NAME)"!="" # do not have to include objs
4058 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_8.cmd
4059 .ELSE # "$(DEFLIB8NAME)"!="" # do not have to include objs
4060 @echo --output-exp $(MISC)/$(@:b)_exp.o \
4061 $(STDOBJ) $(SHL8OBJS) $(SHL8LINKRESO) \
4062 `$(TYPE) /dev/null $(SHL8LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_8.cmd
4063 .ENDIF # "$(DEFLIB8NAME)"!=""
4064 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
4065 $(STDOBJ) $(SHL8VERSIONOBJ) $(SHL8DESCRIPTIONOBJ) $(SHL8OBJS) $(SHL8LINKRESO) \
4066 `$(TYPE) /dev/null $(SHL8LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
4067 -Wl,--exclude-libs,ALL,--start-group $(SHL8STDLIBS) -Wl,--end-group \
4068 $(SHL8STDSHL) $(STDSHL8) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
4069 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_8.cmd
4070 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_8.cmd
4071 @+source $(MISC)/$(TARGET).$(@:b)_8.cmd
4072 .ELSE
4073 .IF "$(linkinc)"==""
4074 .IF "$(SHL8USE_EXPORTS)"!="name"
4075 .IF "$(USE_DEFFILE)"!=""
4076 $(SHL8LINKER) @$(mktmp \
4077 $(SHL8LINKFLAGS) \
4078 $(LINKFLAGSSHL) \
4079 $(SHL8STACK) $(SHL8BASEX) \
4080 -out:$@ \
4081 -map:$(MISC)/$(@:b).map \
4082 -def:$(SHL8DEF) \
4083 $(USE_8IMPLIB) \
4084 $(STDOBJ) \
4085 $(SHL8VERSIONOBJ) $(SHL8OBJS) \
4086 $(SHL8LIBS) \
4087 $(SHL8STDLIBS) \
4088 $(SHL8STDSHL) $(STDSHL8) \
4089 $(SHL8LINKRES) \
4090 ) $(LINKOUTPUTFILTER)
4091 # double check if target was really written... still making sense?
4092 @@$(LS) $@
4093 @echo linking $@.manifest ...
4094 .IF "$(VISTA_MANIFEST)"!=""
4095 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
4096 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
4097 .ELSE
4098 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
4099 .ENDIF # "$(VISTA_MANIFEST)"!=""
4100 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
4101 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
4102 .ELSE # "$(USE_DEFFILE)"!=""
4103 $(SHL8LINKER) @$(mktmp $(SHL8LINKFLAGS) \
4104 $(LINKFLAGSSHL) $(SHL8BASEX) \
4105 $(SHL8STACK) -out:$(SHL8TARGETN) \
4106 -map:$(MISC)/$(@:B).map \
4107 $(LB)/$(SHL8IMPLIB).exp \
4108 $(STDOBJ) \
4109 $(SHL8OBJS) $(SHL8VERSIONOBJ) \
4110 $(SHL8LIBS) \
4111 $(SHL8STDLIBS) \
4112 $(SHL8STDSHL) $(STDSHL8) \
4113 $(SHL8LINKRES) \
4114 ) $(LINKOUTPUTFILTER)
4115 # double check if target was really written... still making sense?
4116 @@$(LS) $@
4117 @echo linking $@.manifest ...
4118 .IF "$(VISTA_MANIFEST)"!=""
4119 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
4120 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
4121 .ELSE
4122 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
4123 .ENDIF # "$(VISTA_MANIFEST)"!=""
4124 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
4125 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
4126 .ENDIF # "$(USE_DEFFILE)"!=""
4127 .ELSE # "$(SHL8USE_EXPORTS)"!="name"
4128 $(SHL8LINKER) @$(mktmp $(SHL8LINKFLAGS) \
4129 $(LINKFLAGSSHL) $(SHL8BASEX) \
4130 $(SHL8STACK) -out:$(SHL8TARGETN) \
4131 -map:$(MISC)/$(@:B).map \
4132 $(USE_8IMPLIB) \
4133 $(STDOBJ) \
4134 $(SHL8OBJS) $(SHL8VERSIONOBJ)) \
4135 $(SHL8LINKLISTPARAM) \
4136 @$(mktmp $(SHL8STDLIBS) \
4137 $(SHL8STDSHL) $(STDSHL8) \
4138 $(SHL8LINKRES) \
4140 @echo linking $@.manifest ...
4141 .IF "$(VISTA_MANIFEST)"!=""
4142 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
4143 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
4144 .ELSE
4145 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
4146 .ENDIF # "$(VISTA_MANIFEST)"!=""
4147 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
4148 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
4149 .ENDIF # "$(SHL8USE_EXPORTS)"!="name"
4150 .ELSE # "$(linkinc)"==""
4151 -$(RM) del $(MISC)/$(SHL8TARGET).lnk
4152 -$(RM) $(MISC)/$(SHL8TARGET).lst
4153 $(TYPE) $(mktmp \
4154 $(SHL8LINKFLAGS) \
4155 $(LINKFLAGSSHL) $(SHL8BASEX) \
4156 $(SHL8STACK) $(MAPFILE) \
4157 -out:$@ \
4158 $(LB)/$(SHL8IMPLIB).exp \
4159 $(STDOBJ) \
4160 $(SHL8OBJS) \
4161 $(SHL8STDLIBS) \
4162 $(SHL8STDSHL) $(STDSHL8) \
4163 $(SHL8LINKRES) \
4164 ) >> $(MISC)/$(SHL8TARGET).lnk
4165 $(TYPE) $(MISC)/$(SHL8TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL8TARGET).lnk
4166 $(SHL8LINKER) @$(MISC)/$(SHL8TARGET).lnk
4167 @echo linking $@.manifest ...
4168 .IF "$(VISTA_MANIFEST)"!=""
4169 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
4170 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
4171 .ELSE
4172 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
4173 .ENDIF # "$(VISTA_MANIFEST)"!=""
4174 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
4175 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
4176 .ENDIF # "$(linkinc)"==""
4177 .ENDIF # "$(COM)"=="GCC"
4178 .ENDIF # "$(GUI)" == "WNT"
4179 .IF "$(GUI)"=="UNX"
4180 .IF "$(OS)"=="MACOSX"
4181 @-$(RM) $(MISC)/$(@:b).list
4182 @-$(RM) $(MISC)/$(TARGET).$(@:b)_8.cmd
4183 @echo $(STDSLO) $(SHL8OBJS:s/.obj/.o/) \
4184 $(SHL8VERSIONOBJ) \
4185 `cat /dev/null $(SHL8LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
4186 @echo -n $(SHL8LINKER) $(SHL8LINKFLAGS) $(SHL8VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
4187 $(SHL8STDLIBS) $(SHL8ARCHIVES) $(SHL8STDSHL) $(STDSHL8) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_8.cmd
4188 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
4189 `cat $(MISC)/$(TARGET).$(@:b)_8.cmd` \
4190 >> $(MISC)/$(TARGET).$(@:b)_8.cmd
4191 @cat $(MISC)/$(TARGET).$(@:b)_8.cmd
4192 @+source $(MISC)/$(TARGET).$(@:b)_8.cmd
4193 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
4194 shl $(SHL8RPATH) $@
4195 @echo "Making: $@.jnilib"
4196 @macosx-create-bundle $@
4197 .IF "$(UPDATER)"=="YES"
4198 .IF "$(SHL8NOCHECK)"==""
4199 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS8) $(SHL8TARGETN)
4200 .ENDIF # "$(SHL8NOCHECK)"!=""
4201 .ENDIF
4202 .ELSE # "$(OS)"=="MACOSX"
4203 @-$(RM) $(MISC)/$(TARGET).$(@:b)_8.cmd
4204 @echo $(SHL8LINKER) $(SHL8LINKFLAGS) $(SHL8SONAME) $(LINKFLAGSSHL) $(SHL8VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL8OBJS:s/.obj/.o/) \
4205 $(SHL8VERSIONOBJ) -o $@ \
4206 `cat /dev/null $(SHL8LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
4207 $(SHL8STDLIBS) $(SHL8ARCHIVES) $(SHL8STDSHL) $(STDSHL8) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_8.cmd
4208 @cat $(MISC)/$(TARGET).$(@:b)_8.cmd
4209 @+source $(MISC)/$(TARGET).$(@:b)_8.cmd
4210 .IF "$(UPDATER)"=="YES"
4211 .IF "$(SHL8NOCHECK)"==""
4212 -$(RM) $(SHL8TARGETN:d)check_$(SHL8TARGETN:f)
4213 $(RENAME) $(SHL8TARGETN) $(SHL8TARGETN:d)check_$(SHL8TARGETN:f)
4214 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS8) $(SHL8TARGETN:d)check_$(SHL8TARGETN:f)
4215 .ENDIF # "$(SHL8NOCHECK)"!=""
4216 .ENDIF # "$(UPDATER)"=="YES"
4217 .ENDIF # "$(OS)"=="MACOSX"
4218 .IF "$(UNIXVERSIONNAMES)"!=""
4219 $(RM) $(LB)/$(SHL8TARGETN:b)
4220 cd $(LB) && ln -s $(SHL8TARGETN:f) $(SHL8TARGETN:b)
4221 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
4222 @ls -l $@
4223 .ENDIF # "$(GUI)" == "UNX"
4225 .IF "$(GUI)" == "OS2"
4227 .IF "$(SHL8DEFAULTRES)"!=""
4228 @+-$(RM) $(MISC)/$(SHL8DEFAULTRES:b).rc >& $(NULLDEV)
4229 .IF "$(SHL8ICON)" != ""
4230 @-+echo 1 ICON $(SHL8ICON) >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4231 .ENDIF
4232 .IF "$(use_shl_versions)" != ""
4233 .IF "$(SHL8ADD_VERINFO)"!=""
4234 @-+echo $(EMQ)#include $(EMQ)"$(SHL8ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4235 .ENDIF # "$(SHL8ADD_VERINFO)"!=""
4236 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4237 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL8DEFAULTRES:b).rc
4238 .ENDIF # "$(use_shl_versions)" != ""
4239 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
4240 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL8DEFAULTRES:b).rc
4241 .ENDIF # "$(SHL8DEFAULTRES)"!=""
4243 .IF "$(SHL8ALLRES)"!=""
4244 +$(TYPE) $(SHL8ALLRES) > $(SHL8LINKRES)
4245 .ENDIF # "$(SHL8ALLRES)"!=""
4247 .IF "$(USE_DEFFILE)"!=""
4249 $(SHL8LINKER) $(SHL8LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
4250 $(SHL8DEF) \
4251 $(STDOBJ) \
4252 -L$(LB) \
4253 -L$(SOLARVERSION)/$(INPATH)/lib \
4254 $(SHL8OBJS) $(SHL8VERSIONOBJ) \
4255 $(SHL8LIBS) \
4256 $(SHL8STDLIBS:^"-l") \
4257 $(SHL8LINKRES) \
4258 $(SHL8STDSHL:^"-l") $(STDSHL8:^"-l")
4260 .ELSE # "$(USE_DEFFILE)"!=""
4262 $(SHL8LINKER) -v $(SHL8LINKFLAGS) \
4263 $(LINKFLAGSSHL) $(SHL8BASEX) \
4264 $(SHL8STACK) -o $(SHL8TARGETN) \
4265 $(SHL8DEF) \
4266 $(STDOBJ) \
4267 -L$(LB) \
4268 -L$(SOLARVERSION)/$(INPATH)/lib \
4269 $(SHL8OBJS) $(SHL8VERSIONOBJ) \
4270 $(SHL8LIBS) \
4271 $(SHL8STDLIBS:^"-l") \
4272 $(SHL8LINKRES) \
4273 $(SHL8STDSHL:^"-l") $(STDSHL8:^"-l") \
4274 $(LINKOUTPUTFILTER)
4275 @$(LS) $@ >& $(NULLDEV)
4277 .ENDIF # "$(USE_DEFFILE)"!=""
4279 .IF "$(SHL8TARGET8)" != "$(SHL8TARGET)"
4280 +$(COPY) $@ $(@:d)$(SHL8TARGET8).dll
4281 .ENDIF
4283 .ENDIF # "$(GUI)" == "OS2"
4286 .IF "$(TESTDIR)"!=""
4287 .IF "$(NO_TESTS)"==""
4289 ALLTAR : runtest_$(SHL8TARGET)
4291 runtest_$(SHL8TARGET) : $(SHL8TARGETN)
4292 testshl $(SHL8TARGETN) sce/$(SHL8TARGET).sce -msg -skip
4293 .ENDIF # "$(NO_TESTS)"==""
4294 .ENDIF # "$(TESTDIR)"!=""
4295 .ENDIF # "$(SHL8TARGETN)"!=""
4297 # unroll begin
4299 .IF "$(SHL9TARGETN)"!=""
4301 .IF "$(OS)"=="AIX"
4302 SHL9STDLIBS=
4303 .ENDIF
4305 .IF "$(SHLLINKARCONLY)" != ""
4306 SHL9STDLIBS=
4307 STDSHL=
4308 .ELSE
4309 SHL9ARCHIVES=
4310 .ENDIF
4312 # decide how to link
4313 .IF "$(SHL9CODETYPE)"=="C"
4314 SHL9LINKER=$(LINKC)
4315 SHL9STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
4316 SHL9LINKFLAGS+=$(LINKCFLAGS)
4317 .ELSE # "$(SHL9CODETYPE)"=="C"
4318 SHL9LINKER=$(LINK)
4319 SHL9STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
4320 SHL9LINKFLAGS+=$(LINKFLAGS)
4321 .ENDIF # "$(SHL9CODETYPE)"=="C"
4323 SHL9RPATH*=OOO
4324 LINKFLAGSRUNPATH_$(SHL9RPATH)*=/ERROR:/Bad_SHL9RPATH_value
4325 SHL9LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL9RPATH))
4327 .IF "$(SHL9USE_EXPORTS)"==""
4328 SHL9DEF*=$(MISC)/$(SHL9TARGET).def
4329 .ENDIF # "$(SHL9USE_EXPORTS)"==""
4331 EXTRALIBPATHS9=$(EXTRALIBPATHS)
4332 .IF "$(UPDATER)"=="YES"
4333 .IF "$(SHL9NOCHECK)"==""
4334 .IF "$(SOLAR_STLLIBPATH)"!=""
4335 EXTRALIBPATHS9+=-L$(SOLAR_STLLIBPATH)
4336 .ENDIF
4337 .ENDIF # "$(SHL9NOCHECK)"!=""
4338 .ENDIF
4339 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4340 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
4341 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4343 .IF "$(VERSIONOBJ)"!=""
4344 SHL9VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL9TARGET))}$(VERSIONOBJ:f)
4345 USE_VERSIONH:=$(INCCOM)/$(SHL9VERSIONOBJ:b).h
4346 .IF "$(GUI)" == "UNX"
4347 SHL9VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL9TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
4348 .ELSE # "$(GUI)" == "UNX"
4349 SHL9VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL9TARGET))}$(VERSIONOBJ:f)
4350 .ENDIF # "$(GUI)" == "UNX"
4351 $(MISC)/$(SHL9VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL9VERSIONOBJ:b).h
4352 # $(COPY) $(SOLARENV)/src/version.c $@
4353 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL9VERSIONOBJ:b).h/ > $@
4355 .INIT : $(SHL9VERSIONOBJDEP)
4356 .ENDIF # "$(VERSIONOBJ)"!=""
4358 .IF "$(GUI)" != "UNX"
4359 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
4360 .IF "$(SHL9IMPLIB)" == ""
4361 SHL9IMPLIB=i$(TARGET)_t9
4362 .ENDIF # "$(SHL9IMPLIB)" == ""
4363 .IF "$(COM)" != "GCC"
4364 USE_9IMPLIB=-implib:$(LB)/$(SHL9IMPLIB).lib
4365 .ENDIF # "$(COM)" != "GCC"
4366 SHL9IMPLIBN=$(LB)/$(SHL9IMPLIB).lib
4367 ALLTAR : $(SHL9IMPLIBN)
4369 .IF "$(USE_DEFFILE)"==""
4370 USE_9IMPLIB_DEPS=$(LB)/$(SHL9IMPLIB).lib
4371 .ENDIF # "$(USE_DEFFILE)"==""
4372 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
4373 USE_SHL9DEF=$(SHL9DEF)
4374 .ELSE # "$(GUI)" != "UNX"
4375 USE_SHL9DEF=
4376 SHL9DEPN+:=$(SHL9DEPNU)
4378 .IF "$(SHL9VERSIONMAP)"==""
4379 # to activate vmaps remove "#"
4380 USE_SHL9VERSIONMAP=$(MISC)/$(SHL9TARGET).vmap
4381 .ENDIF # "$(SHL9VERSIONMAP)"==""
4383 .IF "$(USE_SHL9VERSIONMAP)"!=""
4385 .IF "$(SHL9FILTERFILE)"!=""
4386 .IF "$(SHL9VERSIONMAP)"!=""
4387 #eine von beiden ist zuviel
4388 USE_SHL9VERSIONMAP=$(MISC)/$(SHL9TARGET).vmap
4389 $(USE_SHL9VERSIONMAP) .PHONY:
4390 @echo -----------------------------
4391 @echo you should only use versionmap OR exportfile
4392 @echo -----------------------------
4393 # force_dmake_to_error
4395 .ENDIF # "$(SHL9VERSIONMAP)"!=""
4397 .IF "$(OS)"!="IRIX"
4398 SHL9VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL9VERSIONMAP)
4399 .ENDIF
4401 $(USE_SHL9VERSIONMAP): \
4402 $(SHL9OBJS)\
4403 $(SHL9LIBS)\
4404 $(SHL9FILTERFILE)
4405 @$(RM) $@.dump
4406 .IF "$(SHL9OBJS)"!=""
4407 # dump remaining objects on the fly
4408 .IF "$(OS)"=="MACOSX"
4409 @-nm $(SHL9OBJS:s/.obj/.o/) > $@.dump
4410 .ELSE
4411 @nm $(SHL9OBJS:s/.obj/.o/) > $@.dump
4412 .ENDIF
4413 .ENDIF # "$(SHL9OBJS)!"=""
4414 @$(TYPE) /dev/null $(SHL9LIBS:s/.lib/.dump/) >> $@.dump
4415 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL9INTERFACE) -f $(SHL9FILTERFILE) -m $@
4417 .ELSE # "$(SHL9FILTERFILE)"!=""
4418 USE_SHL9VERSIONMAP=$(MISC)/$(SHL9TARGET).vmap
4419 $(USE_SHL9VERSIONMAP) :
4420 @echo -----------------------------
4421 @echo SHL9FILTERFILE not set!
4422 @echo -----------------------------
4423 @$(TOUCH) $@
4424 @echo dummy file to keep the dependencies for later use.
4425 # force_dmake_to_error
4426 .ENDIF # "$(SHL9FILTERFILE)"!=""
4427 .ELSE # "$(USE_SHL9VERSIONMAP)"!=""
4429 #and now for the plain non-generic way...
4430 .IF "$(SHL9VERSIONMAP)"!=""
4431 USE_SHL9VERSIONMAP=$(MISC)/$(SHL9VERSIONMAP:b)_$(SHL9TARGET)$(SHL9VERSIONMAP:e)
4432 .IF "$(OS)"!="IRIX"
4433 SHL9VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL9VERSIONMAP)
4434 .ENDIF
4436 .IF "$(OS)"=="MACOSX"
4437 $(USE_SHL9VERSIONMAP): $(SHL9OBJS) $(SHL9LIBS)
4438 .ENDIF
4440 $(USE_SHL9VERSIONMAP): $(SHL9VERSIONMAP)
4441 @@-$(RM) -f $@
4442 # The following files will only be generated and needed on Mac OS X as temporary files
4443 # in order to generate exported symbols list out of Linux/Solaris map files
4444 .IF "$(OS)"=="MACOSX"
4445 @-$(RM) -f $@.symregexp >& $(NULLDEV)
4446 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
4447 .ENDIF
4448 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
4449 # happens if somebody will change it in the future
4450 .IF "$(COMID)"=="gcc3"
4451 tr -d "\015" < $(SHL9VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
4452 .ELIF "$(COMNAME)"=="sunpro5"
4453 tr -d "\015" < $(SHL9VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
4454 .ELSE # "$(COMID)"=="gcc3"
4455 tr -d "\015" < $(SHL9VERSIONMAP) > $@
4456 .ENDIF # "$(COMID)"=="gcc3"
4457 @chmod a+w $@
4458 # Mac OS X post-processing generate an exported symbols list from the generated map file
4459 # for details on exported symbols list see man ld on Mac OS X
4460 .IF "$(OS)"=="MACOSX"
4461 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
4462 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
4463 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
4464 # Extract RTTI symbols from all the objects that will be used to build a shared library
4465 .IF "$(SHL9OBJS)"!=""
4466 -echo $(foreach,i,$(SHL9OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
4467 .ENDIF
4468 .IF "$(SHL9LIBS)"!=""
4469 -$(TYPE) $(foreach,j,$(SHL9LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
4470 .ENDIF
4471 # overwrite the map file generate into the local output tree with the generated
4472 # exported symbols list
4473 cp $@.exported-symbols $@
4474 .ENDIF # .IF "$(OS)"=="MACOSX"
4475 .ENDIF # "$(SHL9VERSIONMAP)"!=""
4476 .ENDIF # "$(USE_SHL9VERSIONMAP)"!=""
4477 .ENDIF # "$(GUI)" != "UNX"
4479 .IF "$(UNIXVERSIONNAMES)"!=""
4480 .IF "$(OS)"!="MACOSX"
4481 .IF "$(GUI)"=="UNX"
4482 .IF "$(OS)"=="IRIX"
4483 SHL9SONAME=$(SONAME_SWITCH)$(SHL9TARGETN:f)
4484 .ELSE
4485 SHL9SONAME=\"$(SONAME_SWITCH)$(SHL9TARGETN:f)\"
4486 .ENDIF
4487 .ENDIF # "$(GUI)"!="UNX"
4488 .ENDIF # "$(OS)"!="MACOSX"
4489 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
4491 .IF "$(SHL9RES)"!=""
4492 SHL9ALLRES+=$(SHL9RES)
4493 SHL9LINKRES*=$(MISC)/$(SHL9TARGET).res
4494 SHL9LINKRESO*=$(MISC)/$(SHL9TARGET)_res.o
4495 .ENDIF # "$(SHL9RES)"!=""
4497 .IF "$(SHL9DEFAULTRES)$(use_shl_versions)"!=""
4498 SHL9DEFAULTRES*=$(MISC)/$(SHL9TARGET)_def.res
4499 SHL9ALLRES+=$(SHL9DEFAULTRES)
4500 SHL9LINKRES*=$(MISC)/$(SHL9TARGET).res
4501 SHL9LINKRESO*=$(MISC)/$(SHL9TARGET)_res.o
4502 .ENDIF # "$(SHL9DEFAULTRES)$(use_shl_versions)"!=""
4504 #.IF "$(SHL9TARGETN)"!=""
4506 .IF "$(linkinc)"!=""
4507 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
4508 .IF "$(SHL9LIBS)"!=""
4509 $(MISC)/$(SHL9TARGET)_linkinc.ls .PHONY:
4510 @@-$(RM) $@
4511 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL9LIBS) $(i:s/.lib/.lin/)) >> $@
4512 .ENDIF # "$(SHL9LIBS)"!=""
4513 .ENDIF
4515 LINKINCTARGETS+=$(MISC)/$(SHL9TARGETN:b)_linkinc.ls
4516 $(SHL9TARGETN) : $(LINKINCTARGETS)
4518 .ELSE
4519 .IF "$(SHL9USE_EXPORTS)"=="name"
4520 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
4521 .IF "$(COM)"!="GCC"
4522 .IF "$(SHL9LIBS)"!=""
4523 SHL9LINKLIST=$(MISC)/$(SHL9TARGET)_link.lst
4524 SHL9LINKLISTPARAM=@$(SHL9LINKLIST)
4525 $(SHL9LINKLIST) : $(SHL9LIBS)
4526 @@-$(RM) $@
4527 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL9LIBS) $(i:s/.lib/.lin/)) >> $@
4528 .ENDIF # "$(SHL9LIBS)"!=""
4529 .ENDIF # "$(COM)"!="GCC"
4530 .ENDIF
4531 .ENDIF # "$(SHL9USE_EXPORTS)"=="name"
4533 $(MISC)/%linkinc.ls:
4534 echo . > $@
4535 .ENDIF # "$(linkinc)"!=""
4537 .IF "$(GUI)" == "OS2"
4538 #21/02/2006 YD dll names must be 8.3, invoke fix script
4539 #check osl/os2/module.c/osl_loadModule()
4540 SHL9TARGET8=$(shell @fix_shl $(SHL9TARGET))
4541 .ENDIF
4543 .IF "$(GUI)" == "OS2"
4544 _SHL9IMP_ORD = $(SHL9STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL9STDLIBS:^"$(LB)/")
4545 SHL9IMP_ORD = $(foreach,i,$(_SHL9IMP_ORD) $(shell @-ls $i))
4546 .ELSE
4547 SHL9IMP_ORD =
4548 .ENDIF
4551 $(SHL9TARGETN) : \
4552 $(SHL9OBJS)\
4553 $(SHL9LIBS)\
4554 $(USE_9IMPLIB_DEPS)\
4555 $(USE_SHL9DEF)\
4556 $(USE_SHL9VERSIONMAP)\
4557 $(SHL9RES)\
4558 $(SHL9DEPN) \
4559 $(SHL9IMP_ORD) \
4560 $(SHL9LINKLIST)
4561 @echo ------------------------------
4562 @echo Making: $(SHL9TARGETN)
4563 .IF "$(GUI)" == "WNT"
4564 .IF "$(SHL9DEFAULTRES)"!=""
4565 @@-$(RM) $(MISC)/$(SHL9DEFAULTRES:b).rc
4566 .IF "$(SHL9ICON)" != ""
4567 @echo 1 ICON $(SHL9ICON) >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4568 .ENDIF
4569 .IF "$(use_shl_versions)" != ""
4570 .IF "$(SHL9ADD_VERINFO)"!=""
4571 @echo $(EMQ)#include $(EMQ)"$(SHL9ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4572 .ELSE # "$(SHL9ADD_VERINFO)"!=""
4573 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4574 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4575 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4576 .ENDIF # "$(SHL9ADD_VERINFO)"!=""
4577 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4578 @echo $(EMQ)#define ORG_NAME $(SHL9TARGET)$(DLLPOST) >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4579 @echo $(EMQ)#define INTERNAL_NAME $(SHL9TARGET:b) >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4580 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4581 .ENDIF # "$(use_shl_versions)" != ""
4582 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL9DEFAULTRES:b).rc
4583 .ENDIF # "$(SHL9DEFAULTRES)"!=""
4584 .IF "$(SHL9ALLRES)"!=""
4585 $(TYPE) $(SHL9ALLRES) > $(SHL9LINKRES)
4586 .IF "$(COM)"=="GCC"
4587 windres $(SHL9LINKRES) $(SHL9LINKRESO)
4588 .ENDIF # "$(COM)"=="GCC"
4589 .ENDIF # "$(SHL9ALLRES)"!=""
4590 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
4591 @echo dlltool --input-def $(SHL9DEF) \
4592 --dllname $(SHL9TARGET)$(DLLPOST) \
4593 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_9.cmd
4594 .IF "$(DEFLIB9NAME)"!="" # do not have to include objs
4595 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_9.cmd
4596 .ELSE # "$(DEFLIB9NAME)"!="" # do not have to include objs
4597 @echo --output-exp $(MISC)/$(@:b)_exp.o \
4598 $(STDOBJ) $(SHL9OBJS) $(SHL9LINKRESO) \
4599 `$(TYPE) /dev/null $(SHL9LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_9.cmd
4600 .ENDIF # "$(DEFLIB9NAME)"!=""
4601 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
4602 $(STDOBJ) $(SHL9VERSIONOBJ) $(SHL9DESCRIPTIONOBJ) $(SHL9OBJS) $(SHL9LINKRESO) \
4603 `$(TYPE) /dev/null $(SHL9LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
4604 -Wl,--exclude-libs,ALL,--start-group $(SHL9STDLIBS) -Wl,--end-group \
4605 $(SHL9STDSHL) $(STDSHL9) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
4606 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_9.cmd
4607 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_9.cmd
4608 @+source $(MISC)/$(TARGET).$(@:b)_9.cmd
4609 .ELSE
4610 .IF "$(linkinc)"==""
4611 .IF "$(SHL9USE_EXPORTS)"!="name"
4612 .IF "$(USE_DEFFILE)"!=""
4613 $(SHL9LINKER) @$(mktmp \
4614 $(SHL9LINKFLAGS) \
4615 $(LINKFLAGSSHL) \
4616 $(SHL9STACK) $(SHL9BASEX) \
4617 -out:$@ \
4618 -map:$(MISC)/$(@:b).map \
4619 -def:$(SHL9DEF) \
4620 $(USE_9IMPLIB) \
4621 $(STDOBJ) \
4622 $(SHL9VERSIONOBJ) $(SHL9OBJS) \
4623 $(SHL9LIBS) \
4624 $(SHL9STDLIBS) \
4625 $(SHL9STDSHL) $(STDSHL9) \
4626 $(SHL9LINKRES) \
4627 ) $(LINKOUTPUTFILTER)
4628 # double check if target was really written... still making sense?
4629 @@$(LS) $@
4630 @echo linking $@.manifest ...
4631 .IF "$(VISTA_MANIFEST)"!=""
4632 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
4633 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
4634 .ELSE
4635 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
4636 .ENDIF # "$(VISTA_MANIFEST)"!=""
4637 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
4638 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
4639 .ELSE # "$(USE_DEFFILE)"!=""
4640 $(SHL9LINKER) @$(mktmp $(SHL9LINKFLAGS) \
4641 $(LINKFLAGSSHL) $(SHL9BASEX) \
4642 $(SHL9STACK) -out:$(SHL9TARGETN) \
4643 -map:$(MISC)/$(@:B).map \
4644 $(LB)/$(SHL9IMPLIB).exp \
4645 $(STDOBJ) \
4646 $(SHL9OBJS) $(SHL9VERSIONOBJ) \
4647 $(SHL9LIBS) \
4648 $(SHL9STDLIBS) \
4649 $(SHL9STDSHL) $(STDSHL9) \
4650 $(SHL9LINKRES) \
4651 ) $(LINKOUTPUTFILTER)
4652 # double check if target was really written... still making sense?
4653 @@$(LS) $@
4654 @echo linking $@.manifest ...
4655 .IF "$(VISTA_MANIFEST)"!=""
4656 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
4657 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
4658 .ELSE
4659 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
4660 .ENDIF # "$(VISTA_MANIFEST)"!=""
4661 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
4662 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
4663 .ENDIF # "$(USE_DEFFILE)"!=""
4664 .ELSE # "$(SHL9USE_EXPORTS)"!="name"
4665 $(SHL9LINKER) @$(mktmp $(SHL9LINKFLAGS) \
4666 $(LINKFLAGSSHL) $(SHL9BASEX) \
4667 $(SHL9STACK) -out:$(SHL9TARGETN) \
4668 -map:$(MISC)/$(@:B).map \
4669 $(USE_9IMPLIB) \
4670 $(STDOBJ) \
4671 $(SHL9OBJS) $(SHL9VERSIONOBJ)) \
4672 $(SHL9LINKLISTPARAM) \
4673 @$(mktmp $(SHL9STDLIBS) \
4674 $(SHL9STDSHL) $(STDSHL9) \
4675 $(SHL9LINKRES) \
4677 @echo linking $@.manifest ...
4678 .IF "$(VISTA_MANIFEST)"!=""
4679 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
4680 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
4681 .ELSE
4682 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
4683 .ENDIF # "$(VISTA_MANIFEST)"!=""
4684 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
4685 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
4686 .ENDIF # "$(SHL9USE_EXPORTS)"!="name"
4687 .ELSE # "$(linkinc)"==""
4688 -$(RM) del $(MISC)/$(SHL9TARGET).lnk
4689 -$(RM) $(MISC)/$(SHL9TARGET).lst
4690 $(TYPE) $(mktmp \
4691 $(SHL9LINKFLAGS) \
4692 $(LINKFLAGSSHL) $(SHL9BASEX) \
4693 $(SHL9STACK) $(MAPFILE) \
4694 -out:$@ \
4695 $(LB)/$(SHL9IMPLIB).exp \
4696 $(STDOBJ) \
4697 $(SHL9OBJS) \
4698 $(SHL9STDLIBS) \
4699 $(SHL9STDSHL) $(STDSHL9) \
4700 $(SHL9LINKRES) \
4701 ) >> $(MISC)/$(SHL9TARGET).lnk
4702 $(TYPE) $(MISC)/$(SHL9TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL9TARGET).lnk
4703 $(SHL9LINKER) @$(MISC)/$(SHL9TARGET).lnk
4704 @echo linking $@.manifest ...
4705 .IF "$(VISTA_MANIFEST)"!=""
4706 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
4707 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
4708 .ELSE
4709 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
4710 .ENDIF # "$(VISTA_MANIFEST)"!=""
4711 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
4712 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
4713 .ENDIF # "$(linkinc)"==""
4714 .ENDIF # "$(COM)"=="GCC"
4715 .ENDIF # "$(GUI)" == "WNT"
4716 .IF "$(GUI)"=="UNX"
4717 .IF "$(OS)"=="MACOSX"
4718 @-$(RM) $(MISC)/$(@:b).list
4719 @-$(RM) $(MISC)/$(TARGET).$(@:b)_9.cmd
4720 @echo $(STDSLO) $(SHL9OBJS:s/.obj/.o/) \
4721 $(SHL9VERSIONOBJ) \
4722 `cat /dev/null $(SHL9LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
4723 @echo -n $(SHL9LINKER) $(SHL9LINKFLAGS) $(SHL9VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
4724 $(SHL9STDLIBS) $(SHL9ARCHIVES) $(SHL9STDSHL) $(STDSHL9) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_9.cmd
4725 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
4726 `cat $(MISC)/$(TARGET).$(@:b)_9.cmd` \
4727 >> $(MISC)/$(TARGET).$(@:b)_9.cmd
4728 @cat $(MISC)/$(TARGET).$(@:b)_9.cmd
4729 @+source $(MISC)/$(TARGET).$(@:b)_9.cmd
4730 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
4731 shl $(SHL9RPATH) $@
4732 @echo "Making: $@.jnilib"
4733 @macosx-create-bundle $@
4734 .IF "$(UPDATER)"=="YES"
4735 .IF "$(SHL9NOCHECK)"==""
4736 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS9) $(SHL9TARGETN)
4737 .ENDIF # "$(SHL9NOCHECK)"!=""
4738 .ENDIF
4739 .ELSE # "$(OS)"=="MACOSX"
4740 @-$(RM) $(MISC)/$(TARGET).$(@:b)_9.cmd
4741 @echo $(SHL9LINKER) $(SHL9LINKFLAGS) $(SHL9SONAME) $(LINKFLAGSSHL) $(SHL9VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL9OBJS:s/.obj/.o/) \
4742 $(SHL9VERSIONOBJ) -o $@ \
4743 `cat /dev/null $(SHL9LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
4744 $(SHL9STDLIBS) $(SHL9ARCHIVES) $(SHL9STDSHL) $(STDSHL9) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_9.cmd
4745 @cat $(MISC)/$(TARGET).$(@:b)_9.cmd
4746 @+source $(MISC)/$(TARGET).$(@:b)_9.cmd
4747 .IF "$(UPDATER)"=="YES"
4748 .IF "$(SHL9NOCHECK)"==""
4749 -$(RM) $(SHL9TARGETN:d)check_$(SHL9TARGETN:f)
4750 $(RENAME) $(SHL9TARGETN) $(SHL9TARGETN:d)check_$(SHL9TARGETN:f)
4751 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS9) $(SHL9TARGETN:d)check_$(SHL9TARGETN:f)
4752 .ENDIF # "$(SHL9NOCHECK)"!=""
4753 .ENDIF # "$(UPDATER)"=="YES"
4754 .ENDIF # "$(OS)"=="MACOSX"
4755 .IF "$(UNIXVERSIONNAMES)"!=""
4756 $(RM) $(LB)/$(SHL9TARGETN:b)
4757 cd $(LB) && ln -s $(SHL9TARGETN:f) $(SHL9TARGETN:b)
4758 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
4759 @ls -l $@
4760 .ENDIF # "$(GUI)" == "UNX"
4762 .IF "$(GUI)" == "OS2"
4764 .IF "$(SHL9DEFAULTRES)"!=""
4765 @+-$(RM) $(MISC)/$(SHL9DEFAULTRES:b).rc >& $(NULLDEV)
4766 .IF "$(SHL9ICON)" != ""
4767 @-+echo 1 ICON $(SHL9ICON) >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4768 .ENDIF
4769 .IF "$(use_shl_versions)" != ""
4770 .IF "$(SHL9ADD_VERINFO)"!=""
4771 @-+echo $(EMQ)#include $(EMQ)"$(SHL9ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4772 .ENDIF # "$(SHL9ADD_VERINFO)"!=""
4773 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4774 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL9DEFAULTRES:b).rc
4775 .ENDIF # "$(use_shl_versions)" != ""
4776 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
4777 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL9DEFAULTRES:b).rc
4778 .ENDIF # "$(SHL9DEFAULTRES)"!=""
4780 .IF "$(SHL9ALLRES)"!=""
4781 +$(TYPE) $(SHL9ALLRES) > $(SHL9LINKRES)
4782 .ENDIF # "$(SHL9ALLRES)"!=""
4784 .IF "$(USE_DEFFILE)"!=""
4786 $(SHL9LINKER) $(SHL9LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
4787 $(SHL9DEF) \
4788 $(STDOBJ) \
4789 -L$(LB) \
4790 -L$(SOLARVERSION)/$(INPATH)/lib \
4791 $(SHL9OBJS) $(SHL9VERSIONOBJ) \
4792 $(SHL9LIBS) \
4793 $(SHL9STDLIBS:^"-l") \
4794 $(SHL9LINKRES) \
4795 $(SHL9STDSHL:^"-l") $(STDSHL9:^"-l")
4797 .ELSE # "$(USE_DEFFILE)"!=""
4799 $(SHL9LINKER) -v $(SHL9LINKFLAGS) \
4800 $(LINKFLAGSSHL) $(SHL9BASEX) \
4801 $(SHL9STACK) -o $(SHL9TARGETN) \
4802 $(SHL9DEF) \
4803 $(STDOBJ) \
4804 -L$(LB) \
4805 -L$(SOLARVERSION)/$(INPATH)/lib \
4806 $(SHL9OBJS) $(SHL9VERSIONOBJ) \
4807 $(SHL9LIBS) \
4808 $(SHL9STDLIBS:^"-l") \
4809 $(SHL9LINKRES) \
4810 $(SHL9STDSHL:^"-l") $(STDSHL9:^"-l") \
4811 $(LINKOUTPUTFILTER)
4812 @$(LS) $@ >& $(NULLDEV)
4814 .ENDIF # "$(USE_DEFFILE)"!=""
4816 .IF "$(SHL9TARGET8)" != "$(SHL9TARGET)"
4817 +$(COPY) $@ $(@:d)$(SHL9TARGET8).dll
4818 .ENDIF
4820 .ENDIF # "$(GUI)" == "OS2"
4823 .IF "$(TESTDIR)"!=""
4824 .IF "$(NO_TESTS)"==""
4826 ALLTAR : runtest_$(SHL9TARGET)
4828 runtest_$(SHL9TARGET) : $(SHL9TARGETN)
4829 testshl $(SHL9TARGETN) sce/$(SHL9TARGET).sce -msg -skip
4830 .ENDIF # "$(NO_TESTS)"==""
4831 .ENDIF # "$(TESTDIR)"!=""
4832 .ENDIF # "$(SHL9TARGETN)"!=""
4834 # unroll begin
4836 .IF "$(SHL10TARGETN)"!=""
4838 .IF "$(OS)"=="AIX"
4839 SHL10STDLIBS=
4840 .ENDIF
4842 .IF "$(SHLLINKARCONLY)" != ""
4843 SHL10STDLIBS=
4844 STDSHL=
4845 .ELSE
4846 SHL10ARCHIVES=
4847 .ENDIF
4849 # decide how to link
4850 .IF "$(SHL10CODETYPE)"=="C"
4851 SHL10LINKER=$(LINKC)
4852 SHL10STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
4853 SHL10LINKFLAGS+=$(LINKCFLAGS)
4854 .ELSE # "$(SHL10CODETYPE)"=="C"
4855 SHL10LINKER=$(LINK)
4856 SHL10STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
4857 SHL10LINKFLAGS+=$(LINKFLAGS)
4858 .ENDIF # "$(SHL10CODETYPE)"=="C"
4860 SHL10RPATH*=OOO
4861 LINKFLAGSRUNPATH_$(SHL10RPATH)*=/ERROR:/Bad_SHL10RPATH_value
4862 SHL10LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL10RPATH))
4864 .IF "$(SHL10USE_EXPORTS)"==""
4865 SHL10DEF*=$(MISC)/$(SHL10TARGET).def
4866 .ENDIF # "$(SHL10USE_EXPORTS)"==""
4868 EXTRALIBPATHS10=$(EXTRALIBPATHS)
4869 .IF "$(UPDATER)"=="YES"
4870 .IF "$(SHL10NOCHECK)"==""
4871 .IF "$(SOLAR_STLLIBPATH)"!=""
4872 EXTRALIBPATHS10+=-L$(SOLAR_STLLIBPATH)
4873 .ENDIF
4874 .ENDIF # "$(SHL10NOCHECK)"!=""
4875 .ENDIF
4876 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4877 #+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
4878 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4880 .IF "$(VERSIONOBJ)"!=""
4881 SHL10VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL10TARGET))}$(VERSIONOBJ:f)
4882 USE_VERSIONH:=$(INCCOM)/$(SHL10VERSIONOBJ:b).h
4883 .IF "$(GUI)" == "UNX"
4884 SHL10VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL10TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
4885 .ELSE # "$(GUI)" == "UNX"
4886 SHL10VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL10TARGET))}$(VERSIONOBJ:f)
4887 .ENDIF # "$(GUI)" == "UNX"
4888 $(MISC)/$(SHL10VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL10VERSIONOBJ:b).h
4889 # $(COPY) $(SOLARENV)/src/version.c $@
4890 $(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL10VERSIONOBJ:b).h/ > $@
4892 .INIT : $(SHL10VERSIONOBJDEP)
4893 .ENDIF # "$(VERSIONOBJ)"!=""
4895 .IF "$(GUI)" != "UNX"
4896 .IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
4897 .IF "$(SHL10IMPLIB)" == ""
4898 SHL10IMPLIB=i$(TARGET)_t10
4899 .ENDIF # "$(SHL10IMPLIB)" == ""
4900 .IF "$(COM)" != "GCC"
4901 USE_10IMPLIB=-implib:$(LB)/$(SHL10IMPLIB).lib
4902 .ENDIF # "$(COM)" != "GCC"
4903 SHL10IMPLIBN=$(LB)/$(SHL10IMPLIB).lib
4904 ALLTAR : $(SHL10IMPLIBN)
4906 .IF "$(USE_DEFFILE)"==""
4907 USE_10IMPLIB_DEPS=$(LB)/$(SHL10IMPLIB).lib
4908 .ENDIF # "$(USE_DEFFILE)"==""
4909 .ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
4910 USE_SHL10DEF=$(SHL10DEF)
4911 .ELSE # "$(GUI)" != "UNX"
4912 USE_SHL10DEF=
4913 SHL10DEPN+:=$(SHL10DEPNU)
4915 .IF "$(SHL10VERSIONMAP)"==""
4916 # to activate vmaps remove "#"
4917 USE_SHL10VERSIONMAP=$(MISC)/$(SHL10TARGET).vmap
4918 .ENDIF # "$(SHL10VERSIONMAP)"==""
4920 .IF "$(USE_SHL10VERSIONMAP)"!=""
4922 .IF "$(SHL10FILTERFILE)"!=""
4923 .IF "$(SHL10VERSIONMAP)"!=""
4924 #eine von beiden ist zuviel
4925 USE_SHL10VERSIONMAP=$(MISC)/$(SHL10TARGET).vmap
4926 $(USE_SHL10VERSIONMAP) .PHONY:
4927 @echo -----------------------------
4928 @echo you should only use versionmap OR exportfile
4929 @echo -----------------------------
4930 # force_dmake_to_error
4932 .ENDIF # "$(SHL10VERSIONMAP)"!=""
4934 .IF "$(OS)"!="IRIX"
4935 SHL10VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL10VERSIONMAP)
4936 .ENDIF
4938 $(USE_SHL10VERSIONMAP): \
4939 $(SHL10OBJS)\
4940 $(SHL10LIBS)\
4941 $(SHL10FILTERFILE)
4942 @$(RM) $@.dump
4943 .IF "$(SHL10OBJS)"!=""
4944 # dump remaining objects on the fly
4945 .IF "$(OS)"=="MACOSX"
4946 @-nm $(SHL10OBJS:s/.obj/.o/) > $@.dump
4947 .ELSE
4948 @nm $(SHL10OBJS:s/.obj/.o/) > $@.dump
4949 .ENDIF
4950 .ENDIF # "$(SHL10OBJS)!"=""
4951 @$(TYPE) /dev/null $(SHL10LIBS:s/.lib/.dump/) >> $@.dump
4952 $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL10INTERFACE) -f $(SHL10FILTERFILE) -m $@
4954 .ELSE # "$(SHL10FILTERFILE)"!=""
4955 USE_SHL10VERSIONMAP=$(MISC)/$(SHL10TARGET).vmap
4956 $(USE_SHL10VERSIONMAP) :
4957 @echo -----------------------------
4958 @echo SHL10FILTERFILE not set!
4959 @echo -----------------------------
4960 @$(TOUCH) $@
4961 @echo dummy file to keep the dependencies for later use.
4962 # force_dmake_to_error
4963 .ENDIF # "$(SHL10FILTERFILE)"!=""
4964 .ELSE # "$(USE_SHL10VERSIONMAP)"!=""
4966 #and now for the plain non-generic way...
4967 .IF "$(SHL10VERSIONMAP)"!=""
4968 USE_SHL10VERSIONMAP=$(MISC)/$(SHL10VERSIONMAP:b)_$(SHL10TARGET)$(SHL10VERSIONMAP:e)
4969 .IF "$(OS)"!="IRIX"
4970 SHL10VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL10VERSIONMAP)
4971 .ENDIF
4973 .IF "$(OS)"=="MACOSX"
4974 $(USE_SHL10VERSIONMAP): $(SHL10OBJS) $(SHL10LIBS)
4975 .ENDIF
4977 $(USE_SHL10VERSIONMAP): $(SHL10VERSIONMAP)
4978 @@-$(RM) -f $@
4979 # The following files will only be generated and needed on Mac OS X as temporary files
4980 # in order to generate exported symbols list out of Linux/Solaris map files
4981 .IF "$(OS)"=="MACOSX"
4982 @-$(RM) -f $@.symregexp >& $(NULLDEV)
4983 @-$(RM) -f $@.expsymlist >& $(NULLDEV)
4984 .ENDIF
4985 # Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
4986 # happens if somebody will change it in the future
4987 .IF "$(COMID)"=="gcc3"
4988 tr -d "\015" < $(SHL10VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@
4989 .ELIF "$(COMNAME)"=="sunpro5"
4990 tr -d "\015" < $(SHL10VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
4991 .ELSE # "$(COMID)"=="gcc3"
4992 tr -d "\015" < $(SHL10VERSIONMAP) > $@
4993 .ENDIF # "$(COMID)"=="gcc3"
4994 @chmod a+w $@
4995 # Mac OS X post-processing generate an exported symbols list from the generated map file
4996 # for details on exported symbols list see man ld on Mac OS X
4997 .IF "$(OS)"=="MACOSX"
4998 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
4999 -cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
5000 # Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
5001 # Extract RTTI symbols from all the objects that will be used to build a shared library
5002 .IF "$(SHL10OBJS)"!=""
5003 -echo $(foreach,i,$(SHL10OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
5004 .ENDIF
5005 .IF "$(SHL10LIBS)"!=""
5006 -$(TYPE) $(foreach,j,$(SHL10LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
5007 .ENDIF
5008 # overwrite the map file generate into the local output tree with the generated
5009 # exported symbols list
5010 cp $@.exported-symbols $@
5011 .ENDIF # .IF "$(OS)"=="MACOSX"
5012 .ENDIF # "$(SHL10VERSIONMAP)"!=""
5013 .ENDIF # "$(USE_SHL10VERSIONMAP)"!=""
5014 .ENDIF # "$(GUI)" != "UNX"
5016 .IF "$(UNIXVERSIONNAMES)"!=""
5017 .IF "$(OS)"!="MACOSX"
5018 .IF "$(GUI)"=="UNX"
5019 .IF "$(OS)"=="IRIX"
5020 SHL10SONAME=$(SONAME_SWITCH)$(SHL10TARGETN:f)
5021 .ELSE
5022 SHL10SONAME=\"$(SONAME_SWITCH)$(SHL10TARGETN:f)\"
5023 .ENDIF
5024 .ENDIF # "$(GUI)"!="UNX"
5025 .ENDIF # "$(OS)"!="MACOSX"
5026 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
5028 .IF "$(SHL10RES)"!=""
5029 SHL10ALLRES+=$(SHL10RES)
5030 SHL10LINKRES*=$(MISC)/$(SHL10TARGET).res
5031 SHL10LINKRESO*=$(MISC)/$(SHL10TARGET)_res.o
5032 .ENDIF # "$(SHL10RES)"!=""
5034 .IF "$(SHL10DEFAULTRES)$(use_shl_versions)"!=""
5035 SHL10DEFAULTRES*=$(MISC)/$(SHL10TARGET)_def.res
5036 SHL10ALLRES+=$(SHL10DEFAULTRES)
5037 SHL10LINKRES*=$(MISC)/$(SHL10TARGET).res
5038 SHL10LINKRESO*=$(MISC)/$(SHL10TARGET)_res.o
5039 .ENDIF # "$(SHL10DEFAULTRES)$(use_shl_versions)"!=""
5041 #.IF "$(SHL10TARGETN)"!=""
5043 .IF "$(linkinc)"!=""
5044 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
5045 .IF "$(SHL10LIBS)"!=""
5046 $(MISC)/$(SHL10TARGET)_linkinc.ls .PHONY:
5047 @@-$(RM) $@
5048 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL10LIBS) $(i:s/.lib/.lin/)) >> $@
5049 .ENDIF # "$(SHL10LIBS)"!=""
5050 .ENDIF
5052 LINKINCTARGETS+=$(MISC)/$(SHL10TARGETN:b)_linkinc.ls
5053 $(SHL10TARGETN) : $(LINKINCTARGETS)
5055 .ELSE
5056 .IF "$(SHL10USE_EXPORTS)"=="name"
5057 .IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
5058 .IF "$(COM)"!="GCC"
5059 .IF "$(SHL10LIBS)"!=""
5060 SHL10LINKLIST=$(MISC)/$(SHL10TARGET)_link.lst
5061 SHL10LINKLISTPARAM=@$(SHL10LINKLIST)
5062 $(SHL10LINKLIST) : $(SHL10LIBS)
5063 @@-$(RM) $@
5064 $(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL10LIBS) $(i:s/.lib/.lin/)) >> $@
5065 .ENDIF # "$(SHL10LIBS)"!=""
5066 .ENDIF # "$(COM)"!="GCC"
5067 .ENDIF
5068 .ENDIF # "$(SHL10USE_EXPORTS)"=="name"
5070 $(MISC)/%linkinc.ls:
5071 echo . > $@
5072 .ENDIF # "$(linkinc)"!=""
5074 .IF "$(GUI)" == "OS2"
5075 #21/02/2006 YD dll names must be 8.3, invoke fix script
5076 #check osl/os2/module.c/osl_loadModule()
5077 SHL10TARGET8=$(shell @fix_shl $(SHL10TARGET))
5078 .ENDIF
5080 .IF "$(GUI)" == "OS2"
5081 _SHL10IMP_ORD = $(SHL10STDLIBS:^"$(SOLARVERSION)/$(INPATH)/lib/") $(SHL10STDLIBS:^"$(LB)/")
5082 SHL10IMP_ORD = $(foreach,i,$(_SHL10IMP_ORD) $(shell @-ls $i))
5083 .ELSE
5084 SHL10IMP_ORD =
5085 .ENDIF
5088 $(SHL10TARGETN) : \
5089 $(SHL10OBJS)\
5090 $(SHL10LIBS)\
5091 $(USE_10IMPLIB_DEPS)\
5092 $(USE_SHL10DEF)\
5093 $(USE_SHL10VERSIONMAP)\
5094 $(SHL10RES)\
5095 $(SHL10DEPN) \
5096 $(SHL10IMP_ORD) \
5097 $(SHL10LINKLIST)
5098 @echo ------------------------------
5099 @echo Making: $(SHL10TARGETN)
5100 .IF "$(GUI)" == "WNT"
5101 .IF "$(SHL10DEFAULTRES)"!=""
5102 @@-$(RM) $(MISC)/$(SHL10DEFAULTRES:b).rc
5103 .IF "$(SHL10ICON)" != ""
5104 @echo 1 ICON $(SHL10ICON) >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5105 .ENDIF
5106 .IF "$(use_shl_versions)" != ""
5107 .IF "$(SHL10ADD_VERINFO)"!=""
5108 @echo $(EMQ)#include $(EMQ)"$(SHL10ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5109 .ELSE # "$(SHL10ADD_VERINFO)"!=""
5110 @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5111 @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5112 @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5113 .ENDIF # "$(SHL10ADD_VERINFO)"!=""
5114 @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5115 @echo $(EMQ)#define ORG_NAME $(SHL10TARGET)$(DLLPOST) >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5116 @echo $(EMQ)#define INTERNAL_NAME $(SHL10TARGET:b) >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5117 @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5118 .ENDIF # "$(use_shl_versions)" != ""
5119 $(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL10DEFAULTRES:b).rc
5120 .ENDIF # "$(SHL10DEFAULTRES)"!=""
5121 .IF "$(SHL10ALLRES)"!=""
5122 $(TYPE) $(SHL10ALLRES) > $(SHL10LINKRES)
5123 .IF "$(COM)"=="GCC"
5124 windres $(SHL10LINKRES) $(SHL10LINKRESO)
5125 .ENDIF # "$(COM)"=="GCC"
5126 .ENDIF # "$(SHL10ALLRES)"!=""
5127 .IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
5128 @echo dlltool --input-def $(SHL10DEF) \
5129 --dllname $(SHL10TARGET)$(DLLPOST) \
5130 --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_10.cmd
5131 .IF "$(DEFLIB10NAME)"!="" # do not have to include objs
5132 @echo --output-exp $(MISC)/$(@:b)_exp.o >> $(MISC)/$(TARGET).$(@:b)_10.cmd
5133 .ELSE # "$(DEFLIB10NAME)"!="" # do not have to include objs
5134 @echo --output-exp $(MISC)/$(@:b)_exp.o \
5135 $(STDOBJ) $(SHL10OBJS) $(SHL10LINKRESO) \
5136 `$(TYPE) /dev/null $(SHL10LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` >> $(MISC)/$(TARGET).$(@:b)_10.cmd
5137 .ENDIF # "$(DEFLIB10NAME)"!=""
5138 @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
5139 $(STDOBJ) $(SHL10VERSIONOBJ) $(SHL10DESCRIPTIONOBJ) $(SHL10OBJS) $(SHL10LINKRESO) \
5140 `$(TYPE) /dev/null $(SHL10LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
5141 -Wl,--exclude-libs,ALL,--start-group $(SHL10STDLIBS) -Wl,--end-group \
5142 $(SHL10STDSHL) $(STDSHL10) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
5143 -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_10.cmd
5144 @$(TYPE) $(MISC)/$(TARGET).$(@:b)_10.cmd
5145 @+source $(MISC)/$(TARGET).$(@:b)_10.cmd
5146 .ELSE
5147 .IF "$(linkinc)"==""
5148 .IF "$(SHL10USE_EXPORTS)"!="name"
5149 .IF "$(USE_DEFFILE)"!=""
5150 $(SHL10LINKER) @$(mktmp \
5151 $(SHL10LINKFLAGS) \
5152 $(LINKFLAGSSHL) \
5153 $(SHL10STACK) $(SHL10BASEX) \
5154 -out:$@ \
5155 -map:$(MISC)/$(@:b).map \
5156 -def:$(SHL10DEF) \
5157 $(USE_10IMPLIB) \
5158 $(STDOBJ) \
5159 $(SHL10VERSIONOBJ) $(SHL10OBJS) \
5160 $(SHL10LIBS) \
5161 $(SHL10STDLIBS) \
5162 $(SHL10STDSHL) $(STDSHL10) \
5163 $(SHL10LINKRES) \
5164 ) $(LINKOUTPUTFILTER)
5165 # double check if target was really written... still making sense?
5166 @@$(LS) $@
5167 @echo linking $@.manifest ...
5168 .IF "$(VISTA_MANIFEST)"!=""
5169 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
5170 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
5171 .ELSE
5172 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
5173 .ENDIF # "$(VISTA_MANIFEST)"!=""
5174 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
5175 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
5176 .ELSE # "$(USE_DEFFILE)"!=""
5177 $(SHL10LINKER) @$(mktmp $(SHL10LINKFLAGS) \
5178 $(LINKFLAGSSHL) $(SHL10BASEX) \
5179 $(SHL10STACK) -out:$(SHL10TARGETN) \
5180 -map:$(MISC)/$(@:B).map \
5181 $(LB)/$(SHL10IMPLIB).exp \
5182 $(STDOBJ) \
5183 $(SHL10OBJS) $(SHL10VERSIONOBJ) \
5184 $(SHL10LIBS) \
5185 $(SHL10STDLIBS) \
5186 $(SHL10STDSHL) $(STDSHL10) \
5187 $(SHL10LINKRES) \
5188 ) $(LINKOUTPUTFILTER)
5189 # double check if target was really written... still making sense?
5190 @@$(LS) $@
5191 @echo linking $@.manifest ...
5192 .IF "$(VISTA_MANIFEST)"!=""
5193 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
5194 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
5195 .ELSE
5196 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
5197 .ENDIF # "$(VISTA_MANIFEST)"!=""
5198 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
5199 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
5200 .ENDIF # "$(USE_DEFFILE)"!=""
5201 .ELSE # "$(SHL10USE_EXPORTS)"!="name"
5202 $(SHL10LINKER) @$(mktmp $(SHL10LINKFLAGS) \
5203 $(LINKFLAGSSHL) $(SHL10BASEX) \
5204 $(SHL10STACK) -out:$(SHL10TARGETN) \
5205 -map:$(MISC)/$(@:B).map \
5206 $(USE_10IMPLIB) \
5207 $(STDOBJ) \
5208 $(SHL10OBJS) $(SHL10VERSIONOBJ)) \
5209 $(SHL10LINKLISTPARAM) \
5210 @$(mktmp $(SHL10STDLIBS) \
5211 $(SHL10STDSHL) $(STDSHL10) \
5212 $(SHL10LINKRES) \
5214 @echo linking $@.manifest ...
5215 .IF "$(VISTA_MANIFEST)"!=""
5216 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
5217 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
5218 .ELSE
5219 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
5220 .ENDIF # "$(VISTA_MANIFEST)"!=""
5221 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
5222 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
5223 .ENDIF # "$(SHL10USE_EXPORTS)"!="name"
5224 .ELSE # "$(linkinc)"==""
5225 -$(RM) del $(MISC)/$(SHL10TARGET).lnk
5226 -$(RM) $(MISC)/$(SHL10TARGET).lst
5227 $(TYPE) $(mktmp \
5228 $(SHL10LINKFLAGS) \
5229 $(LINKFLAGSSHL) $(SHL10BASEX) \
5230 $(SHL10STACK) $(MAPFILE) \
5231 -out:$@ \
5232 $(LB)/$(SHL10IMPLIB).exp \
5233 $(STDOBJ) \
5234 $(SHL10OBJS) \
5235 $(SHL10STDLIBS) \
5236 $(SHL10STDSHL) $(STDSHL10) \
5237 $(SHL10LINKRES) \
5238 ) >> $(MISC)/$(SHL10TARGET).lnk
5239 $(TYPE) $(MISC)/$(SHL10TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL10TARGET).lnk
5240 $(SHL10LINKER) @$(MISC)/$(SHL10TARGET).lnk
5241 @echo linking $@.manifest ...
5242 .IF "$(VISTA_MANIFEST)"!=""
5243 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
5244 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
5245 .ELSE
5246 $(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
5247 .ENDIF # "$(VISTA_MANIFEST)"!=""
5248 $(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
5249 $(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
5250 .ENDIF # "$(linkinc)"==""
5251 .ENDIF # "$(COM)"=="GCC"
5252 .ENDIF # "$(GUI)" == "WNT"
5253 .IF "$(GUI)"=="UNX"
5254 .IF "$(OS)"=="MACOSX"
5255 @-$(RM) $(MISC)/$(@:b).list
5256 @-$(RM) $(MISC)/$(TARGET).$(@:b)_10.cmd
5257 @echo $(STDSLO) $(SHL10OBJS:s/.obj/.o/) \
5258 $(SHL10VERSIONOBJ) \
5259 `cat /dev/null $(SHL10LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list
5260 @echo -n $(SHL10LINKER) $(SHL10LINKFLAGS) $(SHL10VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \
5261 $(SHL10STDLIBS) $(SHL10ARCHIVES) $(SHL10STDSHL) $(STDSHL10) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_10.cmd
5262 @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
5263 `cat $(MISC)/$(TARGET).$(@:b)_10.cmd` \
5264 >> $(MISC)/$(TARGET).$(@:b)_10.cmd
5265 @cat $(MISC)/$(TARGET).$(@:b)_10.cmd
5266 @+source $(MISC)/$(TARGET).$(@:b)_10.cmd
5267 @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \
5268 shl $(SHL10RPATH) $@
5269 @echo "Making: $@.jnilib"
5270 @macosx-create-bundle $@
5271 .IF "$(UPDATER)"=="YES"
5272 .IF "$(SHL10NOCHECK)"==""
5273 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS10) $(SHL10TARGETN)
5274 .ENDIF # "$(SHL10NOCHECK)"!=""
5275 .ENDIF
5276 .ELSE # "$(OS)"=="MACOSX"
5277 @-$(RM) $(MISC)/$(TARGET).$(@:b)_10.cmd
5278 @echo $(SHL10LINKER) $(SHL10LINKFLAGS) $(SHL10SONAME) $(LINKFLAGSSHL) $(SHL10VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL10OBJS:s/.obj/.o/) \
5279 $(SHL10VERSIONOBJ) -o $@ \
5280 `cat /dev/null $(SHL10LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \
5281 $(SHL10STDLIBS) $(SHL10ARCHIVES) $(SHL10STDSHL) $(STDSHL10) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_10.cmd
5282 @cat $(MISC)/$(TARGET).$(@:b)_10.cmd
5283 @+source $(MISC)/$(TARGET).$(@:b)_10.cmd
5284 .IF "$(UPDATER)"=="YES"
5285 .IF "$(SHL10NOCHECK)"==""
5286 -$(RM) $(SHL10TARGETN:d)check_$(SHL10TARGETN:f)
5287 $(RENAME) $(SHL10TARGETN) $(SHL10TARGETN:d)check_$(SHL10TARGETN:f)
5288 $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS10) $(SHL10TARGETN:d)check_$(SHL10TARGETN:f)
5289 .ENDIF # "$(SHL10NOCHECK)"!=""
5290 .ENDIF # "$(UPDATER)"=="YES"
5291 .ENDIF # "$(OS)"=="MACOSX"
5292 .IF "$(UNIXVERSIONNAMES)"!=""
5293 $(RM) $(LB)/$(SHL10TARGETN:b)
5294 cd $(LB) && ln -s $(SHL10TARGETN:f) $(SHL10TARGETN:b)
5295 .ENDIF # "$(UNIXVERSIONNAMES)"!=""
5296 @ls -l $@
5297 .ENDIF # "$(GUI)" == "UNX"
5299 .IF "$(GUI)" == "OS2"
5301 .IF "$(SHL10DEFAULTRES)"!=""
5302 @+-$(RM) $(MISC)/$(SHL10DEFAULTRES:b).rc >& $(NULLDEV)
5303 .IF "$(SHL10ICON)" != ""
5304 @-+echo 1 ICON $(SHL10ICON) >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5305 .ENDIF
5306 .IF "$(use_shl_versions)" != ""
5307 .IF "$(SHL10ADD_VERINFO)"!=""
5308 @-+echo $(EMQ)#include $(EMQ)"$(SHL10ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5309 .ENDIF # "$(SHL10ADD_VERINFO)"!=""
5310 @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5311 # @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL10DEFAULTRES:b).rc
5312 .ENDIF # "$(use_shl_versions)" != ""
5313 # YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
5314 $(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL10DEFAULTRES:b).rc
5315 .ENDIF # "$(SHL10DEFAULTRES)"!=""
5317 .IF "$(SHL10ALLRES)"!=""
5318 +$(TYPE) $(SHL10ALLRES) > $(SHL10LINKRES)
5319 .ENDIF # "$(SHL10ALLRES)"!=""
5321 .IF "$(USE_DEFFILE)"!=""
5323 $(SHL10LINKER) $(SHL10LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
5324 $(SHL10DEF) \
5325 $(STDOBJ) \
5326 -L$(LB) \
5327 -L$(SOLARVERSION)/$(INPATH)/lib \
5328 $(SHL10OBJS) $(SHL10VERSIONOBJ) \
5329 $(SHL10LIBS) \
5330 $(SHL10STDLIBS:^"-l") \
5331 $(SHL10LINKRES) \
5332 $(SHL10STDSHL:^"-l") $(STDSHL10:^"-l")
5334 .ELSE # "$(USE_DEFFILE)"!=""
5336 $(SHL10LINKER) -v $(SHL10LINKFLAGS) \
5337 $(LINKFLAGSSHL) $(SHL10BASEX) \
5338 $(SHL10STACK) -o $(SHL10TARGETN) \
5339 $(SHL10DEF) \
5340 $(STDOBJ) \
5341 -L$(LB) \
5342 -L$(SOLARVERSION)/$(INPATH)/lib \
5343 $(SHL10OBJS) $(SHL10VERSIONOBJ) \
5344 $(SHL10LIBS) \
5345 $(SHL10STDLIBS:^"-l") \
5346 $(SHL10LINKRES) \
5347 $(SHL10STDSHL:^"-l") $(STDSHL10:^"-l") \
5348 $(LINKOUTPUTFILTER)
5349 @$(LS) $@ >& $(NULLDEV)
5351 .ENDIF # "$(USE_DEFFILE)"!=""
5353 .IF "$(SHL10TARGET8)" != "$(SHL10TARGET)"
5354 +$(COPY) $@ $(@:d)$(SHL10TARGET8).dll
5355 .ENDIF
5357 .ENDIF # "$(GUI)" == "OS2"
5360 .IF "$(TESTDIR)"!=""
5361 .IF "$(NO_TESTS)"==""
5363 ALLTAR : runtest_$(SHL10TARGET)
5365 runtest_$(SHL10TARGET) : $(SHL10TARGETN)
5366 testshl $(SHL10TARGETN) sce/$(SHL10TARGET).sce -msg -skip
5367 .ENDIF # "$(NO_TESTS)"==""
5368 .ENDIF # "$(TESTDIR)"!=""
5369 .ENDIF # "$(SHL10TARGETN)"!=""
5371 # unroll begin
5373 .IF "$(SHL1IMPLIBN)" != ""
5375 .IF "$(UPDATER)"=="YES"
5376 USELIB1DEPN+=$(SHL1LIBS)
5377 .ELSE
5378 .ENDIF
5380 .IF "$(USE_DEFFILE)"!=""
5381 USE_SHL1TARGET=$(SHL1TARGETN)
5382 .ENDIF
5384 .IF "$(GUI)" != "UNX"
5385 $(SHL1IMPLIBN): \
5386 $(SHL1DEF) \
5387 $(USE_SHL1TARGET) \
5388 $(USELIB1DEPN) \
5389 $(USELIBDEPN)
5390 .ELSE
5391 $(SHL1IMPLIBN): \
5392 $(SHL1LIBS)
5393 .ENDIF
5394 @echo ------------------------------1
5395 @echo Making: $(SHL1IMPLIBN)
5396 .IF "$(GUI)" == "WNT"
5397 .IF "$(COM)"=="GCC"
5398 @echo no ImportLibs on mingw
5399 @-$(RM) $@
5400 @$(TOUCH) $@
5401 .ELSE # "$(COM)=="GCC"
5402 # bei use_deffile implib von linker erstellt
5403 .IF "$(USE_DEFFILE)"==""
5404 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL1IMPLIBN) \
5405 -def:$(SHL1DEF) )
5406 .ELSE # "$(USE_DEFFILE)==""
5407 @echo build of $(SHL1TARGETN) creates $@
5408 @$(TOUCH) $@
5409 .ENDIF # "$(USE_DEFFILE)==""
5410 .ENDIF # "$(COM)"=="GCC"
5412 .ELIF "$(GUI)" == "OS2"
5414 # touch creates an empty file, but this is not good for emxomfar, so
5415 # create a dummy lib here
5416 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL1VERSIONOBJ)
5417 +@echo build of $(SHL1TARGETN) creates $@
5419 .ELSE
5420 @echo no ImportLibs on Mac and *ix
5421 @-$(RM) $@
5422 @$(TOUCH) $@
5423 .ENDIF
5424 .ENDIF
5426 # unroll begin
5428 .IF "$(SHL2IMPLIBN)" != ""
5430 .IF "$(UPDATER)"=="YES"
5431 USELIB2DEPN+=$(SHL2LIBS)
5432 .ELSE
5433 .ENDIF
5435 .IF "$(USE_DEFFILE)"!=""
5436 USE_SHL2TARGET=$(SHL2TARGETN)
5437 .ENDIF
5439 .IF "$(GUI)" != "UNX"
5440 $(SHL2IMPLIBN): \
5441 $(SHL2DEF) \
5442 $(USE_SHL2TARGET) \
5443 $(USELIB2DEPN) \
5444 $(USELIBDEPN)
5445 .ELSE
5446 $(SHL2IMPLIBN): \
5447 $(SHL2LIBS)
5448 .ENDIF
5449 @echo ------------------------------1
5450 @echo Making: $(SHL2IMPLIBN)
5451 .IF "$(GUI)" == "WNT"
5452 .IF "$(COM)"=="GCC"
5453 @echo no ImportLibs on mingw
5454 @-$(RM) $@
5455 @$(TOUCH) $@
5456 .ELSE # "$(COM)=="GCC"
5457 # bei use_deffile implib von linker erstellt
5458 .IF "$(USE_DEFFILE)"==""
5459 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL2IMPLIBN) \
5460 -def:$(SHL2DEF) )
5461 .ELSE # "$(USE_DEFFILE)==""
5462 @echo build of $(SHL2TARGETN) creates $@
5463 @$(TOUCH) $@
5464 .ENDIF # "$(USE_DEFFILE)==""
5465 .ENDIF # "$(COM)"=="GCC"
5467 .ELIF "$(GUI)" == "OS2"
5469 # touch creates an empty file, but this is not good for emxomfar, so
5470 # create a dummy lib here
5471 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL2VERSIONOBJ)
5472 +@echo build of $(SHL2TARGETN) creates $@
5474 .ELSE
5475 @echo no ImportLibs on Mac and *ix
5476 @-$(RM) $@
5477 @$(TOUCH) $@
5478 .ENDIF
5479 .ENDIF
5481 # unroll begin
5483 .IF "$(SHL3IMPLIBN)" != ""
5485 .IF "$(UPDATER)"=="YES"
5486 USELIB3DEPN+=$(SHL3LIBS)
5487 .ELSE
5488 .ENDIF
5490 .IF "$(USE_DEFFILE)"!=""
5491 USE_SHL3TARGET=$(SHL3TARGETN)
5492 .ENDIF
5494 .IF "$(GUI)" != "UNX"
5495 $(SHL3IMPLIBN): \
5496 $(SHL3DEF) \
5497 $(USE_SHL3TARGET) \
5498 $(USELIB3DEPN) \
5499 $(USELIBDEPN)
5500 .ELSE
5501 $(SHL3IMPLIBN): \
5502 $(SHL3LIBS)
5503 .ENDIF
5504 @echo ------------------------------1
5505 @echo Making: $(SHL3IMPLIBN)
5506 .IF "$(GUI)" == "WNT"
5507 .IF "$(COM)"=="GCC"
5508 @echo no ImportLibs on mingw
5509 @-$(RM) $@
5510 @$(TOUCH) $@
5511 .ELSE # "$(COM)=="GCC"
5512 # bei use_deffile implib von linker erstellt
5513 .IF "$(USE_DEFFILE)"==""
5514 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL3IMPLIBN) \
5515 -def:$(SHL3DEF) )
5516 .ELSE # "$(USE_DEFFILE)==""
5517 @echo build of $(SHL3TARGETN) creates $@
5518 @$(TOUCH) $@
5519 .ENDIF # "$(USE_DEFFILE)==""
5520 .ENDIF # "$(COM)"=="GCC"
5522 .ELIF "$(GUI)" == "OS2"
5524 # touch creates an empty file, but this is not good for emxomfar, so
5525 # create a dummy lib here
5526 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL3VERSIONOBJ)
5527 +@echo build of $(SHL3TARGETN) creates $@
5529 .ELSE
5530 @echo no ImportLibs on Mac and *ix
5531 @-$(RM) $@
5532 @$(TOUCH) $@
5533 .ENDIF
5534 .ENDIF
5536 # unroll begin
5538 .IF "$(SHL4IMPLIBN)" != ""
5540 .IF "$(UPDATER)"=="YES"
5541 USELIB4DEPN+=$(SHL4LIBS)
5542 .ELSE
5543 .ENDIF
5545 .IF "$(USE_DEFFILE)"!=""
5546 USE_SHL4TARGET=$(SHL4TARGETN)
5547 .ENDIF
5549 .IF "$(GUI)" != "UNX"
5550 $(SHL4IMPLIBN): \
5551 $(SHL4DEF) \
5552 $(USE_SHL4TARGET) \
5553 $(USELIB4DEPN) \
5554 $(USELIBDEPN)
5555 .ELSE
5556 $(SHL4IMPLIBN): \
5557 $(SHL4LIBS)
5558 .ENDIF
5559 @echo ------------------------------1
5560 @echo Making: $(SHL4IMPLIBN)
5561 .IF "$(GUI)" == "WNT"
5562 .IF "$(COM)"=="GCC"
5563 @echo no ImportLibs on mingw
5564 @-$(RM) $@
5565 @$(TOUCH) $@
5566 .ELSE # "$(COM)=="GCC"
5567 # bei use_deffile implib von linker erstellt
5568 .IF "$(USE_DEFFILE)"==""
5569 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL4IMPLIBN) \
5570 -def:$(SHL4DEF) )
5571 .ELSE # "$(USE_DEFFILE)==""
5572 @echo build of $(SHL4TARGETN) creates $@
5573 @$(TOUCH) $@
5574 .ENDIF # "$(USE_DEFFILE)==""
5575 .ENDIF # "$(COM)"=="GCC"
5577 .ELIF "$(GUI)" == "OS2"
5579 # touch creates an empty file, but this is not good for emxomfar, so
5580 # create a dummy lib here
5581 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL4VERSIONOBJ)
5582 +@echo build of $(SHL4TARGETN) creates $@
5584 .ELSE
5585 @echo no ImportLibs on Mac and *ix
5586 @-$(RM) $@
5587 @$(TOUCH) $@
5588 .ENDIF
5589 .ENDIF
5591 # unroll begin
5593 .IF "$(SHL5IMPLIBN)" != ""
5595 .IF "$(UPDATER)"=="YES"
5596 USELIB5DEPN+=$(SHL5LIBS)
5597 .ELSE
5598 .ENDIF
5600 .IF "$(USE_DEFFILE)"!=""
5601 USE_SHL5TARGET=$(SHL5TARGETN)
5602 .ENDIF
5604 .IF "$(GUI)" != "UNX"
5605 $(SHL5IMPLIBN): \
5606 $(SHL5DEF) \
5607 $(USE_SHL5TARGET) \
5608 $(USELIB5DEPN) \
5609 $(USELIBDEPN)
5610 .ELSE
5611 $(SHL5IMPLIBN): \
5612 $(SHL5LIBS)
5613 .ENDIF
5614 @echo ------------------------------1
5615 @echo Making: $(SHL5IMPLIBN)
5616 .IF "$(GUI)" == "WNT"
5617 .IF "$(COM)"=="GCC"
5618 @echo no ImportLibs on mingw
5619 @-$(RM) $@
5620 @$(TOUCH) $@
5621 .ELSE # "$(COM)=="GCC"
5622 # bei use_deffile implib von linker erstellt
5623 .IF "$(USE_DEFFILE)"==""
5624 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL5IMPLIBN) \
5625 -def:$(SHL5DEF) )
5626 .ELSE # "$(USE_DEFFILE)==""
5627 @echo build of $(SHL5TARGETN) creates $@
5628 @$(TOUCH) $@
5629 .ENDIF # "$(USE_DEFFILE)==""
5630 .ENDIF # "$(COM)"=="GCC"
5632 .ELIF "$(GUI)" == "OS2"
5634 # touch creates an empty file, but this is not good for emxomfar, so
5635 # create a dummy lib here
5636 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL5VERSIONOBJ)
5637 +@echo build of $(SHL5TARGETN) creates $@
5639 .ELSE
5640 @echo no ImportLibs on Mac and *ix
5641 @-$(RM) $@
5642 @$(TOUCH) $@
5643 .ENDIF
5644 .ENDIF
5646 # unroll begin
5648 .IF "$(SHL6IMPLIBN)" != ""
5650 .IF "$(UPDATER)"=="YES"
5651 USELIB6DEPN+=$(SHL6LIBS)
5652 .ELSE
5653 .ENDIF
5655 .IF "$(USE_DEFFILE)"!=""
5656 USE_SHL6TARGET=$(SHL6TARGETN)
5657 .ENDIF
5659 .IF "$(GUI)" != "UNX"
5660 $(SHL6IMPLIBN): \
5661 $(SHL6DEF) \
5662 $(USE_SHL6TARGET) \
5663 $(USELIB6DEPN) \
5664 $(USELIBDEPN)
5665 .ELSE
5666 $(SHL6IMPLIBN): \
5667 $(SHL6LIBS)
5668 .ENDIF
5669 @echo ------------------------------1
5670 @echo Making: $(SHL6IMPLIBN)
5671 .IF "$(GUI)" == "WNT"
5672 .IF "$(COM)"=="GCC"
5673 @echo no ImportLibs on mingw
5674 @-$(RM) $@
5675 @$(TOUCH) $@
5676 .ELSE # "$(COM)=="GCC"
5677 # bei use_deffile implib von linker erstellt
5678 .IF "$(USE_DEFFILE)"==""
5679 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL6IMPLIBN) \
5680 -def:$(SHL6DEF) )
5681 .ELSE # "$(USE_DEFFILE)==""
5682 @echo build of $(SHL6TARGETN) creates $@
5683 @$(TOUCH) $@
5684 .ENDIF # "$(USE_DEFFILE)==""
5685 .ENDIF # "$(COM)"=="GCC"
5687 .ELIF "$(GUI)" == "OS2"
5689 # touch creates an empty file, but this is not good for emxomfar, so
5690 # create a dummy lib here
5691 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL6VERSIONOBJ)
5692 +@echo build of $(SHL6TARGETN) creates $@
5694 .ELSE
5695 @echo no ImportLibs on Mac and *ix
5696 @-$(RM) $@
5697 @$(TOUCH) $@
5698 .ENDIF
5699 .ENDIF
5701 # unroll begin
5703 .IF "$(SHL7IMPLIBN)" != ""
5705 .IF "$(UPDATER)"=="YES"
5706 USELIB7DEPN+=$(SHL7LIBS)
5707 .ELSE
5708 .ENDIF
5710 .IF "$(USE_DEFFILE)"!=""
5711 USE_SHL7TARGET=$(SHL7TARGETN)
5712 .ENDIF
5714 .IF "$(GUI)" != "UNX"
5715 $(SHL7IMPLIBN): \
5716 $(SHL7DEF) \
5717 $(USE_SHL7TARGET) \
5718 $(USELIB7DEPN) \
5719 $(USELIBDEPN)
5720 .ELSE
5721 $(SHL7IMPLIBN): \
5722 $(SHL7LIBS)
5723 .ENDIF
5724 @echo ------------------------------1
5725 @echo Making: $(SHL7IMPLIBN)
5726 .IF "$(GUI)" == "WNT"
5727 .IF "$(COM)"=="GCC"
5728 @echo no ImportLibs on mingw
5729 @-$(RM) $@
5730 @$(TOUCH) $@
5731 .ELSE # "$(COM)=="GCC"
5732 # bei use_deffile implib von linker erstellt
5733 .IF "$(USE_DEFFILE)"==""
5734 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL7IMPLIBN) \
5735 -def:$(SHL7DEF) )
5736 .ELSE # "$(USE_DEFFILE)==""
5737 @echo build of $(SHL7TARGETN) creates $@
5738 @$(TOUCH) $@
5739 .ENDIF # "$(USE_DEFFILE)==""
5740 .ENDIF # "$(COM)"=="GCC"
5742 .ELIF "$(GUI)" == "OS2"
5744 # touch creates an empty file, but this is not good for emxomfar, so
5745 # create a dummy lib here
5746 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL7VERSIONOBJ)
5747 +@echo build of $(SHL7TARGETN) creates $@
5749 .ELSE
5750 @echo no ImportLibs on Mac and *ix
5751 @-$(RM) $@
5752 @$(TOUCH) $@
5753 .ENDIF
5754 .ENDIF
5756 # unroll begin
5758 .IF "$(SHL8IMPLIBN)" != ""
5760 .IF "$(UPDATER)"=="YES"
5761 USELIB8DEPN+=$(SHL8LIBS)
5762 .ELSE
5763 .ENDIF
5765 .IF "$(USE_DEFFILE)"!=""
5766 USE_SHL8TARGET=$(SHL8TARGETN)
5767 .ENDIF
5769 .IF "$(GUI)" != "UNX"
5770 $(SHL8IMPLIBN): \
5771 $(SHL8DEF) \
5772 $(USE_SHL8TARGET) \
5773 $(USELIB8DEPN) \
5774 $(USELIBDEPN)
5775 .ELSE
5776 $(SHL8IMPLIBN): \
5777 $(SHL8LIBS)
5778 .ENDIF
5779 @echo ------------------------------1
5780 @echo Making: $(SHL8IMPLIBN)
5781 .IF "$(GUI)" == "WNT"
5782 .IF "$(COM)"=="GCC"
5783 @echo no ImportLibs on mingw
5784 @-$(RM) $@
5785 @$(TOUCH) $@
5786 .ELSE # "$(COM)=="GCC"
5787 # bei use_deffile implib von linker erstellt
5788 .IF "$(USE_DEFFILE)"==""
5789 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL8IMPLIBN) \
5790 -def:$(SHL8DEF) )
5791 .ELSE # "$(USE_DEFFILE)==""
5792 @echo build of $(SHL8TARGETN) creates $@
5793 @$(TOUCH) $@
5794 .ENDIF # "$(USE_DEFFILE)==""
5795 .ENDIF # "$(COM)"=="GCC"
5797 .ELIF "$(GUI)" == "OS2"
5799 # touch creates an empty file, but this is not good for emxomfar, so
5800 # create a dummy lib here
5801 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL8VERSIONOBJ)
5802 +@echo build of $(SHL8TARGETN) creates $@
5804 .ELSE
5805 @echo no ImportLibs on Mac and *ix
5806 @-$(RM) $@
5807 @$(TOUCH) $@
5808 .ENDIF
5809 .ENDIF
5811 # unroll begin
5813 .IF "$(SHL9IMPLIBN)" != ""
5815 .IF "$(UPDATER)"=="YES"
5816 USELIB9DEPN+=$(SHL9LIBS)
5817 .ELSE
5818 .ENDIF
5820 .IF "$(USE_DEFFILE)"!=""
5821 USE_SHL9TARGET=$(SHL9TARGETN)
5822 .ENDIF
5824 .IF "$(GUI)" != "UNX"
5825 $(SHL9IMPLIBN): \
5826 $(SHL9DEF) \
5827 $(USE_SHL9TARGET) \
5828 $(USELIB9DEPN) \
5829 $(USELIBDEPN)
5830 .ELSE
5831 $(SHL9IMPLIBN): \
5832 $(SHL9LIBS)
5833 .ENDIF
5834 @echo ------------------------------1
5835 @echo Making: $(SHL9IMPLIBN)
5836 .IF "$(GUI)" == "WNT"
5837 .IF "$(COM)"=="GCC"
5838 @echo no ImportLibs on mingw
5839 @-$(RM) $@
5840 @$(TOUCH) $@
5841 .ELSE # "$(COM)=="GCC"
5842 # bei use_deffile implib von linker erstellt
5843 .IF "$(USE_DEFFILE)"==""
5844 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL9IMPLIBN) \
5845 -def:$(SHL9DEF) )
5846 .ELSE # "$(USE_DEFFILE)==""
5847 @echo build of $(SHL9TARGETN) creates $@
5848 @$(TOUCH) $@
5849 .ENDIF # "$(USE_DEFFILE)==""
5850 .ENDIF # "$(COM)"=="GCC"
5852 .ELIF "$(GUI)" == "OS2"
5854 # touch creates an empty file, but this is not good for emxomfar, so
5855 # create a dummy lib here
5856 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL9VERSIONOBJ)
5857 +@echo build of $(SHL9TARGETN) creates $@
5859 .ELSE
5860 @echo no ImportLibs on Mac and *ix
5861 @-$(RM) $@
5862 @$(TOUCH) $@
5863 .ENDIF
5864 .ENDIF
5866 # unroll begin
5868 .IF "$(SHL10IMPLIBN)" != ""
5870 .IF "$(UPDATER)"=="YES"
5871 USELIB10DEPN+=$(SHL10LIBS)
5872 .ELSE
5873 .ENDIF
5875 .IF "$(USE_DEFFILE)"!=""
5876 USE_SHL10TARGET=$(SHL10TARGETN)
5877 .ENDIF
5879 .IF "$(GUI)" != "UNX"
5880 $(SHL10IMPLIBN): \
5881 $(SHL10DEF) \
5882 $(USE_SHL10TARGET) \
5883 $(USELIB10DEPN) \
5884 $(USELIBDEPN)
5885 .ELSE
5886 $(SHL10IMPLIBN): \
5887 $(SHL10LIBS)
5888 .ENDIF
5889 @echo ------------------------------1
5890 @echo Making: $(SHL10IMPLIBN)
5891 .IF "$(GUI)" == "WNT"
5892 .IF "$(COM)"=="GCC"
5893 @echo no ImportLibs on mingw
5894 @-$(RM) $@
5895 @$(TOUCH) $@
5896 .ELSE # "$(COM)=="GCC"
5897 # bei use_deffile implib von linker erstellt
5898 .IF "$(USE_DEFFILE)"==""
5899 $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL10IMPLIBN) \
5900 -def:$(SHL10DEF) )
5901 .ELSE # "$(USE_DEFFILE)==""
5902 @echo build of $(SHL10TARGETN) creates $@
5903 @$(TOUCH) $@
5904 .ENDIF # "$(USE_DEFFILE)==""
5905 .ENDIF # "$(COM)"=="GCC"
5907 .ELIF "$(GUI)" == "OS2"
5909 # touch creates an empty file, but this is not good for emxomfar, so
5910 # create a dummy lib here
5911 -$(LIBMGR) $(LIBFLAGS) $@ $(SHL10VERSIONOBJ)
5912 +@echo build of $(SHL10TARGETN) creates $@
5914 .ELSE
5915 @echo no ImportLibs on Mac and *ix
5916 @-$(RM) $@
5917 @$(TOUCH) $@
5918 .ENDIF
5919 .ENDIF