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