xref: /aoo42x/main/solenv/inc/_tg_def.mk (revision 534c536d)
1cdf0e10cSrcweir# unroll begin
2cdf0e10cSrcweir
3cdf0e10cSrcweir.IF "$(DEF1TARGETN)"!=""
4cdf0e10cSrcweir
5cdf0e10cSrcweir#to make intuitiv naming work
6cdf0e10cSrcweir.IF "$(DEF1LIBNAME)"!=""
7cdf0e10cSrcweirDEFLIB1NAME*=$(DEF1LIBNAME)
8cdf0e10cSrcweir.ENDIF			# "$(DEF1LIBNAME)"!=""
9cdf0e10cSrcweir
10cdf0e10cSrcweir.IF "$(DEFLIB1NAME)"!=""
11cdf0e10cSrcweirDEF1DEPN+=$(foreach,i,$(DEFLIB1NAME) $(SLB)/$(i).lib)
12cdf0e10cSrcweir.ENDIF
13cdf0e10cSrcweir
14cdf0e10cSrcweir.IF "$(SHL1VERSIONMAP)"!=""
15cdf0e10cSrcweir.IF "$(DEF1EXPORTFILE)"==""
16cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
17cdf0e10cSrcweirDEF1EXPORTFILE=$(MISC)/$(SHL1VERSIONMAP:b)_$(SHL1TARGET).dxp
18cdf0e10cSrcweir.IF "$(COM)"=="GCC"
19cdf0e10cSrcweir$(DEF1EXPORTFILE) : $(SHL1OBJS) $(SHL1LIBS)
20cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
21cdf0e10cSrcweir
22cdf0e10cSrcweir$(DEF1EXPORTFILE) : $(SHL1VERSIONMAP)
23cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
24cdf0e10cSrcweir.IF "$(COM)"=="GCC"
25cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
26cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
27cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
28cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
29cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL1OBJS) \
30cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL1LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
31cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
32cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
33cdf0e10cSrcweir# exported symbols list
34cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
35cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
36cdf0e10cSrcweir
37cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
38cdf0e10cSrcweir
39cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
40cdf0e10cSrcweirDEF1EXPORTFILE=$(MISC)/$(SHL1VERSIONMAP:b)_$(SHL1TARGET).dxp
41cdf0e10cSrcweir$(DEF1EXPORTFILE) : $(SHL1VERSIONMAP)
42cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
43cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
44cdf0e10cSrcweir
45cdf0e10cSrcweir.ENDIF			# "$(DEF1EXPORTFILE)"==""
46cdf0e10cSrcweir.ENDIF			# "$(SHL1VERSIONMAP)"!=""
47cdf0e10cSrcweir
48cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
49cdf0e10cSrcweir
50cdf0e10cSrcweirDEF1FILTER=$(SOLARENV)/inc/dummy.flt
51cdf0e10cSrcweir
52cdf0e10cSrcweirRMHACK1:=$(RM)
53cdf0e10cSrcweir
54cdf0e10cSrcweir.IF "$(DEF1CEXP)"!=""
55cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF1CEXP)
56cdf0e10cSrcweir.ENDIF
57cdf0e10cSrcweir
58cdf0e10cSrcweir.IF "$(link_always)"==""
59cdf0e10cSrcweir$(DEF1TARGETN) : \
60cdf0e10cSrcweir		$(DEF1DEPN) \
61cdf0e10cSrcweir		$(DEF1EXPORTFILE)
62cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
63cdf0e10cSrcweir$(DEF1TARGETN) .PHONY :
64cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
65cdf0e10cSrcweir	@-$(RM) $@.tmpfile
66cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
67cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL1TARGETN:f)$(EMQ)" 								 >$@.tmpfile
68cdf0e10cSrcweir.IF "$(COM)"!="GCC"
69cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
70cdf0e10cSrcweir.ENDIF
71cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
72cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
73cdf0e10cSrcweir#	getversioninfo fuer alle!!
74cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
75cdf0e10cSrcweir.ENDIF
76cdf0e10cSrcweir.IF "$(DEFLIB1NAME)"!=""
77cdf0e10cSrcweir.IF "$(COM)"=="GCC"
78cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL1TARGET).exp
79cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL1TARGET).exp --export-all-symbols \
80cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB1NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
81cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL1TARGET).exp | sed '/^;/d' >>$@.tmpfile
82cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL1TARGET).exp
83cdf0e10cSrcweir.ELSE
84cdf0e10cSrcweir.IF "$(SHL1USE_EXPORTS)"==""
85cdf0e10cSrcweir	@-$(RMHACK1) $(MISC)/$(SHL1TARGET).exp
86cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL1TARGET).exp $(SLB)/$(DEFLIB1NAME).lib
87cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL1TARGET).flt $(MISC)/$(SHL1TARGET).exp			   >>$@.tmpfile
88cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK1) $(MISC)/$(SHL1TARGET).exp
89cdf0e10cSrcweir.ELSE			# "$(SHL1USE_EXPORTS)"==""
90cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB1NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL1TARGET).direct
91cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF1FILTER) $(MISC)/$(SHL1TARGET).direct >>$@.tmpfile
92cdf0e10cSrcweir.ENDIF			# "$(SHL1USE_EXPORTS)"==""
93cdf0e10cSrcweir.ENDIF
94cdf0e10cSrcweir.ENDIF				# "$(DEFLIB1NAME)"!=""
95cdf0e10cSrcweir.IF "$(DEF1EXPORT1)"!=""
96cdf0e10cSrcweir	@echo $(DEF1EXPORT1)										>>$@.tmpfile
97cdf0e10cSrcweir.ENDIF
98cdf0e10cSrcweir.IF "$(DEF1EXPORT2)"!=""
99cdf0e10cSrcweir	@echo $(DEF1EXPORT2)										>>$@.tmpfile
100cdf0e10cSrcweir.ENDIF
101cdf0e10cSrcweir.IF "$(DEF1EXPORT3)"!=""
102cdf0e10cSrcweir	@echo $(DEF1EXPORT3)										>>$@.tmpfile
103cdf0e10cSrcweir.ENDIF
104cdf0e10cSrcweir.IF "$(DEF1EXPORT4)"!=""
105cdf0e10cSrcweir	@echo $(DEF1EXPORT4)										>>$@.tmpfile
106cdf0e10cSrcweir.ENDIF
107cdf0e10cSrcweir.IF "$(DEF1EXPORT5)"!=""
108cdf0e10cSrcweir	@echo $(DEF1EXPORT5)										>>$@.tmpfile
109cdf0e10cSrcweir.ENDIF
110cdf0e10cSrcweir.IF "$(DEF1EXPORT6)"!=""
111cdf0e10cSrcweir	@echo $(DEF1EXPORT6)										>>$@.tmpfile
112cdf0e10cSrcweir.ENDIF
113cdf0e10cSrcweir.IF "$(DEF1EXPORT7)"!=""
114cdf0e10cSrcweir	@echo $(DEF1EXPORT7)										>>$@.tmpfile
115cdf0e10cSrcweir.ENDIF
116cdf0e10cSrcweir.IF "$(DEF1EXPORT8)"!=""
117cdf0e10cSrcweir	@echo $(DEF1EXPORT8)										>>$@.tmpfile
118cdf0e10cSrcweir.ENDIF
119cdf0e10cSrcweir.IF "$(DEF1EXPORT9)"!=""
120cdf0e10cSrcweir	@echo $(DEF1EXPORT9)										>>$@.tmpfile
121cdf0e10cSrcweir.ENDIF
122cdf0e10cSrcweir.IF "$(DEF1EXPORT10)"!=""
123cdf0e10cSrcweir	@echo $(DEF1EXPORT10)										>>$@.tmpfile
124cdf0e10cSrcweir.ENDIF
125cdf0e10cSrcweir.IF "$(DEF1EXPORT11)"!=""
126cdf0e10cSrcweir	@echo $(DEF1EXPORT11)										>>$@.tmpfile
127cdf0e10cSrcweir.ENDIF
128cdf0e10cSrcweir.IF "$(DEF1EXPORT12)"!=""
129cdf0e10cSrcweir	@echo $(DEF1EXPORT12)										>>$@.tmpfile
130cdf0e10cSrcweir.ENDIF
131cdf0e10cSrcweir.IF "$(DEF1EXPORT13)"!=""
132cdf0e10cSrcweir	@echo $(DEF1EXPORT13)										>>$@.tmpfile
133cdf0e10cSrcweir.ENDIF
134cdf0e10cSrcweir.IF "$(DEF1EXPORT14)"!=""
135cdf0e10cSrcweir	@echo $(DEF1EXPORT14)										>>$@.tmpfile
136cdf0e10cSrcweir.ENDIF
137cdf0e10cSrcweir.IF "$(DEF1EXPORT15)"!=""
138cdf0e10cSrcweir	@echo $(DEF1EXPORT15)										>>$@.tmpfile
139cdf0e10cSrcweir.ENDIF
140cdf0e10cSrcweir.IF "$(DEF1EXPORT16)"!=""
141cdf0e10cSrcweir	@echo $(DEF1EXPORT16)										>>$@.tmpfile
142cdf0e10cSrcweir.ENDIF
143cdf0e10cSrcweir.IF "$(DEF1EXPORT17)"!=""
144cdf0e10cSrcweir	@echo $(DEF1EXPORT17)										>>$@.tmpfile
145cdf0e10cSrcweir.ENDIF
146cdf0e10cSrcweir.IF "$(DEF1EXPORT18)"!=""
147cdf0e10cSrcweir	@echo $(DEF1EXPORT18)										>>$@.tmpfile
148cdf0e10cSrcweir.ENDIF
149cdf0e10cSrcweir.IF "$(DEF1EXPORT19)"!=""
150cdf0e10cSrcweir	@echo $(DEF1EXPORT19)										>>$@.tmpfile
151cdf0e10cSrcweir.ENDIF
152cdf0e10cSrcweir.IF "$(DEF1EXPORT20)"!=""
153cdf0e10cSrcweir	@echo $(DEF1EXPORT20)										>>$@.tmpfile
154cdf0e10cSrcweir.ENDIF
155cdf0e10cSrcweir.IF "$(DEF1EXPORTFILE)"!=""
156cdf0e10cSrcweir.IF "$(COM)"=="GCC"
157cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF1EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
158cdf0e10cSrcweir.ELSE
159cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF1EXPORTFILE) >> $@.tmpfile
160cdf0e10cSrcweir.ENDIF
161cdf0e10cSrcweir.ENDIF
162cdf0e10cSrcweir	@-$(RM) $@
163cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
164cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
165cdf0e10cSrcweir
166cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
167cdf0e10cSrcweir
168cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
169cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
170*534c536dSYuri DarioSHL1TARGET8=$(shell @fix_shl.cmd $(SHL1TARGETN:f))
171cdf0e10cSrcweir
172cdf0e10cSrcweirDEF1FILTER=$(SOLARENV)/inc/dummy.flt
173cdf0e10cSrcweirDEF1NAMELIST=$(foreach,i,$(DEFLIB1NAME) $(SLB)/$(i).lib)
174cdf0e10cSrcweir
175cdf0e10cSrcweir.IF "$(link_always)"==""
176cdf0e10cSrcweir$(DEF1TARGETN) : \
177cdf0e10cSrcweir		$(DEF1DEPN) \
178cdf0e10cSrcweir		$(DEF1EXPORTFILE)
179cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
180cdf0e10cSrcweir$(DEF1TARGETN) .PHONY :
181cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
182cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
183cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
184cdf0e10cSrcweir	@echo LIBRARY	  $(SHL1TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
185cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
186cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
187cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
188cdf0e10cSrcweir#	getversioninfo fuer alle!!
189cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
190cdf0e10cSrcweir.ENDIF
191cdf0e10cSrcweir
192cdf0e10cSrcweir.IF "$(DEFLIB1NAME)"!=""
193cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB1NAME).lib
194cdf0e10cSrcweir	@+emxexpr $(DEF1NAMELIST) | fix_exp_file >> $@.tmp_ord
195cdf0e10cSrcweir.ENDIF				# "$(DEFLIB1NAME)"!=""
196cdf0e10cSrcweir
197cdf0e10cSrcweir.IF "$(DEF1EXPORT1)"!=""
198cdf0e10cSrcweir	@echo $(DEF1EXPORT1)										>>$@.tmpfile
199cdf0e10cSrcweir.ENDIF
200cdf0e10cSrcweir.IF "$(DEF1EXPORT2)"!=""
201cdf0e10cSrcweir	@echo $(DEF1EXPORT2)										>>$@.tmpfile
202cdf0e10cSrcweir.ENDIF
203cdf0e10cSrcweir.IF "$(DEF1EXPORT3)"!=""
204cdf0e10cSrcweir	@echo $(DEF1EXPORT3)										>>$@.tmpfile
205cdf0e10cSrcweir.ENDIF
206cdf0e10cSrcweir.IF "$(DEF1EXPORT4)"!=""
207cdf0e10cSrcweir	@echo $(DEF1EXPORT4)										>>$@.tmpfile
208cdf0e10cSrcweir.ENDIF
209cdf0e10cSrcweir.IF "$(DEF1EXPORT5)"!=""
210cdf0e10cSrcweir	@echo $(DEF1EXPORT5)										>>$@.tmpfile
211cdf0e10cSrcweir.ENDIF
212cdf0e10cSrcweir.IF "$(DEF1EXPORT6)"!=""
213cdf0e10cSrcweir	@echo $(DEF1EXPORT6)										>>$@.tmpfile
214cdf0e10cSrcweir.ENDIF
215cdf0e10cSrcweir.IF "$(DEF1EXPORT7)"!=""
216cdf0e10cSrcweir	@echo $(DEF1EXPORT7)										>>$@.tmpfile
217cdf0e10cSrcweir.ENDIF
218cdf0e10cSrcweir.IF "$(DEF1EXPORT8)"!=""
219cdf0e10cSrcweir	@echo $(DEF1EXPORT8)										>>$@.tmpfile
220cdf0e10cSrcweir.ENDIF
221cdf0e10cSrcweir.IF "$(DEF1EXPORT9)"!=""
222cdf0e10cSrcweir	@echo $(DEF1EXPORT9)										>>$@.tmpfile
223cdf0e10cSrcweir.ENDIF
224cdf0e10cSrcweir.IF "$(DEF1EXPORT10)"!=""
225cdf0e10cSrcweir	@echo $(DEF1EXPORT10)										>>$@.tmpfile
226cdf0e10cSrcweir.ENDIF
227cdf0e10cSrcweir.IF "$(DEF1EXPORT11)"!=""
228cdf0e10cSrcweir	@echo $(DEF1EXPORT11)										>>$@.tmpfile
229cdf0e10cSrcweir.ENDIF
230cdf0e10cSrcweir.IF "$(DEF1EXPORT12)"!=""
231cdf0e10cSrcweir	@echo $(DEF1EXPORT12)										>>$@.tmpfile
232cdf0e10cSrcweir.ENDIF
233cdf0e10cSrcweir.IF "$(DEF1EXPORT13)"!=""
234cdf0e10cSrcweir	@echo $(DEF1EXPORT13)										>>$@.tmpfile
235cdf0e10cSrcweir.ENDIF
236cdf0e10cSrcweir.IF "$(DEF1EXPORT14)"!=""
237cdf0e10cSrcweir	@echo $(DEF1EXPORT14)										>>$@.tmpfile
238cdf0e10cSrcweir.ENDIF
239cdf0e10cSrcweir.IF "$(DEF1EXPORT15)"!=""
240cdf0e10cSrcweir	@echo $(DEF1EXPORT15)										>>$@.tmpfile
241cdf0e10cSrcweir.ENDIF
242cdf0e10cSrcweir.IF "$(DEF1EXPORT16)"!=""
243cdf0e10cSrcweir	@echo $(DEF1EXPORT16)										>>$@.tmpfile
244cdf0e10cSrcweir.ENDIF
245cdf0e10cSrcweir.IF "$(DEF1EXPORT17)"!=""
246cdf0e10cSrcweir	@echo $(DEF1EXPORT17)										>>$@.tmpfile
247cdf0e10cSrcweir.ENDIF
248cdf0e10cSrcweir.IF "$(DEF1EXPORT18)"!=""
249cdf0e10cSrcweir	@echo $(DEF1EXPORT18)										>>$@.tmpfile
250cdf0e10cSrcweir.ENDIF
251cdf0e10cSrcweir.IF "$(DEF1EXPORT19)"!=""
252cdf0e10cSrcweir	@echo $(DEF1EXPORT19)										>>$@.tmpfile
253cdf0e10cSrcweir.ENDIF
254cdf0e10cSrcweir.IF "$(DEF1EXPORT20)"!=""
255cdf0e10cSrcweir	@echo $(DEF1EXPORT20)										>>$@.tmpfile
256cdf0e10cSrcweir.ENDIF
257cdf0e10cSrcweir.IF "$(DEF1EXPORTFILE)"!=""
258cdf0e10cSrcweir	@fix_def_file < $(DEF1EXPORTFILE) >> $@.tmp_ord
259cdf0e10cSrcweir.ENDIF
260cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
261cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
262cdf0e10cSrcweir	@+-$(RM) $@
263cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
264cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
265cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
266cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL1IMPLIBN:s/.lib/.a/) $@
267cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL1IMPLIBN) $(SHL1IMPLIBN:s/.lib/.a/)
268cdf0e10cSrcweir
269cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
270cdf0e10cSrcweir
271cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
272cdf0e10cSrcweir$(DEF1TARGETN): \
273cdf0e10cSrcweir		$(DEF1DEPN) \
274cdf0e10cSrcweir		$(DEF1EXPORTFILE)
275cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
276cdf0e10cSrcweir.ENDIF
277cdf0e10cSrcweir.ENDIF			# "$(DEF1TARGETN)"!=""
278cdf0e10cSrcweir
279cdf0e10cSrcweir
280cdf0e10cSrcweir# Anweisungen fuer das Linken
281cdf0e10cSrcweir# unroll begin
282cdf0e10cSrcweir
283cdf0e10cSrcweir.IF "$(DEF2TARGETN)"!=""
284cdf0e10cSrcweir
285cdf0e10cSrcweir#to make intuitiv naming work
286cdf0e10cSrcweir.IF "$(DEF2LIBNAME)"!=""
287cdf0e10cSrcweirDEFLIB2NAME*=$(DEF2LIBNAME)
288cdf0e10cSrcweir.ENDIF			# "$(DEF2LIBNAME)"!=""
289cdf0e10cSrcweir
290cdf0e10cSrcweir.IF "$(DEFLIB2NAME)"!=""
291cdf0e10cSrcweirDEF2DEPN+=$(foreach,i,$(DEFLIB2NAME) $(SLB)/$(i).lib)
292cdf0e10cSrcweir.ENDIF
293cdf0e10cSrcweir
294cdf0e10cSrcweir.IF "$(SHL2VERSIONMAP)"!=""
295cdf0e10cSrcweir.IF "$(DEF2EXPORTFILE)"==""
296cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
297cdf0e10cSrcweirDEF2EXPORTFILE=$(MISC)/$(SHL2VERSIONMAP:b)_$(SHL2TARGET).dxp
298cdf0e10cSrcweir.IF "$(COM)"=="GCC"
299cdf0e10cSrcweir$(DEF2EXPORTFILE) : $(SHL2OBJS) $(SHL2LIBS)
300cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
301cdf0e10cSrcweir
302cdf0e10cSrcweir$(DEF2EXPORTFILE) : $(SHL2VERSIONMAP)
303cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
304cdf0e10cSrcweir.IF "$(COM)"=="GCC"
305cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
306cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
307cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
308cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
309cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL2OBJS) \
310cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL2LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
311cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
312cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
313cdf0e10cSrcweir# exported symbols list
314cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
315cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
316cdf0e10cSrcweir
317cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
318cdf0e10cSrcweir
319cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
320cdf0e10cSrcweirDEF2EXPORTFILE=$(MISC)/$(SHL2VERSIONMAP:b)_$(SHL2TARGET).dxp
321cdf0e10cSrcweir$(DEF2EXPORTFILE) : $(SHL2VERSIONMAP)
322cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
323cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
324cdf0e10cSrcweir
325cdf0e10cSrcweir.ENDIF			# "$(DEF2EXPORTFILE)"==""
326cdf0e10cSrcweir.ENDIF			# "$(SHL2VERSIONMAP)"!=""
327cdf0e10cSrcweir
328cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
329cdf0e10cSrcweir
330cdf0e10cSrcweirDEF2FILTER=$(SOLARENV)/inc/dummy.flt
331cdf0e10cSrcweir
332cdf0e10cSrcweirRMHACK2:=$(RM)
333cdf0e10cSrcweir
334cdf0e10cSrcweir.IF "$(DEF2CEXP)"!=""
335cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF2CEXP)
336cdf0e10cSrcweir.ENDIF
337cdf0e10cSrcweir
338cdf0e10cSrcweir.IF "$(link_always)"==""
339cdf0e10cSrcweir$(DEF2TARGETN) : \
340cdf0e10cSrcweir		$(DEF2DEPN) \
341cdf0e10cSrcweir		$(DEF2EXPORTFILE)
342cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
343cdf0e10cSrcweir$(DEF2TARGETN) .PHONY :
344cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
345cdf0e10cSrcweir	@-$(RM) $@.tmpfile
346cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
347cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL2TARGETN:f)$(EMQ)" 								 >$@.tmpfile
348cdf0e10cSrcweir.IF "$(COM)"!="GCC"
349cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
350cdf0e10cSrcweir.ENDIF
351cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
352cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
353cdf0e10cSrcweir#	getversioninfo fuer alle!!
354cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
355cdf0e10cSrcweir.ENDIF
356cdf0e10cSrcweir.IF "$(DEFLIB2NAME)"!=""
357cdf0e10cSrcweir.IF "$(COM)"=="GCC"
358cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL2TARGET).exp
359cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL2TARGET).exp --export-all-symbols \
360cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB2NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
361cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL2TARGET).exp | sed '/^;/d' >>$@.tmpfile
362cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL2TARGET).exp
363cdf0e10cSrcweir.ELSE
364cdf0e10cSrcweir.IF "$(SHL2USE_EXPORTS)"==""
365cdf0e10cSrcweir	@-$(RMHACK2) $(MISC)/$(SHL2TARGET).exp
366cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL2TARGET).exp $(SLB)/$(DEFLIB2NAME).lib
367cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL2TARGET).flt $(MISC)/$(SHL2TARGET).exp			   >>$@.tmpfile
368cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK2) $(MISC)/$(SHL2TARGET).exp
369cdf0e10cSrcweir.ELSE			# "$(SHL2USE_EXPORTS)"==""
370cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB2NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL2TARGET).direct
371cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF2FILTER) $(MISC)/$(SHL2TARGET).direct >>$@.tmpfile
372cdf0e10cSrcweir.ENDIF			# "$(SHL2USE_EXPORTS)"==""
373cdf0e10cSrcweir.ENDIF
374cdf0e10cSrcweir.ENDIF				# "$(DEFLIB2NAME)"!=""
375cdf0e10cSrcweir.IF "$(DEF2EXPORT1)"!=""
376cdf0e10cSrcweir	@echo $(DEF2EXPORT1)										>>$@.tmpfile
377cdf0e10cSrcweir.ENDIF
378cdf0e10cSrcweir.IF "$(DEF2EXPORT2)"!=""
379cdf0e10cSrcweir	@echo $(DEF2EXPORT2)										>>$@.tmpfile
380cdf0e10cSrcweir.ENDIF
381cdf0e10cSrcweir.IF "$(DEF2EXPORT3)"!=""
382cdf0e10cSrcweir	@echo $(DEF2EXPORT3)										>>$@.tmpfile
383cdf0e10cSrcweir.ENDIF
384cdf0e10cSrcweir.IF "$(DEF2EXPORT4)"!=""
385cdf0e10cSrcweir	@echo $(DEF2EXPORT4)										>>$@.tmpfile
386cdf0e10cSrcweir.ENDIF
387cdf0e10cSrcweir.IF "$(DEF2EXPORT5)"!=""
388cdf0e10cSrcweir	@echo $(DEF2EXPORT5)										>>$@.tmpfile
389cdf0e10cSrcweir.ENDIF
390cdf0e10cSrcweir.IF "$(DEF2EXPORT6)"!=""
391cdf0e10cSrcweir	@echo $(DEF2EXPORT6)										>>$@.tmpfile
392cdf0e10cSrcweir.ENDIF
393cdf0e10cSrcweir.IF "$(DEF2EXPORT7)"!=""
394cdf0e10cSrcweir	@echo $(DEF2EXPORT7)										>>$@.tmpfile
395cdf0e10cSrcweir.ENDIF
396cdf0e10cSrcweir.IF "$(DEF2EXPORT8)"!=""
397cdf0e10cSrcweir	@echo $(DEF2EXPORT8)										>>$@.tmpfile
398cdf0e10cSrcweir.ENDIF
399cdf0e10cSrcweir.IF "$(DEF2EXPORT9)"!=""
400cdf0e10cSrcweir	@echo $(DEF2EXPORT9)										>>$@.tmpfile
401cdf0e10cSrcweir.ENDIF
402cdf0e10cSrcweir.IF "$(DEF2EXPORT10)"!=""
403cdf0e10cSrcweir	@echo $(DEF2EXPORT10)										>>$@.tmpfile
404cdf0e10cSrcweir.ENDIF
405cdf0e10cSrcweir.IF "$(DEF2EXPORT11)"!=""
406cdf0e10cSrcweir	@echo $(DEF2EXPORT11)										>>$@.tmpfile
407cdf0e10cSrcweir.ENDIF
408cdf0e10cSrcweir.IF "$(DEF2EXPORT12)"!=""
409cdf0e10cSrcweir	@echo $(DEF2EXPORT12)										>>$@.tmpfile
410cdf0e10cSrcweir.ENDIF
411cdf0e10cSrcweir.IF "$(DEF2EXPORT13)"!=""
412cdf0e10cSrcweir	@echo $(DEF2EXPORT13)										>>$@.tmpfile
413cdf0e10cSrcweir.ENDIF
414cdf0e10cSrcweir.IF "$(DEF2EXPORT14)"!=""
415cdf0e10cSrcweir	@echo $(DEF2EXPORT14)										>>$@.tmpfile
416cdf0e10cSrcweir.ENDIF
417cdf0e10cSrcweir.IF "$(DEF2EXPORT15)"!=""
418cdf0e10cSrcweir	@echo $(DEF2EXPORT15)										>>$@.tmpfile
419cdf0e10cSrcweir.ENDIF
420cdf0e10cSrcweir.IF "$(DEF2EXPORT16)"!=""
421cdf0e10cSrcweir	@echo $(DEF2EXPORT16)										>>$@.tmpfile
422cdf0e10cSrcweir.ENDIF
423cdf0e10cSrcweir.IF "$(DEF2EXPORT17)"!=""
424cdf0e10cSrcweir	@echo $(DEF2EXPORT17)										>>$@.tmpfile
425cdf0e10cSrcweir.ENDIF
426cdf0e10cSrcweir.IF "$(DEF2EXPORT18)"!=""
427cdf0e10cSrcweir	@echo $(DEF2EXPORT18)										>>$@.tmpfile
428cdf0e10cSrcweir.ENDIF
429cdf0e10cSrcweir.IF "$(DEF2EXPORT19)"!=""
430cdf0e10cSrcweir	@echo $(DEF2EXPORT19)										>>$@.tmpfile
431cdf0e10cSrcweir.ENDIF
432cdf0e10cSrcweir.IF "$(DEF2EXPORT20)"!=""
433cdf0e10cSrcweir	@echo $(DEF2EXPORT20)										>>$@.tmpfile
434cdf0e10cSrcweir.ENDIF
435cdf0e10cSrcweir.IF "$(DEF2EXPORTFILE)"!=""
436cdf0e10cSrcweir.IF "$(COM)"=="GCC"
437cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF2EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
438cdf0e10cSrcweir.ELSE
439cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF2EXPORTFILE) >> $@.tmpfile
440cdf0e10cSrcweir.ENDIF
441cdf0e10cSrcweir.ENDIF
442cdf0e10cSrcweir	@-$(RM) $@
443cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
444cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
445cdf0e10cSrcweir
446cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
447cdf0e10cSrcweir
448cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
449cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
450*534c536dSYuri DarioSHL2TARGET8=$(shell @fix_shl.cmd $(SHL2TARGETN:f))
451cdf0e10cSrcweir
452cdf0e10cSrcweirDEF2FILTER=$(SOLARENV)/inc/dummy.flt
453cdf0e10cSrcweirDEF2NAMELIST=$(foreach,i,$(DEFLIB2NAME) $(SLB)/$(i).lib)
454cdf0e10cSrcweir
455cdf0e10cSrcweir.IF "$(link_always)"==""
456cdf0e10cSrcweir$(DEF2TARGETN) : \
457cdf0e10cSrcweir		$(DEF2DEPN) \
458cdf0e10cSrcweir		$(DEF2EXPORTFILE)
459cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
460cdf0e10cSrcweir$(DEF2TARGETN) .PHONY :
461cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
462cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
463cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
464cdf0e10cSrcweir	@echo LIBRARY	  $(SHL2TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
465cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
466cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
467cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
468cdf0e10cSrcweir#	getversioninfo fuer alle!!
469cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
470cdf0e10cSrcweir.ENDIF
471cdf0e10cSrcweir
472cdf0e10cSrcweir.IF "$(DEFLIB2NAME)"!=""
473cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB2NAME).lib
474cdf0e10cSrcweir	@+emxexpr $(DEF2NAMELIST) | fix_exp_file >> $@.tmp_ord
475cdf0e10cSrcweir.ENDIF				# "$(DEFLIB2NAME)"!=""
476cdf0e10cSrcweir
477cdf0e10cSrcweir.IF "$(DEF2EXPORT1)"!=""
478cdf0e10cSrcweir	@echo $(DEF2EXPORT1)										>>$@.tmpfile
479cdf0e10cSrcweir.ENDIF
480cdf0e10cSrcweir.IF "$(DEF2EXPORT2)"!=""
481cdf0e10cSrcweir	@echo $(DEF2EXPORT2)										>>$@.tmpfile
482cdf0e10cSrcweir.ENDIF
483cdf0e10cSrcweir.IF "$(DEF2EXPORT3)"!=""
484cdf0e10cSrcweir	@echo $(DEF2EXPORT3)										>>$@.tmpfile
485cdf0e10cSrcweir.ENDIF
486cdf0e10cSrcweir.IF "$(DEF2EXPORT4)"!=""
487cdf0e10cSrcweir	@echo $(DEF2EXPORT4)										>>$@.tmpfile
488cdf0e10cSrcweir.ENDIF
489cdf0e10cSrcweir.IF "$(DEF2EXPORT5)"!=""
490cdf0e10cSrcweir	@echo $(DEF2EXPORT5)										>>$@.tmpfile
491cdf0e10cSrcweir.ENDIF
492cdf0e10cSrcweir.IF "$(DEF2EXPORT6)"!=""
493cdf0e10cSrcweir	@echo $(DEF2EXPORT6)										>>$@.tmpfile
494cdf0e10cSrcweir.ENDIF
495cdf0e10cSrcweir.IF "$(DEF2EXPORT7)"!=""
496cdf0e10cSrcweir	@echo $(DEF2EXPORT7)										>>$@.tmpfile
497cdf0e10cSrcweir.ENDIF
498cdf0e10cSrcweir.IF "$(DEF2EXPORT8)"!=""
499cdf0e10cSrcweir	@echo $(DEF2EXPORT8)										>>$@.tmpfile
500cdf0e10cSrcweir.ENDIF
501cdf0e10cSrcweir.IF "$(DEF2EXPORT9)"!=""
502cdf0e10cSrcweir	@echo $(DEF2EXPORT9)										>>$@.tmpfile
503cdf0e10cSrcweir.ENDIF
504cdf0e10cSrcweir.IF "$(DEF2EXPORT10)"!=""
505cdf0e10cSrcweir	@echo $(DEF2EXPORT10)										>>$@.tmpfile
506cdf0e10cSrcweir.ENDIF
507cdf0e10cSrcweir.IF "$(DEF2EXPORT11)"!=""
508cdf0e10cSrcweir	@echo $(DEF2EXPORT11)										>>$@.tmpfile
509cdf0e10cSrcweir.ENDIF
510cdf0e10cSrcweir.IF "$(DEF2EXPORT12)"!=""
511cdf0e10cSrcweir	@echo $(DEF2EXPORT12)										>>$@.tmpfile
512cdf0e10cSrcweir.ENDIF
513cdf0e10cSrcweir.IF "$(DEF2EXPORT13)"!=""
514cdf0e10cSrcweir	@echo $(DEF2EXPORT13)										>>$@.tmpfile
515cdf0e10cSrcweir.ENDIF
516cdf0e10cSrcweir.IF "$(DEF2EXPORT14)"!=""
517cdf0e10cSrcweir	@echo $(DEF2EXPORT14)										>>$@.tmpfile
518cdf0e10cSrcweir.ENDIF
519cdf0e10cSrcweir.IF "$(DEF2EXPORT15)"!=""
520cdf0e10cSrcweir	@echo $(DEF2EXPORT15)										>>$@.tmpfile
521cdf0e10cSrcweir.ENDIF
522cdf0e10cSrcweir.IF "$(DEF2EXPORT16)"!=""
523cdf0e10cSrcweir	@echo $(DEF2EXPORT16)										>>$@.tmpfile
524cdf0e10cSrcweir.ENDIF
525cdf0e10cSrcweir.IF "$(DEF2EXPORT17)"!=""
526cdf0e10cSrcweir	@echo $(DEF2EXPORT17)										>>$@.tmpfile
527cdf0e10cSrcweir.ENDIF
528cdf0e10cSrcweir.IF "$(DEF2EXPORT18)"!=""
529cdf0e10cSrcweir	@echo $(DEF2EXPORT18)										>>$@.tmpfile
530cdf0e10cSrcweir.ENDIF
531cdf0e10cSrcweir.IF "$(DEF2EXPORT19)"!=""
532cdf0e10cSrcweir	@echo $(DEF2EXPORT19)										>>$@.tmpfile
533cdf0e10cSrcweir.ENDIF
534cdf0e10cSrcweir.IF "$(DEF2EXPORT20)"!=""
535cdf0e10cSrcweir	@echo $(DEF2EXPORT20)										>>$@.tmpfile
536cdf0e10cSrcweir.ENDIF
537cdf0e10cSrcweir.IF "$(DEF2EXPORTFILE)"!=""
538cdf0e10cSrcweir	@fix_def_file < $(DEF2EXPORTFILE) >> $@.tmp_ord
539cdf0e10cSrcweir.ENDIF
540cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
541cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
542cdf0e10cSrcweir	@+-$(RM) $@
543cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
544cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
545cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
546cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL2IMPLIBN:s/.lib/.a/) $@
547cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL2IMPLIBN) $(SHL2IMPLIBN:s/.lib/.a/)
548cdf0e10cSrcweir
549cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
550cdf0e10cSrcweir
551cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
552cdf0e10cSrcweir$(DEF2TARGETN): \
553cdf0e10cSrcweir		$(DEF2DEPN) \
554cdf0e10cSrcweir		$(DEF2EXPORTFILE)
555cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
556cdf0e10cSrcweir.ENDIF
557cdf0e10cSrcweir.ENDIF			# "$(DEF2TARGETN)"!=""
558cdf0e10cSrcweir
559cdf0e10cSrcweir
560cdf0e10cSrcweir# Anweisungen fuer das Linken
561cdf0e10cSrcweir# unroll begin
562cdf0e10cSrcweir
563cdf0e10cSrcweir.IF "$(DEF3TARGETN)"!=""
564cdf0e10cSrcweir
565cdf0e10cSrcweir#to make intuitiv naming work
566cdf0e10cSrcweir.IF "$(DEF3LIBNAME)"!=""
567cdf0e10cSrcweirDEFLIB3NAME*=$(DEF3LIBNAME)
568cdf0e10cSrcweir.ENDIF			# "$(DEF3LIBNAME)"!=""
569cdf0e10cSrcweir
570cdf0e10cSrcweir.IF "$(DEFLIB3NAME)"!=""
571cdf0e10cSrcweirDEF3DEPN+=$(foreach,i,$(DEFLIB3NAME) $(SLB)/$(i).lib)
572cdf0e10cSrcweir.ENDIF
573cdf0e10cSrcweir
574cdf0e10cSrcweir.IF "$(SHL3VERSIONMAP)"!=""
575cdf0e10cSrcweir.IF "$(DEF3EXPORTFILE)"==""
576cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
577cdf0e10cSrcweirDEF3EXPORTFILE=$(MISC)/$(SHL3VERSIONMAP:b)_$(SHL3TARGET).dxp
578cdf0e10cSrcweir.IF "$(COM)"=="GCC"
579cdf0e10cSrcweir$(DEF3EXPORTFILE) : $(SHL3OBJS) $(SHL3LIBS)
580cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
581cdf0e10cSrcweir
582cdf0e10cSrcweir$(DEF3EXPORTFILE) : $(SHL3VERSIONMAP)
583cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
584cdf0e10cSrcweir.IF "$(COM)"=="GCC"
585cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
586cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
587cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
588cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
589cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL3OBJS) \
590cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL3LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
591cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
592cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
593cdf0e10cSrcweir# exported symbols list
594cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
595cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
596cdf0e10cSrcweir
597cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
598cdf0e10cSrcweir
599cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
600cdf0e10cSrcweirDEF3EXPORTFILE=$(MISC)/$(SHL3VERSIONMAP:b)_$(SHL3TARGET).dxp
601cdf0e10cSrcweir$(DEF3EXPORTFILE) : $(SHL3VERSIONMAP)
602cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
603cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
604cdf0e10cSrcweir
605cdf0e10cSrcweir.ENDIF			# "$(DEF3EXPORTFILE)"==""
606cdf0e10cSrcweir.ENDIF			# "$(SHL3VERSIONMAP)"!=""
607cdf0e10cSrcweir
608cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
609cdf0e10cSrcweir
610cdf0e10cSrcweirDEF3FILTER=$(SOLARENV)/inc/dummy.flt
611cdf0e10cSrcweir
612cdf0e10cSrcweirRMHACK3:=$(RM)
613cdf0e10cSrcweir
614cdf0e10cSrcweir.IF "$(DEF3CEXP)"!=""
615cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF3CEXP)
616cdf0e10cSrcweir.ENDIF
617cdf0e10cSrcweir
618cdf0e10cSrcweir.IF "$(link_always)"==""
619cdf0e10cSrcweir$(DEF3TARGETN) : \
620cdf0e10cSrcweir		$(DEF3DEPN) \
621cdf0e10cSrcweir		$(DEF3EXPORTFILE)
622cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
623cdf0e10cSrcweir$(DEF3TARGETN) .PHONY :
624cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
625cdf0e10cSrcweir	@-$(RM) $@.tmpfile
626cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
627cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL3TARGETN:f)$(EMQ)" 								 >$@.tmpfile
628cdf0e10cSrcweir.IF "$(COM)"!="GCC"
629cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
630cdf0e10cSrcweir.ENDIF
631cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
632cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
633cdf0e10cSrcweir#	getversioninfo fuer alle!!
634cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
635cdf0e10cSrcweir.ENDIF
636cdf0e10cSrcweir.IF "$(DEFLIB3NAME)"!=""
637cdf0e10cSrcweir.IF "$(COM)"=="GCC"
638cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL3TARGET).exp
639cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL3TARGET).exp --export-all-symbols \
640cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB3NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
641cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL3TARGET).exp | sed '/^;/d' >>$@.tmpfile
642cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL3TARGET).exp
643cdf0e10cSrcweir.ELSE
644cdf0e10cSrcweir.IF "$(SHL3USE_EXPORTS)"==""
645cdf0e10cSrcweir	@-$(RMHACK3) $(MISC)/$(SHL3TARGET).exp
646cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL3TARGET).exp $(SLB)/$(DEFLIB3NAME).lib
647cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL3TARGET).flt $(MISC)/$(SHL3TARGET).exp			   >>$@.tmpfile
648cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK3) $(MISC)/$(SHL3TARGET).exp
649cdf0e10cSrcweir.ELSE			# "$(SHL3USE_EXPORTS)"==""
650cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB3NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL3TARGET).direct
651cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF3FILTER) $(MISC)/$(SHL3TARGET).direct >>$@.tmpfile
652cdf0e10cSrcweir.ENDIF			# "$(SHL3USE_EXPORTS)"==""
653cdf0e10cSrcweir.ENDIF
654cdf0e10cSrcweir.ENDIF				# "$(DEFLIB3NAME)"!=""
655cdf0e10cSrcweir.IF "$(DEF3EXPORT1)"!=""
656cdf0e10cSrcweir	@echo $(DEF3EXPORT1)										>>$@.tmpfile
657cdf0e10cSrcweir.ENDIF
658cdf0e10cSrcweir.IF "$(DEF3EXPORT2)"!=""
659cdf0e10cSrcweir	@echo $(DEF3EXPORT2)										>>$@.tmpfile
660cdf0e10cSrcweir.ENDIF
661cdf0e10cSrcweir.IF "$(DEF3EXPORT3)"!=""
662cdf0e10cSrcweir	@echo $(DEF3EXPORT3)										>>$@.tmpfile
663cdf0e10cSrcweir.ENDIF
664cdf0e10cSrcweir.IF "$(DEF3EXPORT4)"!=""
665cdf0e10cSrcweir	@echo $(DEF3EXPORT4)										>>$@.tmpfile
666cdf0e10cSrcweir.ENDIF
667cdf0e10cSrcweir.IF "$(DEF3EXPORT5)"!=""
668cdf0e10cSrcweir	@echo $(DEF3EXPORT5)										>>$@.tmpfile
669cdf0e10cSrcweir.ENDIF
670cdf0e10cSrcweir.IF "$(DEF3EXPORT6)"!=""
671cdf0e10cSrcweir	@echo $(DEF3EXPORT6)										>>$@.tmpfile
672cdf0e10cSrcweir.ENDIF
673cdf0e10cSrcweir.IF "$(DEF3EXPORT7)"!=""
674cdf0e10cSrcweir	@echo $(DEF3EXPORT7)										>>$@.tmpfile
675cdf0e10cSrcweir.ENDIF
676cdf0e10cSrcweir.IF "$(DEF3EXPORT8)"!=""
677cdf0e10cSrcweir	@echo $(DEF3EXPORT8)										>>$@.tmpfile
678cdf0e10cSrcweir.ENDIF
679cdf0e10cSrcweir.IF "$(DEF3EXPORT9)"!=""
680cdf0e10cSrcweir	@echo $(DEF3EXPORT9)										>>$@.tmpfile
681cdf0e10cSrcweir.ENDIF
682cdf0e10cSrcweir.IF "$(DEF3EXPORT10)"!=""
683cdf0e10cSrcweir	@echo $(DEF3EXPORT10)										>>$@.tmpfile
684cdf0e10cSrcweir.ENDIF
685cdf0e10cSrcweir.IF "$(DEF3EXPORT11)"!=""
686cdf0e10cSrcweir	@echo $(DEF3EXPORT11)										>>$@.tmpfile
687cdf0e10cSrcweir.ENDIF
688cdf0e10cSrcweir.IF "$(DEF3EXPORT12)"!=""
689cdf0e10cSrcweir	@echo $(DEF3EXPORT12)										>>$@.tmpfile
690cdf0e10cSrcweir.ENDIF
691cdf0e10cSrcweir.IF "$(DEF3EXPORT13)"!=""
692cdf0e10cSrcweir	@echo $(DEF3EXPORT13)										>>$@.tmpfile
693cdf0e10cSrcweir.ENDIF
694cdf0e10cSrcweir.IF "$(DEF3EXPORT14)"!=""
695cdf0e10cSrcweir	@echo $(DEF3EXPORT14)										>>$@.tmpfile
696cdf0e10cSrcweir.ENDIF
697cdf0e10cSrcweir.IF "$(DEF3EXPORT15)"!=""
698cdf0e10cSrcweir	@echo $(DEF3EXPORT15)										>>$@.tmpfile
699cdf0e10cSrcweir.ENDIF
700cdf0e10cSrcweir.IF "$(DEF3EXPORT16)"!=""
701cdf0e10cSrcweir	@echo $(DEF3EXPORT16)										>>$@.tmpfile
702cdf0e10cSrcweir.ENDIF
703cdf0e10cSrcweir.IF "$(DEF3EXPORT17)"!=""
704cdf0e10cSrcweir	@echo $(DEF3EXPORT17)										>>$@.tmpfile
705cdf0e10cSrcweir.ENDIF
706cdf0e10cSrcweir.IF "$(DEF3EXPORT18)"!=""
707cdf0e10cSrcweir	@echo $(DEF3EXPORT18)										>>$@.tmpfile
708cdf0e10cSrcweir.ENDIF
709cdf0e10cSrcweir.IF "$(DEF3EXPORT19)"!=""
710cdf0e10cSrcweir	@echo $(DEF3EXPORT19)										>>$@.tmpfile
711cdf0e10cSrcweir.ENDIF
712cdf0e10cSrcweir.IF "$(DEF3EXPORT20)"!=""
713cdf0e10cSrcweir	@echo $(DEF3EXPORT20)										>>$@.tmpfile
714cdf0e10cSrcweir.ENDIF
715cdf0e10cSrcweir.IF "$(DEF3EXPORTFILE)"!=""
716cdf0e10cSrcweir.IF "$(COM)"=="GCC"
717cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF3EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
718cdf0e10cSrcweir.ELSE
719cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF3EXPORTFILE) >> $@.tmpfile
720cdf0e10cSrcweir.ENDIF
721cdf0e10cSrcweir.ENDIF
722cdf0e10cSrcweir	@-$(RM) $@
723cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
724cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
725cdf0e10cSrcweir
726cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
727cdf0e10cSrcweir
728cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
729cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
730*534c536dSYuri DarioSHL3TARGET8=$(shell @fix_shl.cmd $(SHL3TARGETN:f))
731cdf0e10cSrcweir
732cdf0e10cSrcweirDEF3FILTER=$(SOLARENV)/inc/dummy.flt
733cdf0e10cSrcweirDEF3NAMELIST=$(foreach,i,$(DEFLIB3NAME) $(SLB)/$(i).lib)
734cdf0e10cSrcweir
735cdf0e10cSrcweir.IF "$(link_always)"==""
736cdf0e10cSrcweir$(DEF3TARGETN) : \
737cdf0e10cSrcweir		$(DEF3DEPN) \
738cdf0e10cSrcweir		$(DEF3EXPORTFILE)
739cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
740cdf0e10cSrcweir$(DEF3TARGETN) .PHONY :
741cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
742cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
743cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
744cdf0e10cSrcweir	@echo LIBRARY	  $(SHL3TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
745cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
746cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
747cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
748cdf0e10cSrcweir#	getversioninfo fuer alle!!
749cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
750cdf0e10cSrcweir.ENDIF
751cdf0e10cSrcweir
752cdf0e10cSrcweir.IF "$(DEFLIB3NAME)"!=""
753cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB3NAME).lib
754cdf0e10cSrcweir	@+emxexpr $(DEF3NAMELIST) | fix_exp_file >> $@.tmp_ord
755cdf0e10cSrcweir.ENDIF				# "$(DEFLIB3NAME)"!=""
756cdf0e10cSrcweir
757cdf0e10cSrcweir.IF "$(DEF3EXPORT1)"!=""
758cdf0e10cSrcweir	@echo $(DEF3EXPORT1)										>>$@.tmpfile
759cdf0e10cSrcweir.ENDIF
760cdf0e10cSrcweir.IF "$(DEF3EXPORT2)"!=""
761cdf0e10cSrcweir	@echo $(DEF3EXPORT2)										>>$@.tmpfile
762cdf0e10cSrcweir.ENDIF
763cdf0e10cSrcweir.IF "$(DEF3EXPORT3)"!=""
764cdf0e10cSrcweir	@echo $(DEF3EXPORT3)										>>$@.tmpfile
765cdf0e10cSrcweir.ENDIF
766cdf0e10cSrcweir.IF "$(DEF3EXPORT4)"!=""
767cdf0e10cSrcweir	@echo $(DEF3EXPORT4)										>>$@.tmpfile
768cdf0e10cSrcweir.ENDIF
769cdf0e10cSrcweir.IF "$(DEF3EXPORT5)"!=""
770cdf0e10cSrcweir	@echo $(DEF3EXPORT5)										>>$@.tmpfile
771cdf0e10cSrcweir.ENDIF
772cdf0e10cSrcweir.IF "$(DEF3EXPORT6)"!=""
773cdf0e10cSrcweir	@echo $(DEF3EXPORT6)										>>$@.tmpfile
774cdf0e10cSrcweir.ENDIF
775cdf0e10cSrcweir.IF "$(DEF3EXPORT7)"!=""
776cdf0e10cSrcweir	@echo $(DEF3EXPORT7)										>>$@.tmpfile
777cdf0e10cSrcweir.ENDIF
778cdf0e10cSrcweir.IF "$(DEF3EXPORT8)"!=""
779cdf0e10cSrcweir	@echo $(DEF3EXPORT8)										>>$@.tmpfile
780cdf0e10cSrcweir.ENDIF
781cdf0e10cSrcweir.IF "$(DEF3EXPORT9)"!=""
782cdf0e10cSrcweir	@echo $(DEF3EXPORT9)										>>$@.tmpfile
783cdf0e10cSrcweir.ENDIF
784cdf0e10cSrcweir.IF "$(DEF3EXPORT10)"!=""
785cdf0e10cSrcweir	@echo $(DEF3EXPORT10)										>>$@.tmpfile
786cdf0e10cSrcweir.ENDIF
787cdf0e10cSrcweir.IF "$(DEF3EXPORT11)"!=""
788cdf0e10cSrcweir	@echo $(DEF3EXPORT11)										>>$@.tmpfile
789cdf0e10cSrcweir.ENDIF
790cdf0e10cSrcweir.IF "$(DEF3EXPORT12)"!=""
791cdf0e10cSrcweir	@echo $(DEF3EXPORT12)										>>$@.tmpfile
792cdf0e10cSrcweir.ENDIF
793cdf0e10cSrcweir.IF "$(DEF3EXPORT13)"!=""
794cdf0e10cSrcweir	@echo $(DEF3EXPORT13)										>>$@.tmpfile
795cdf0e10cSrcweir.ENDIF
796cdf0e10cSrcweir.IF "$(DEF3EXPORT14)"!=""
797cdf0e10cSrcweir	@echo $(DEF3EXPORT14)										>>$@.tmpfile
798cdf0e10cSrcweir.ENDIF
799cdf0e10cSrcweir.IF "$(DEF3EXPORT15)"!=""
800cdf0e10cSrcweir	@echo $(DEF3EXPORT15)										>>$@.tmpfile
801cdf0e10cSrcweir.ENDIF
802cdf0e10cSrcweir.IF "$(DEF3EXPORT16)"!=""
803cdf0e10cSrcweir	@echo $(DEF3EXPORT16)										>>$@.tmpfile
804cdf0e10cSrcweir.ENDIF
805cdf0e10cSrcweir.IF "$(DEF3EXPORT17)"!=""
806cdf0e10cSrcweir	@echo $(DEF3EXPORT17)										>>$@.tmpfile
807cdf0e10cSrcweir.ENDIF
808cdf0e10cSrcweir.IF "$(DEF3EXPORT18)"!=""
809cdf0e10cSrcweir	@echo $(DEF3EXPORT18)										>>$@.tmpfile
810cdf0e10cSrcweir.ENDIF
811cdf0e10cSrcweir.IF "$(DEF3EXPORT19)"!=""
812cdf0e10cSrcweir	@echo $(DEF3EXPORT19)										>>$@.tmpfile
813cdf0e10cSrcweir.ENDIF
814cdf0e10cSrcweir.IF "$(DEF3EXPORT20)"!=""
815cdf0e10cSrcweir	@echo $(DEF3EXPORT20)										>>$@.tmpfile
816cdf0e10cSrcweir.ENDIF
817cdf0e10cSrcweir.IF "$(DEF3EXPORTFILE)"!=""
818cdf0e10cSrcweir	@fix_def_file < $(DEF3EXPORTFILE) >> $@.tmp_ord
819cdf0e10cSrcweir.ENDIF
820cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
821cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
822cdf0e10cSrcweir	@+-$(RM) $@
823cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
824cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
825cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
826cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL3IMPLIBN:s/.lib/.a/) $@
827cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL3IMPLIBN) $(SHL3IMPLIBN:s/.lib/.a/)
828cdf0e10cSrcweir
829cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
830cdf0e10cSrcweir
831cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
832cdf0e10cSrcweir$(DEF3TARGETN): \
833cdf0e10cSrcweir		$(DEF3DEPN) \
834cdf0e10cSrcweir		$(DEF3EXPORTFILE)
835cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
836cdf0e10cSrcweir.ENDIF
837cdf0e10cSrcweir.ENDIF			# "$(DEF3TARGETN)"!=""
838cdf0e10cSrcweir
839cdf0e10cSrcweir
840cdf0e10cSrcweir# Anweisungen fuer das Linken
841cdf0e10cSrcweir# unroll begin
842cdf0e10cSrcweir
843cdf0e10cSrcweir.IF "$(DEF4TARGETN)"!=""
844cdf0e10cSrcweir
845cdf0e10cSrcweir#to make intuitiv naming work
846cdf0e10cSrcweir.IF "$(DEF4LIBNAME)"!=""
847cdf0e10cSrcweirDEFLIB4NAME*=$(DEF4LIBNAME)
848cdf0e10cSrcweir.ENDIF			# "$(DEF4LIBNAME)"!=""
849cdf0e10cSrcweir
850cdf0e10cSrcweir.IF "$(DEFLIB4NAME)"!=""
851cdf0e10cSrcweirDEF4DEPN+=$(foreach,i,$(DEFLIB4NAME) $(SLB)/$(i).lib)
852cdf0e10cSrcweir.ENDIF
853cdf0e10cSrcweir
854cdf0e10cSrcweir.IF "$(SHL4VERSIONMAP)"!=""
855cdf0e10cSrcweir.IF "$(DEF4EXPORTFILE)"==""
856cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
857cdf0e10cSrcweirDEF4EXPORTFILE=$(MISC)/$(SHL4VERSIONMAP:b)_$(SHL4TARGET).dxp
858cdf0e10cSrcweir.IF "$(COM)"=="GCC"
859cdf0e10cSrcweir$(DEF4EXPORTFILE) : $(SHL4OBJS) $(SHL4LIBS)
860cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
861cdf0e10cSrcweir
862cdf0e10cSrcweir$(DEF4EXPORTFILE) : $(SHL4VERSIONMAP)
863cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
864cdf0e10cSrcweir.IF "$(COM)"=="GCC"
865cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
866cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
867cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
868cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
869cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL4OBJS) \
870cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL4LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
871cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
872cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
873cdf0e10cSrcweir# exported symbols list
874cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
875cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
876cdf0e10cSrcweir
877cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
878cdf0e10cSrcweir
879cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
880cdf0e10cSrcweirDEF4EXPORTFILE=$(MISC)/$(SHL4VERSIONMAP:b)_$(SHL4TARGET).dxp
881cdf0e10cSrcweir$(DEF4EXPORTFILE) : $(SHL4VERSIONMAP)
882cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
883cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
884cdf0e10cSrcweir
885cdf0e10cSrcweir.ENDIF			# "$(DEF4EXPORTFILE)"==""
886cdf0e10cSrcweir.ENDIF			# "$(SHL4VERSIONMAP)"!=""
887cdf0e10cSrcweir
888cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
889cdf0e10cSrcweir
890cdf0e10cSrcweirDEF4FILTER=$(SOLARENV)/inc/dummy.flt
891cdf0e10cSrcweir
892cdf0e10cSrcweirRMHACK4:=$(RM)
893cdf0e10cSrcweir
894cdf0e10cSrcweir.IF "$(DEF4CEXP)"!=""
895cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF4CEXP)
896cdf0e10cSrcweir.ENDIF
897cdf0e10cSrcweir
898cdf0e10cSrcweir.IF "$(link_always)"==""
899cdf0e10cSrcweir$(DEF4TARGETN) : \
900cdf0e10cSrcweir		$(DEF4DEPN) \
901cdf0e10cSrcweir		$(DEF4EXPORTFILE)
902cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
903cdf0e10cSrcweir$(DEF4TARGETN) .PHONY :
904cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
905cdf0e10cSrcweir	@-$(RM) $@.tmpfile
906cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
907cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL4TARGETN:f)$(EMQ)" 								 >$@.tmpfile
908cdf0e10cSrcweir.IF "$(COM)"!="GCC"
909cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
910cdf0e10cSrcweir.ENDIF
911cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
912cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
913cdf0e10cSrcweir#	getversioninfo fuer alle!!
914cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
915cdf0e10cSrcweir.ENDIF
916cdf0e10cSrcweir.IF "$(DEFLIB4NAME)"!=""
917cdf0e10cSrcweir.IF "$(COM)"=="GCC"
918cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL4TARGET).exp
919cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL4TARGET).exp --export-all-symbols \
920cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB4NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
921cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL4TARGET).exp | sed '/^;/d' >>$@.tmpfile
922cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL4TARGET).exp
923cdf0e10cSrcweir.ELSE
924cdf0e10cSrcweir.IF "$(SHL4USE_EXPORTS)"==""
925cdf0e10cSrcweir	@-$(RMHACK4) $(MISC)/$(SHL4TARGET).exp
926cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL4TARGET).exp $(SLB)/$(DEFLIB4NAME).lib
927cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL4TARGET).flt $(MISC)/$(SHL4TARGET).exp			   >>$@.tmpfile
928cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK4) $(MISC)/$(SHL4TARGET).exp
929cdf0e10cSrcweir.ELSE			# "$(SHL4USE_EXPORTS)"==""
930cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB4NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL4TARGET).direct
931cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF4FILTER) $(MISC)/$(SHL4TARGET).direct >>$@.tmpfile
932cdf0e10cSrcweir.ENDIF			# "$(SHL4USE_EXPORTS)"==""
933cdf0e10cSrcweir.ENDIF
934cdf0e10cSrcweir.ENDIF				# "$(DEFLIB4NAME)"!=""
935cdf0e10cSrcweir.IF "$(DEF4EXPORT1)"!=""
936cdf0e10cSrcweir	@echo $(DEF4EXPORT1)										>>$@.tmpfile
937cdf0e10cSrcweir.ENDIF
938cdf0e10cSrcweir.IF "$(DEF4EXPORT2)"!=""
939cdf0e10cSrcweir	@echo $(DEF4EXPORT2)										>>$@.tmpfile
940cdf0e10cSrcweir.ENDIF
941cdf0e10cSrcweir.IF "$(DEF4EXPORT3)"!=""
942cdf0e10cSrcweir	@echo $(DEF4EXPORT3)										>>$@.tmpfile
943cdf0e10cSrcweir.ENDIF
944cdf0e10cSrcweir.IF "$(DEF4EXPORT4)"!=""
945cdf0e10cSrcweir	@echo $(DEF4EXPORT4)										>>$@.tmpfile
946cdf0e10cSrcweir.ENDIF
947cdf0e10cSrcweir.IF "$(DEF4EXPORT5)"!=""
948cdf0e10cSrcweir	@echo $(DEF4EXPORT5)										>>$@.tmpfile
949cdf0e10cSrcweir.ENDIF
950cdf0e10cSrcweir.IF "$(DEF4EXPORT6)"!=""
951cdf0e10cSrcweir	@echo $(DEF4EXPORT6)										>>$@.tmpfile
952cdf0e10cSrcweir.ENDIF
953cdf0e10cSrcweir.IF "$(DEF4EXPORT7)"!=""
954cdf0e10cSrcweir	@echo $(DEF4EXPORT7)										>>$@.tmpfile
955cdf0e10cSrcweir.ENDIF
956cdf0e10cSrcweir.IF "$(DEF4EXPORT8)"!=""
957cdf0e10cSrcweir	@echo $(DEF4EXPORT8)										>>$@.tmpfile
958cdf0e10cSrcweir.ENDIF
959cdf0e10cSrcweir.IF "$(DEF4EXPORT9)"!=""
960cdf0e10cSrcweir	@echo $(DEF4EXPORT9)										>>$@.tmpfile
961cdf0e10cSrcweir.ENDIF
962cdf0e10cSrcweir.IF "$(DEF4EXPORT10)"!=""
963cdf0e10cSrcweir	@echo $(DEF4EXPORT10)										>>$@.tmpfile
964cdf0e10cSrcweir.ENDIF
965cdf0e10cSrcweir.IF "$(DEF4EXPORT11)"!=""
966cdf0e10cSrcweir	@echo $(DEF4EXPORT11)										>>$@.tmpfile
967cdf0e10cSrcweir.ENDIF
968cdf0e10cSrcweir.IF "$(DEF4EXPORT12)"!=""
969cdf0e10cSrcweir	@echo $(DEF4EXPORT12)										>>$@.tmpfile
970cdf0e10cSrcweir.ENDIF
971cdf0e10cSrcweir.IF "$(DEF4EXPORT13)"!=""
972cdf0e10cSrcweir	@echo $(DEF4EXPORT13)										>>$@.tmpfile
973cdf0e10cSrcweir.ENDIF
974cdf0e10cSrcweir.IF "$(DEF4EXPORT14)"!=""
975cdf0e10cSrcweir	@echo $(DEF4EXPORT14)										>>$@.tmpfile
976cdf0e10cSrcweir.ENDIF
977cdf0e10cSrcweir.IF "$(DEF4EXPORT15)"!=""
978cdf0e10cSrcweir	@echo $(DEF4EXPORT15)										>>$@.tmpfile
979cdf0e10cSrcweir.ENDIF
980cdf0e10cSrcweir.IF "$(DEF4EXPORT16)"!=""
981cdf0e10cSrcweir	@echo $(DEF4EXPORT16)										>>$@.tmpfile
982cdf0e10cSrcweir.ENDIF
983cdf0e10cSrcweir.IF "$(DEF4EXPORT17)"!=""
984cdf0e10cSrcweir	@echo $(DEF4EXPORT17)										>>$@.tmpfile
985cdf0e10cSrcweir.ENDIF
986cdf0e10cSrcweir.IF "$(DEF4EXPORT18)"!=""
987cdf0e10cSrcweir	@echo $(DEF4EXPORT18)										>>$@.tmpfile
988cdf0e10cSrcweir.ENDIF
989cdf0e10cSrcweir.IF "$(DEF4EXPORT19)"!=""
990cdf0e10cSrcweir	@echo $(DEF4EXPORT19)										>>$@.tmpfile
991cdf0e10cSrcweir.ENDIF
992cdf0e10cSrcweir.IF "$(DEF4EXPORT20)"!=""
993cdf0e10cSrcweir	@echo $(DEF4EXPORT20)										>>$@.tmpfile
994cdf0e10cSrcweir.ENDIF
995cdf0e10cSrcweir.IF "$(DEF4EXPORTFILE)"!=""
996cdf0e10cSrcweir.IF "$(COM)"=="GCC"
997cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF4EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
998cdf0e10cSrcweir.ELSE
999cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF4EXPORTFILE) >> $@.tmpfile
1000cdf0e10cSrcweir.ENDIF
1001cdf0e10cSrcweir.ENDIF
1002cdf0e10cSrcweir	@-$(RM) $@
1003cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
1004cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
1005cdf0e10cSrcweir
1006cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
1007cdf0e10cSrcweir
1008cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
1009cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
1010*534c536dSYuri DarioSHL4TARGET8=$(shell @fix_shl.cmd $(SHL4TARGETN:f))
1011cdf0e10cSrcweir
1012cdf0e10cSrcweirDEF4FILTER=$(SOLARENV)/inc/dummy.flt
1013cdf0e10cSrcweirDEF4NAMELIST=$(foreach,i,$(DEFLIB4NAME) $(SLB)/$(i).lib)
1014cdf0e10cSrcweir
1015cdf0e10cSrcweir.IF "$(link_always)"==""
1016cdf0e10cSrcweir$(DEF4TARGETN) : \
1017cdf0e10cSrcweir		$(DEF4DEPN) \
1018cdf0e10cSrcweir		$(DEF4EXPORTFILE)
1019cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
1020cdf0e10cSrcweir$(DEF4TARGETN) .PHONY :
1021cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
1022cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
1023cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
1024cdf0e10cSrcweir	@echo LIBRARY	  $(SHL4TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
1025cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
1026cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
1027cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
1028cdf0e10cSrcweir#	getversioninfo fuer alle!!
1029cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
1030cdf0e10cSrcweir.ENDIF
1031cdf0e10cSrcweir
1032cdf0e10cSrcweir.IF "$(DEFLIB4NAME)"!=""
1033cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB4NAME).lib
1034cdf0e10cSrcweir	@+emxexpr $(DEF4NAMELIST) | fix_exp_file >> $@.tmp_ord
1035cdf0e10cSrcweir.ENDIF				# "$(DEFLIB4NAME)"!=""
1036cdf0e10cSrcweir
1037cdf0e10cSrcweir.IF "$(DEF4EXPORT1)"!=""
1038cdf0e10cSrcweir	@echo $(DEF4EXPORT1)										>>$@.tmpfile
1039cdf0e10cSrcweir.ENDIF
1040cdf0e10cSrcweir.IF "$(DEF4EXPORT2)"!=""
1041cdf0e10cSrcweir	@echo $(DEF4EXPORT2)										>>$@.tmpfile
1042cdf0e10cSrcweir.ENDIF
1043cdf0e10cSrcweir.IF "$(DEF4EXPORT3)"!=""
1044cdf0e10cSrcweir	@echo $(DEF4EXPORT3)										>>$@.tmpfile
1045cdf0e10cSrcweir.ENDIF
1046cdf0e10cSrcweir.IF "$(DEF4EXPORT4)"!=""
1047cdf0e10cSrcweir	@echo $(DEF4EXPORT4)										>>$@.tmpfile
1048cdf0e10cSrcweir.ENDIF
1049cdf0e10cSrcweir.IF "$(DEF4EXPORT5)"!=""
1050cdf0e10cSrcweir	@echo $(DEF4EXPORT5)										>>$@.tmpfile
1051cdf0e10cSrcweir.ENDIF
1052cdf0e10cSrcweir.IF "$(DEF4EXPORT6)"!=""
1053cdf0e10cSrcweir	@echo $(DEF4EXPORT6)										>>$@.tmpfile
1054cdf0e10cSrcweir.ENDIF
1055cdf0e10cSrcweir.IF "$(DEF4EXPORT7)"!=""
1056cdf0e10cSrcweir	@echo $(DEF4EXPORT7)										>>$@.tmpfile
1057cdf0e10cSrcweir.ENDIF
1058cdf0e10cSrcweir.IF "$(DEF4EXPORT8)"!=""
1059cdf0e10cSrcweir	@echo $(DEF4EXPORT8)										>>$@.tmpfile
1060cdf0e10cSrcweir.ENDIF
1061cdf0e10cSrcweir.IF "$(DEF4EXPORT9)"!=""
1062cdf0e10cSrcweir	@echo $(DEF4EXPORT9)										>>$@.tmpfile
1063cdf0e10cSrcweir.ENDIF
1064cdf0e10cSrcweir.IF "$(DEF4EXPORT10)"!=""
1065cdf0e10cSrcweir	@echo $(DEF4EXPORT10)										>>$@.tmpfile
1066cdf0e10cSrcweir.ENDIF
1067cdf0e10cSrcweir.IF "$(DEF4EXPORT11)"!=""
1068cdf0e10cSrcweir	@echo $(DEF4EXPORT11)										>>$@.tmpfile
1069cdf0e10cSrcweir.ENDIF
1070cdf0e10cSrcweir.IF "$(DEF4EXPORT12)"!=""
1071cdf0e10cSrcweir	@echo $(DEF4EXPORT12)										>>$@.tmpfile
1072cdf0e10cSrcweir.ENDIF
1073cdf0e10cSrcweir.IF "$(DEF4EXPORT13)"!=""
1074cdf0e10cSrcweir	@echo $(DEF4EXPORT13)										>>$@.tmpfile
1075cdf0e10cSrcweir.ENDIF
1076cdf0e10cSrcweir.IF "$(DEF4EXPORT14)"!=""
1077cdf0e10cSrcweir	@echo $(DEF4EXPORT14)										>>$@.tmpfile
1078cdf0e10cSrcweir.ENDIF
1079cdf0e10cSrcweir.IF "$(DEF4EXPORT15)"!=""
1080cdf0e10cSrcweir	@echo $(DEF4EXPORT15)										>>$@.tmpfile
1081cdf0e10cSrcweir.ENDIF
1082cdf0e10cSrcweir.IF "$(DEF4EXPORT16)"!=""
1083cdf0e10cSrcweir	@echo $(DEF4EXPORT16)										>>$@.tmpfile
1084cdf0e10cSrcweir.ENDIF
1085cdf0e10cSrcweir.IF "$(DEF4EXPORT17)"!=""
1086cdf0e10cSrcweir	@echo $(DEF4EXPORT17)										>>$@.tmpfile
1087cdf0e10cSrcweir.ENDIF
1088cdf0e10cSrcweir.IF "$(DEF4EXPORT18)"!=""
1089cdf0e10cSrcweir	@echo $(DEF4EXPORT18)										>>$@.tmpfile
1090cdf0e10cSrcweir.ENDIF
1091cdf0e10cSrcweir.IF "$(DEF4EXPORT19)"!=""
1092cdf0e10cSrcweir	@echo $(DEF4EXPORT19)										>>$@.tmpfile
1093cdf0e10cSrcweir.ENDIF
1094cdf0e10cSrcweir.IF "$(DEF4EXPORT20)"!=""
1095cdf0e10cSrcweir	@echo $(DEF4EXPORT20)										>>$@.tmpfile
1096cdf0e10cSrcweir.ENDIF
1097cdf0e10cSrcweir.IF "$(DEF4EXPORTFILE)"!=""
1098cdf0e10cSrcweir	@fix_def_file < $(DEF4EXPORTFILE) >> $@.tmp_ord
1099cdf0e10cSrcweir.ENDIF
1100cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
1101cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
1102cdf0e10cSrcweir	@+-$(RM) $@
1103cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
1104cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
1105cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
1106cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL4IMPLIBN:s/.lib/.a/) $@
1107cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL4IMPLIBN) $(SHL4IMPLIBN:s/.lib/.a/)
1108cdf0e10cSrcweir
1109cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
1110cdf0e10cSrcweir
1111cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
1112cdf0e10cSrcweir$(DEF4TARGETN): \
1113cdf0e10cSrcweir		$(DEF4DEPN) \
1114cdf0e10cSrcweir		$(DEF4EXPORTFILE)
1115cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
1116cdf0e10cSrcweir.ENDIF
1117cdf0e10cSrcweir.ENDIF			# "$(DEF4TARGETN)"!=""
1118cdf0e10cSrcweir
1119cdf0e10cSrcweir
1120cdf0e10cSrcweir# Anweisungen fuer das Linken
1121cdf0e10cSrcweir# unroll begin
1122cdf0e10cSrcweir
1123cdf0e10cSrcweir.IF "$(DEF5TARGETN)"!=""
1124cdf0e10cSrcweir
1125cdf0e10cSrcweir#to make intuitiv naming work
1126cdf0e10cSrcweir.IF "$(DEF5LIBNAME)"!=""
1127cdf0e10cSrcweirDEFLIB5NAME*=$(DEF5LIBNAME)
1128cdf0e10cSrcweir.ENDIF			# "$(DEF5LIBNAME)"!=""
1129cdf0e10cSrcweir
1130cdf0e10cSrcweir.IF "$(DEFLIB5NAME)"!=""
1131cdf0e10cSrcweirDEF5DEPN+=$(foreach,i,$(DEFLIB5NAME) $(SLB)/$(i).lib)
1132cdf0e10cSrcweir.ENDIF
1133cdf0e10cSrcweir
1134cdf0e10cSrcweir.IF "$(SHL5VERSIONMAP)"!=""
1135cdf0e10cSrcweir.IF "$(DEF5EXPORTFILE)"==""
1136cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
1137cdf0e10cSrcweirDEF5EXPORTFILE=$(MISC)/$(SHL5VERSIONMAP:b)_$(SHL5TARGET).dxp
1138cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1139cdf0e10cSrcweir$(DEF5EXPORTFILE) : $(SHL5OBJS) $(SHL5LIBS)
1140cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
1141cdf0e10cSrcweir
1142cdf0e10cSrcweir$(DEF5EXPORTFILE) : $(SHL5VERSIONMAP)
1143cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
1144cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1145cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
1146cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
1147cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
1148cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
1149cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL5OBJS) \
1150cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL5LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
1151cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
1152cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
1153cdf0e10cSrcweir# exported symbols list
1154cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
1155cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
1156cdf0e10cSrcweir
1157cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
1158cdf0e10cSrcweir
1159cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
1160cdf0e10cSrcweirDEF5EXPORTFILE=$(MISC)/$(SHL5VERSIONMAP:b)_$(SHL5TARGET).dxp
1161cdf0e10cSrcweir$(DEF5EXPORTFILE) : $(SHL5VERSIONMAP)
1162cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
1163cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
1164cdf0e10cSrcweir
1165cdf0e10cSrcweir.ENDIF			# "$(DEF5EXPORTFILE)"==""
1166cdf0e10cSrcweir.ENDIF			# "$(SHL5VERSIONMAP)"!=""
1167cdf0e10cSrcweir
1168cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
1169cdf0e10cSrcweir
1170cdf0e10cSrcweirDEF5FILTER=$(SOLARENV)/inc/dummy.flt
1171cdf0e10cSrcweir
1172cdf0e10cSrcweirRMHACK5:=$(RM)
1173cdf0e10cSrcweir
1174cdf0e10cSrcweir.IF "$(DEF5CEXP)"!=""
1175cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF5CEXP)
1176cdf0e10cSrcweir.ENDIF
1177cdf0e10cSrcweir
1178cdf0e10cSrcweir.IF "$(link_always)"==""
1179cdf0e10cSrcweir$(DEF5TARGETN) : \
1180cdf0e10cSrcweir		$(DEF5DEPN) \
1181cdf0e10cSrcweir		$(DEF5EXPORTFILE)
1182cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
1183cdf0e10cSrcweir$(DEF5TARGETN) .PHONY :
1184cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
1185cdf0e10cSrcweir	@-$(RM) $@.tmpfile
1186cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
1187cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL5TARGETN:f)$(EMQ)" 								 >$@.tmpfile
1188cdf0e10cSrcweir.IF "$(COM)"!="GCC"
1189cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
1190cdf0e10cSrcweir.ENDIF
1191cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
1192cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
1193cdf0e10cSrcweir#	getversioninfo fuer alle!!
1194cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
1195cdf0e10cSrcweir.ENDIF
1196cdf0e10cSrcweir.IF "$(DEFLIB5NAME)"!=""
1197cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1198cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL5TARGET).exp
1199cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL5TARGET).exp --export-all-symbols \
1200cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB5NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
1201cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL5TARGET).exp | sed '/^;/d' >>$@.tmpfile
1202cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL5TARGET).exp
1203cdf0e10cSrcweir.ELSE
1204cdf0e10cSrcweir.IF "$(SHL5USE_EXPORTS)"==""
1205cdf0e10cSrcweir	@-$(RMHACK5) $(MISC)/$(SHL5TARGET).exp
1206cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL5TARGET).exp $(SLB)/$(DEFLIB5NAME).lib
1207cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL5TARGET).flt $(MISC)/$(SHL5TARGET).exp			   >>$@.tmpfile
1208cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK5) $(MISC)/$(SHL5TARGET).exp
1209cdf0e10cSrcweir.ELSE			# "$(SHL5USE_EXPORTS)"==""
1210cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB5NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL5TARGET).direct
1211cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF5FILTER) $(MISC)/$(SHL5TARGET).direct >>$@.tmpfile
1212cdf0e10cSrcweir.ENDIF			# "$(SHL5USE_EXPORTS)"==""
1213cdf0e10cSrcweir.ENDIF
1214cdf0e10cSrcweir.ENDIF				# "$(DEFLIB5NAME)"!=""
1215cdf0e10cSrcweir.IF "$(DEF5EXPORT1)"!=""
1216cdf0e10cSrcweir	@echo $(DEF5EXPORT1)										>>$@.tmpfile
1217cdf0e10cSrcweir.ENDIF
1218cdf0e10cSrcweir.IF "$(DEF5EXPORT2)"!=""
1219cdf0e10cSrcweir	@echo $(DEF5EXPORT2)										>>$@.tmpfile
1220cdf0e10cSrcweir.ENDIF
1221cdf0e10cSrcweir.IF "$(DEF5EXPORT3)"!=""
1222cdf0e10cSrcweir	@echo $(DEF5EXPORT3)										>>$@.tmpfile
1223cdf0e10cSrcweir.ENDIF
1224cdf0e10cSrcweir.IF "$(DEF5EXPORT4)"!=""
1225cdf0e10cSrcweir	@echo $(DEF5EXPORT4)										>>$@.tmpfile
1226cdf0e10cSrcweir.ENDIF
1227cdf0e10cSrcweir.IF "$(DEF5EXPORT5)"!=""
1228cdf0e10cSrcweir	@echo $(DEF5EXPORT5)										>>$@.tmpfile
1229cdf0e10cSrcweir.ENDIF
1230cdf0e10cSrcweir.IF "$(DEF5EXPORT6)"!=""
1231cdf0e10cSrcweir	@echo $(DEF5EXPORT6)										>>$@.tmpfile
1232cdf0e10cSrcweir.ENDIF
1233cdf0e10cSrcweir.IF "$(DEF5EXPORT7)"!=""
1234cdf0e10cSrcweir	@echo $(DEF5EXPORT7)										>>$@.tmpfile
1235cdf0e10cSrcweir.ENDIF
1236cdf0e10cSrcweir.IF "$(DEF5EXPORT8)"!=""
1237cdf0e10cSrcweir	@echo $(DEF5EXPORT8)										>>$@.tmpfile
1238cdf0e10cSrcweir.ENDIF
1239cdf0e10cSrcweir.IF "$(DEF5EXPORT9)"!=""
1240cdf0e10cSrcweir	@echo $(DEF5EXPORT9)										>>$@.tmpfile
1241cdf0e10cSrcweir.ENDIF
1242cdf0e10cSrcweir.IF "$(DEF5EXPORT10)"!=""
1243cdf0e10cSrcweir	@echo $(DEF5EXPORT10)										>>$@.tmpfile
1244cdf0e10cSrcweir.ENDIF
1245cdf0e10cSrcweir.IF "$(DEF5EXPORT11)"!=""
1246cdf0e10cSrcweir	@echo $(DEF5EXPORT11)										>>$@.tmpfile
1247cdf0e10cSrcweir.ENDIF
1248cdf0e10cSrcweir.IF "$(DEF5EXPORT12)"!=""
1249cdf0e10cSrcweir	@echo $(DEF5EXPORT12)										>>$@.tmpfile
1250cdf0e10cSrcweir.ENDIF
1251cdf0e10cSrcweir.IF "$(DEF5EXPORT13)"!=""
1252cdf0e10cSrcweir	@echo $(DEF5EXPORT13)										>>$@.tmpfile
1253cdf0e10cSrcweir.ENDIF
1254cdf0e10cSrcweir.IF "$(DEF5EXPORT14)"!=""
1255cdf0e10cSrcweir	@echo $(DEF5EXPORT14)										>>$@.tmpfile
1256cdf0e10cSrcweir.ENDIF
1257cdf0e10cSrcweir.IF "$(DEF5EXPORT15)"!=""
1258cdf0e10cSrcweir	@echo $(DEF5EXPORT15)										>>$@.tmpfile
1259cdf0e10cSrcweir.ENDIF
1260cdf0e10cSrcweir.IF "$(DEF5EXPORT16)"!=""
1261cdf0e10cSrcweir	@echo $(DEF5EXPORT16)										>>$@.tmpfile
1262cdf0e10cSrcweir.ENDIF
1263cdf0e10cSrcweir.IF "$(DEF5EXPORT17)"!=""
1264cdf0e10cSrcweir	@echo $(DEF5EXPORT17)										>>$@.tmpfile
1265cdf0e10cSrcweir.ENDIF
1266cdf0e10cSrcweir.IF "$(DEF5EXPORT18)"!=""
1267cdf0e10cSrcweir	@echo $(DEF5EXPORT18)										>>$@.tmpfile
1268cdf0e10cSrcweir.ENDIF
1269cdf0e10cSrcweir.IF "$(DEF5EXPORT19)"!=""
1270cdf0e10cSrcweir	@echo $(DEF5EXPORT19)										>>$@.tmpfile
1271cdf0e10cSrcweir.ENDIF
1272cdf0e10cSrcweir.IF "$(DEF5EXPORT20)"!=""
1273cdf0e10cSrcweir	@echo $(DEF5EXPORT20)										>>$@.tmpfile
1274cdf0e10cSrcweir.ENDIF
1275cdf0e10cSrcweir.IF "$(DEF5EXPORTFILE)"!=""
1276cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1277cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF5EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
1278cdf0e10cSrcweir.ELSE
1279cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF5EXPORTFILE) >> $@.tmpfile
1280cdf0e10cSrcweir.ENDIF
1281cdf0e10cSrcweir.ENDIF
1282cdf0e10cSrcweir	@-$(RM) $@
1283cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
1284cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
1285cdf0e10cSrcweir
1286cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
1287cdf0e10cSrcweir
1288cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
1289cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
1290*534c536dSYuri DarioSHL5TARGET8=$(shell @fix_shl.cmd $(SHL5TARGETN:f))
1291cdf0e10cSrcweir
1292cdf0e10cSrcweirDEF5FILTER=$(SOLARENV)/inc/dummy.flt
1293cdf0e10cSrcweirDEF5NAMELIST=$(foreach,i,$(DEFLIB5NAME) $(SLB)/$(i).lib)
1294cdf0e10cSrcweir
1295cdf0e10cSrcweir.IF "$(link_always)"==""
1296cdf0e10cSrcweir$(DEF5TARGETN) : \
1297cdf0e10cSrcweir		$(DEF5DEPN) \
1298cdf0e10cSrcweir		$(DEF5EXPORTFILE)
1299cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
1300cdf0e10cSrcweir$(DEF5TARGETN) .PHONY :
1301cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
1302cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
1303cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
1304cdf0e10cSrcweir	@echo LIBRARY	  $(SHL5TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
1305cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
1306cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
1307cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
1308cdf0e10cSrcweir#	getversioninfo fuer alle!!
1309cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
1310cdf0e10cSrcweir.ENDIF
1311cdf0e10cSrcweir
1312cdf0e10cSrcweir.IF "$(DEFLIB5NAME)"!=""
1313cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB5NAME).lib
1314cdf0e10cSrcweir	@+emxexpr $(DEF5NAMELIST) | fix_exp_file >> $@.tmp_ord
1315cdf0e10cSrcweir.ENDIF				# "$(DEFLIB5NAME)"!=""
1316cdf0e10cSrcweir
1317cdf0e10cSrcweir.IF "$(DEF5EXPORT1)"!=""
1318cdf0e10cSrcweir	@echo $(DEF5EXPORT1)										>>$@.tmpfile
1319cdf0e10cSrcweir.ENDIF
1320cdf0e10cSrcweir.IF "$(DEF5EXPORT2)"!=""
1321cdf0e10cSrcweir	@echo $(DEF5EXPORT2)										>>$@.tmpfile
1322cdf0e10cSrcweir.ENDIF
1323cdf0e10cSrcweir.IF "$(DEF5EXPORT3)"!=""
1324cdf0e10cSrcweir	@echo $(DEF5EXPORT3)										>>$@.tmpfile
1325cdf0e10cSrcweir.ENDIF
1326cdf0e10cSrcweir.IF "$(DEF5EXPORT4)"!=""
1327cdf0e10cSrcweir	@echo $(DEF5EXPORT4)										>>$@.tmpfile
1328cdf0e10cSrcweir.ENDIF
1329cdf0e10cSrcweir.IF "$(DEF5EXPORT5)"!=""
1330cdf0e10cSrcweir	@echo $(DEF5EXPORT5)										>>$@.tmpfile
1331cdf0e10cSrcweir.ENDIF
1332cdf0e10cSrcweir.IF "$(DEF5EXPORT6)"!=""
1333cdf0e10cSrcweir	@echo $(DEF5EXPORT6)										>>$@.tmpfile
1334cdf0e10cSrcweir.ENDIF
1335cdf0e10cSrcweir.IF "$(DEF5EXPORT7)"!=""
1336cdf0e10cSrcweir	@echo $(DEF5EXPORT7)										>>$@.tmpfile
1337cdf0e10cSrcweir.ENDIF
1338cdf0e10cSrcweir.IF "$(DEF5EXPORT8)"!=""
1339cdf0e10cSrcweir	@echo $(DEF5EXPORT8)										>>$@.tmpfile
1340cdf0e10cSrcweir.ENDIF
1341cdf0e10cSrcweir.IF "$(DEF5EXPORT9)"!=""
1342cdf0e10cSrcweir	@echo $(DEF5EXPORT9)										>>$@.tmpfile
1343cdf0e10cSrcweir.ENDIF
1344cdf0e10cSrcweir.IF "$(DEF5EXPORT10)"!=""
1345cdf0e10cSrcweir	@echo $(DEF5EXPORT10)										>>$@.tmpfile
1346cdf0e10cSrcweir.ENDIF
1347cdf0e10cSrcweir.IF "$(DEF5EXPORT11)"!=""
1348cdf0e10cSrcweir	@echo $(DEF5EXPORT11)										>>$@.tmpfile
1349cdf0e10cSrcweir.ENDIF
1350cdf0e10cSrcweir.IF "$(DEF5EXPORT12)"!=""
1351cdf0e10cSrcweir	@echo $(DEF5EXPORT12)										>>$@.tmpfile
1352cdf0e10cSrcweir.ENDIF
1353cdf0e10cSrcweir.IF "$(DEF5EXPORT13)"!=""
1354cdf0e10cSrcweir	@echo $(DEF5EXPORT13)										>>$@.tmpfile
1355cdf0e10cSrcweir.ENDIF
1356cdf0e10cSrcweir.IF "$(DEF5EXPORT14)"!=""
1357cdf0e10cSrcweir	@echo $(DEF5EXPORT14)										>>$@.tmpfile
1358cdf0e10cSrcweir.ENDIF
1359cdf0e10cSrcweir.IF "$(DEF5EXPORT15)"!=""
1360cdf0e10cSrcweir	@echo $(DEF5EXPORT15)										>>$@.tmpfile
1361cdf0e10cSrcweir.ENDIF
1362cdf0e10cSrcweir.IF "$(DEF5EXPORT16)"!=""
1363cdf0e10cSrcweir	@echo $(DEF5EXPORT16)										>>$@.tmpfile
1364cdf0e10cSrcweir.ENDIF
1365cdf0e10cSrcweir.IF "$(DEF5EXPORT17)"!=""
1366cdf0e10cSrcweir	@echo $(DEF5EXPORT17)										>>$@.tmpfile
1367cdf0e10cSrcweir.ENDIF
1368cdf0e10cSrcweir.IF "$(DEF5EXPORT18)"!=""
1369cdf0e10cSrcweir	@echo $(DEF5EXPORT18)										>>$@.tmpfile
1370cdf0e10cSrcweir.ENDIF
1371cdf0e10cSrcweir.IF "$(DEF5EXPORT19)"!=""
1372cdf0e10cSrcweir	@echo $(DEF5EXPORT19)										>>$@.tmpfile
1373cdf0e10cSrcweir.ENDIF
1374cdf0e10cSrcweir.IF "$(DEF5EXPORT20)"!=""
1375cdf0e10cSrcweir	@echo $(DEF5EXPORT20)										>>$@.tmpfile
1376cdf0e10cSrcweir.ENDIF
1377cdf0e10cSrcweir.IF "$(DEF5EXPORTFILE)"!=""
1378cdf0e10cSrcweir	@fix_def_file < $(DEF5EXPORTFILE) >> $@.tmp_ord
1379cdf0e10cSrcweir.ENDIF
1380cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
1381cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
1382cdf0e10cSrcweir	@+-$(RM) $@
1383cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
1384cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
1385cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
1386cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL5IMPLIBN:s/.lib/.a/) $@
1387cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL5IMPLIBN) $(SHL5IMPLIBN:s/.lib/.a/)
1388cdf0e10cSrcweir
1389cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
1390cdf0e10cSrcweir
1391cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
1392cdf0e10cSrcweir$(DEF5TARGETN): \
1393cdf0e10cSrcweir		$(DEF5DEPN) \
1394cdf0e10cSrcweir		$(DEF5EXPORTFILE)
1395cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
1396cdf0e10cSrcweir.ENDIF
1397cdf0e10cSrcweir.ENDIF			# "$(DEF5TARGETN)"!=""
1398cdf0e10cSrcweir
1399cdf0e10cSrcweir
1400cdf0e10cSrcweir# Anweisungen fuer das Linken
1401cdf0e10cSrcweir# unroll begin
1402cdf0e10cSrcweir
1403cdf0e10cSrcweir.IF "$(DEF6TARGETN)"!=""
1404cdf0e10cSrcweir
1405cdf0e10cSrcweir#to make intuitiv naming work
1406cdf0e10cSrcweir.IF "$(DEF6LIBNAME)"!=""
1407cdf0e10cSrcweirDEFLIB6NAME*=$(DEF6LIBNAME)
1408cdf0e10cSrcweir.ENDIF			# "$(DEF6LIBNAME)"!=""
1409cdf0e10cSrcweir
1410cdf0e10cSrcweir.IF "$(DEFLIB6NAME)"!=""
1411cdf0e10cSrcweirDEF6DEPN+=$(foreach,i,$(DEFLIB6NAME) $(SLB)/$(i).lib)
1412cdf0e10cSrcweir.ENDIF
1413cdf0e10cSrcweir
1414cdf0e10cSrcweir.IF "$(SHL6VERSIONMAP)"!=""
1415cdf0e10cSrcweir.IF "$(DEF6EXPORTFILE)"==""
1416cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
1417cdf0e10cSrcweirDEF6EXPORTFILE=$(MISC)/$(SHL6VERSIONMAP:b)_$(SHL6TARGET).dxp
1418cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1419cdf0e10cSrcweir$(DEF6EXPORTFILE) : $(SHL6OBJS) $(SHL6LIBS)
1420cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
1421cdf0e10cSrcweir
1422cdf0e10cSrcweir$(DEF6EXPORTFILE) : $(SHL6VERSIONMAP)
1423cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
1424cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1425cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
1426cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
1427cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
1428cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
1429cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL6OBJS) \
1430cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL6LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
1431cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
1432cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
1433cdf0e10cSrcweir# exported symbols list
1434cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
1435cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
1436cdf0e10cSrcweir
1437cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
1438cdf0e10cSrcweir
1439cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
1440cdf0e10cSrcweirDEF6EXPORTFILE=$(MISC)/$(SHL6VERSIONMAP:b)_$(SHL6TARGET).dxp
1441cdf0e10cSrcweir$(DEF6EXPORTFILE) : $(SHL6VERSIONMAP)
1442cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
1443cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
1444cdf0e10cSrcweir
1445cdf0e10cSrcweir.ENDIF			# "$(DEF6EXPORTFILE)"==""
1446cdf0e10cSrcweir.ENDIF			# "$(SHL6VERSIONMAP)"!=""
1447cdf0e10cSrcweir
1448cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
1449cdf0e10cSrcweir
1450cdf0e10cSrcweirDEF6FILTER=$(SOLARENV)/inc/dummy.flt
1451cdf0e10cSrcweir
1452cdf0e10cSrcweirRMHACK6:=$(RM)
1453cdf0e10cSrcweir
1454cdf0e10cSrcweir.IF "$(DEF6CEXP)"!=""
1455cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF6CEXP)
1456cdf0e10cSrcweir.ENDIF
1457cdf0e10cSrcweir
1458cdf0e10cSrcweir.IF "$(link_always)"==""
1459cdf0e10cSrcweir$(DEF6TARGETN) : \
1460cdf0e10cSrcweir		$(DEF6DEPN) \
1461cdf0e10cSrcweir		$(DEF6EXPORTFILE)
1462cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
1463cdf0e10cSrcweir$(DEF6TARGETN) .PHONY :
1464cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
1465cdf0e10cSrcweir	@-$(RM) $@.tmpfile
1466cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
1467cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL6TARGETN:f)$(EMQ)" 								 >$@.tmpfile
1468cdf0e10cSrcweir.IF "$(COM)"!="GCC"
1469cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
1470cdf0e10cSrcweir.ENDIF
1471cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
1472cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
1473cdf0e10cSrcweir#	getversioninfo fuer alle!!
1474cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
1475cdf0e10cSrcweir.ENDIF
1476cdf0e10cSrcweir.IF "$(DEFLIB6NAME)"!=""
1477cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1478cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL6TARGET).exp
1479cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL6TARGET).exp --export-all-symbols \
1480cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB6NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
1481cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL6TARGET).exp | sed '/^;/d' >>$@.tmpfile
1482cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL6TARGET).exp
1483cdf0e10cSrcweir.ELSE
1484cdf0e10cSrcweir.IF "$(SHL6USE_EXPORTS)"==""
1485cdf0e10cSrcweir	@-$(RMHACK6) $(MISC)/$(SHL6TARGET).exp
1486cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL6TARGET).exp $(SLB)/$(DEFLIB6NAME).lib
1487cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL6TARGET).flt $(MISC)/$(SHL6TARGET).exp			   >>$@.tmpfile
1488cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK6) $(MISC)/$(SHL6TARGET).exp
1489cdf0e10cSrcweir.ELSE			# "$(SHL6USE_EXPORTS)"==""
1490cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB6NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL6TARGET).direct
1491cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF6FILTER) $(MISC)/$(SHL6TARGET).direct >>$@.tmpfile
1492cdf0e10cSrcweir.ENDIF			# "$(SHL6USE_EXPORTS)"==""
1493cdf0e10cSrcweir.ENDIF
1494cdf0e10cSrcweir.ENDIF				# "$(DEFLIB6NAME)"!=""
1495cdf0e10cSrcweir.IF "$(DEF6EXPORT1)"!=""
1496cdf0e10cSrcweir	@echo $(DEF6EXPORT1)										>>$@.tmpfile
1497cdf0e10cSrcweir.ENDIF
1498cdf0e10cSrcweir.IF "$(DEF6EXPORT2)"!=""
1499cdf0e10cSrcweir	@echo $(DEF6EXPORT2)										>>$@.tmpfile
1500cdf0e10cSrcweir.ENDIF
1501cdf0e10cSrcweir.IF "$(DEF6EXPORT3)"!=""
1502cdf0e10cSrcweir	@echo $(DEF6EXPORT3)										>>$@.tmpfile
1503cdf0e10cSrcweir.ENDIF
1504cdf0e10cSrcweir.IF "$(DEF6EXPORT4)"!=""
1505cdf0e10cSrcweir	@echo $(DEF6EXPORT4)										>>$@.tmpfile
1506cdf0e10cSrcweir.ENDIF
1507cdf0e10cSrcweir.IF "$(DEF6EXPORT5)"!=""
1508cdf0e10cSrcweir	@echo $(DEF6EXPORT5)										>>$@.tmpfile
1509cdf0e10cSrcweir.ENDIF
1510cdf0e10cSrcweir.IF "$(DEF6EXPORT6)"!=""
1511cdf0e10cSrcweir	@echo $(DEF6EXPORT6)										>>$@.tmpfile
1512cdf0e10cSrcweir.ENDIF
1513cdf0e10cSrcweir.IF "$(DEF6EXPORT7)"!=""
1514cdf0e10cSrcweir	@echo $(DEF6EXPORT7)										>>$@.tmpfile
1515cdf0e10cSrcweir.ENDIF
1516cdf0e10cSrcweir.IF "$(DEF6EXPORT8)"!=""
1517cdf0e10cSrcweir	@echo $(DEF6EXPORT8)										>>$@.tmpfile
1518cdf0e10cSrcweir.ENDIF
1519cdf0e10cSrcweir.IF "$(DEF6EXPORT9)"!=""
1520cdf0e10cSrcweir	@echo $(DEF6EXPORT9)										>>$@.tmpfile
1521cdf0e10cSrcweir.ENDIF
1522cdf0e10cSrcweir.IF "$(DEF6EXPORT10)"!=""
1523cdf0e10cSrcweir	@echo $(DEF6EXPORT10)										>>$@.tmpfile
1524cdf0e10cSrcweir.ENDIF
1525cdf0e10cSrcweir.IF "$(DEF6EXPORT11)"!=""
1526cdf0e10cSrcweir	@echo $(DEF6EXPORT11)										>>$@.tmpfile
1527cdf0e10cSrcweir.ENDIF
1528cdf0e10cSrcweir.IF "$(DEF6EXPORT12)"!=""
1529cdf0e10cSrcweir	@echo $(DEF6EXPORT12)										>>$@.tmpfile
1530cdf0e10cSrcweir.ENDIF
1531cdf0e10cSrcweir.IF "$(DEF6EXPORT13)"!=""
1532cdf0e10cSrcweir	@echo $(DEF6EXPORT13)										>>$@.tmpfile
1533cdf0e10cSrcweir.ENDIF
1534cdf0e10cSrcweir.IF "$(DEF6EXPORT14)"!=""
1535cdf0e10cSrcweir	@echo $(DEF6EXPORT14)										>>$@.tmpfile
1536cdf0e10cSrcweir.ENDIF
1537cdf0e10cSrcweir.IF "$(DEF6EXPORT15)"!=""
1538cdf0e10cSrcweir	@echo $(DEF6EXPORT15)										>>$@.tmpfile
1539cdf0e10cSrcweir.ENDIF
1540cdf0e10cSrcweir.IF "$(DEF6EXPORT16)"!=""
1541cdf0e10cSrcweir	@echo $(DEF6EXPORT16)										>>$@.tmpfile
1542cdf0e10cSrcweir.ENDIF
1543cdf0e10cSrcweir.IF "$(DEF6EXPORT17)"!=""
1544cdf0e10cSrcweir	@echo $(DEF6EXPORT17)										>>$@.tmpfile
1545cdf0e10cSrcweir.ENDIF
1546cdf0e10cSrcweir.IF "$(DEF6EXPORT18)"!=""
1547cdf0e10cSrcweir	@echo $(DEF6EXPORT18)										>>$@.tmpfile
1548cdf0e10cSrcweir.ENDIF
1549cdf0e10cSrcweir.IF "$(DEF6EXPORT19)"!=""
1550cdf0e10cSrcweir	@echo $(DEF6EXPORT19)										>>$@.tmpfile
1551cdf0e10cSrcweir.ENDIF
1552cdf0e10cSrcweir.IF "$(DEF6EXPORT20)"!=""
1553cdf0e10cSrcweir	@echo $(DEF6EXPORT20)										>>$@.tmpfile
1554cdf0e10cSrcweir.ENDIF
1555cdf0e10cSrcweir.IF "$(DEF6EXPORTFILE)"!=""
1556cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1557cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF6EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
1558cdf0e10cSrcweir.ELSE
1559cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF6EXPORTFILE) >> $@.tmpfile
1560cdf0e10cSrcweir.ENDIF
1561cdf0e10cSrcweir.ENDIF
1562cdf0e10cSrcweir	@-$(RM) $@
1563cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
1564cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
1565cdf0e10cSrcweir
1566cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
1567cdf0e10cSrcweir
1568cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
1569cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
1570*534c536dSYuri DarioSHL6TARGET8=$(shell @fix_shl.cmd $(SHL6TARGETN:f))
1571cdf0e10cSrcweir
1572cdf0e10cSrcweirDEF6FILTER=$(SOLARENV)/inc/dummy.flt
1573cdf0e10cSrcweirDEF6NAMELIST=$(foreach,i,$(DEFLIB6NAME) $(SLB)/$(i).lib)
1574cdf0e10cSrcweir
1575cdf0e10cSrcweir.IF "$(link_always)"==""
1576cdf0e10cSrcweir$(DEF6TARGETN) : \
1577cdf0e10cSrcweir		$(DEF6DEPN) \
1578cdf0e10cSrcweir		$(DEF6EXPORTFILE)
1579cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
1580cdf0e10cSrcweir$(DEF6TARGETN) .PHONY :
1581cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
1582cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
1583cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
1584cdf0e10cSrcweir	@echo LIBRARY	  $(SHL6TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
1585cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
1586cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
1587cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
1588cdf0e10cSrcweir#	getversioninfo fuer alle!!
1589cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
1590cdf0e10cSrcweir.ENDIF
1591cdf0e10cSrcweir
1592cdf0e10cSrcweir.IF "$(DEFLIB6NAME)"!=""
1593cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB6NAME).lib
1594cdf0e10cSrcweir	@+emxexpr $(DEF6NAMELIST) | fix_exp_file >> $@.tmp_ord
1595cdf0e10cSrcweir.ENDIF				# "$(DEFLIB6NAME)"!=""
1596cdf0e10cSrcweir
1597cdf0e10cSrcweir.IF "$(DEF6EXPORT1)"!=""
1598cdf0e10cSrcweir	@echo $(DEF6EXPORT1)										>>$@.tmpfile
1599cdf0e10cSrcweir.ENDIF
1600cdf0e10cSrcweir.IF "$(DEF6EXPORT2)"!=""
1601cdf0e10cSrcweir	@echo $(DEF6EXPORT2)										>>$@.tmpfile
1602cdf0e10cSrcweir.ENDIF
1603cdf0e10cSrcweir.IF "$(DEF6EXPORT3)"!=""
1604cdf0e10cSrcweir	@echo $(DEF6EXPORT3)										>>$@.tmpfile
1605cdf0e10cSrcweir.ENDIF
1606cdf0e10cSrcweir.IF "$(DEF6EXPORT4)"!=""
1607cdf0e10cSrcweir	@echo $(DEF6EXPORT4)										>>$@.tmpfile
1608cdf0e10cSrcweir.ENDIF
1609cdf0e10cSrcweir.IF "$(DEF6EXPORT5)"!=""
1610cdf0e10cSrcweir	@echo $(DEF6EXPORT5)										>>$@.tmpfile
1611cdf0e10cSrcweir.ENDIF
1612cdf0e10cSrcweir.IF "$(DEF6EXPORT6)"!=""
1613cdf0e10cSrcweir	@echo $(DEF6EXPORT6)										>>$@.tmpfile
1614cdf0e10cSrcweir.ENDIF
1615cdf0e10cSrcweir.IF "$(DEF6EXPORT7)"!=""
1616cdf0e10cSrcweir	@echo $(DEF6EXPORT7)										>>$@.tmpfile
1617cdf0e10cSrcweir.ENDIF
1618cdf0e10cSrcweir.IF "$(DEF6EXPORT8)"!=""
1619cdf0e10cSrcweir	@echo $(DEF6EXPORT8)										>>$@.tmpfile
1620cdf0e10cSrcweir.ENDIF
1621cdf0e10cSrcweir.IF "$(DEF6EXPORT9)"!=""
1622cdf0e10cSrcweir	@echo $(DEF6EXPORT9)										>>$@.tmpfile
1623cdf0e10cSrcweir.ENDIF
1624cdf0e10cSrcweir.IF "$(DEF6EXPORT10)"!=""
1625cdf0e10cSrcweir	@echo $(DEF6EXPORT10)										>>$@.tmpfile
1626cdf0e10cSrcweir.ENDIF
1627cdf0e10cSrcweir.IF "$(DEF6EXPORT11)"!=""
1628cdf0e10cSrcweir	@echo $(DEF6EXPORT11)										>>$@.tmpfile
1629cdf0e10cSrcweir.ENDIF
1630cdf0e10cSrcweir.IF "$(DEF6EXPORT12)"!=""
1631cdf0e10cSrcweir	@echo $(DEF6EXPORT12)										>>$@.tmpfile
1632cdf0e10cSrcweir.ENDIF
1633cdf0e10cSrcweir.IF "$(DEF6EXPORT13)"!=""
1634cdf0e10cSrcweir	@echo $(DEF6EXPORT13)										>>$@.tmpfile
1635cdf0e10cSrcweir.ENDIF
1636cdf0e10cSrcweir.IF "$(DEF6EXPORT14)"!=""
1637cdf0e10cSrcweir	@echo $(DEF6EXPORT14)										>>$@.tmpfile
1638cdf0e10cSrcweir.ENDIF
1639cdf0e10cSrcweir.IF "$(DEF6EXPORT15)"!=""
1640cdf0e10cSrcweir	@echo $(DEF6EXPORT15)										>>$@.tmpfile
1641cdf0e10cSrcweir.ENDIF
1642cdf0e10cSrcweir.IF "$(DEF6EXPORT16)"!=""
1643cdf0e10cSrcweir	@echo $(DEF6EXPORT16)										>>$@.tmpfile
1644cdf0e10cSrcweir.ENDIF
1645cdf0e10cSrcweir.IF "$(DEF6EXPORT17)"!=""
1646cdf0e10cSrcweir	@echo $(DEF6EXPORT17)										>>$@.tmpfile
1647cdf0e10cSrcweir.ENDIF
1648cdf0e10cSrcweir.IF "$(DEF6EXPORT18)"!=""
1649cdf0e10cSrcweir	@echo $(DEF6EXPORT18)										>>$@.tmpfile
1650cdf0e10cSrcweir.ENDIF
1651cdf0e10cSrcweir.IF "$(DEF6EXPORT19)"!=""
1652cdf0e10cSrcweir	@echo $(DEF6EXPORT19)										>>$@.tmpfile
1653cdf0e10cSrcweir.ENDIF
1654cdf0e10cSrcweir.IF "$(DEF6EXPORT20)"!=""
1655cdf0e10cSrcweir	@echo $(DEF6EXPORT20)										>>$@.tmpfile
1656cdf0e10cSrcweir.ENDIF
1657cdf0e10cSrcweir.IF "$(DEF6EXPORTFILE)"!=""
1658cdf0e10cSrcweir	@fix_def_file < $(DEF6EXPORTFILE) >> $@.tmp_ord
1659cdf0e10cSrcweir.ENDIF
1660cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
1661cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
1662cdf0e10cSrcweir	@+-$(RM) $@
1663cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
1664cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
1665cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
1666cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL6IMPLIBN:s/.lib/.a/) $@
1667cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL6IMPLIBN) $(SHL6IMPLIBN:s/.lib/.a/)
1668cdf0e10cSrcweir
1669cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
1670cdf0e10cSrcweir
1671cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
1672cdf0e10cSrcweir$(DEF6TARGETN): \
1673cdf0e10cSrcweir		$(DEF6DEPN) \
1674cdf0e10cSrcweir		$(DEF6EXPORTFILE)
1675cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
1676cdf0e10cSrcweir.ENDIF
1677cdf0e10cSrcweir.ENDIF			# "$(DEF6TARGETN)"!=""
1678cdf0e10cSrcweir
1679cdf0e10cSrcweir
1680cdf0e10cSrcweir# Anweisungen fuer das Linken
1681cdf0e10cSrcweir# unroll begin
1682cdf0e10cSrcweir
1683cdf0e10cSrcweir.IF "$(DEF7TARGETN)"!=""
1684cdf0e10cSrcweir
1685cdf0e10cSrcweir#to make intuitiv naming work
1686cdf0e10cSrcweir.IF "$(DEF7LIBNAME)"!=""
1687cdf0e10cSrcweirDEFLIB7NAME*=$(DEF7LIBNAME)
1688cdf0e10cSrcweir.ENDIF			# "$(DEF7LIBNAME)"!=""
1689cdf0e10cSrcweir
1690cdf0e10cSrcweir.IF "$(DEFLIB7NAME)"!=""
1691cdf0e10cSrcweirDEF7DEPN+=$(foreach,i,$(DEFLIB7NAME) $(SLB)/$(i).lib)
1692cdf0e10cSrcweir.ENDIF
1693cdf0e10cSrcweir
1694cdf0e10cSrcweir.IF "$(SHL7VERSIONMAP)"!=""
1695cdf0e10cSrcweir.IF "$(DEF7EXPORTFILE)"==""
1696cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
1697cdf0e10cSrcweirDEF7EXPORTFILE=$(MISC)/$(SHL7VERSIONMAP:b)_$(SHL7TARGET).dxp
1698cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1699cdf0e10cSrcweir$(DEF7EXPORTFILE) : $(SHL7OBJS) $(SHL7LIBS)
1700cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
1701cdf0e10cSrcweir
1702cdf0e10cSrcweir$(DEF7EXPORTFILE) : $(SHL7VERSIONMAP)
1703cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
1704cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1705cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
1706cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
1707cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
1708cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
1709cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL7OBJS) \
1710cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL7LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
1711cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
1712cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
1713cdf0e10cSrcweir# exported symbols list
1714cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
1715cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
1716cdf0e10cSrcweir
1717cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
1718cdf0e10cSrcweir
1719cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
1720cdf0e10cSrcweirDEF7EXPORTFILE=$(MISC)/$(SHL7VERSIONMAP:b)_$(SHL7TARGET).dxp
1721cdf0e10cSrcweir$(DEF7EXPORTFILE) : $(SHL7VERSIONMAP)
1722cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
1723cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
1724cdf0e10cSrcweir
1725cdf0e10cSrcweir.ENDIF			# "$(DEF7EXPORTFILE)"==""
1726cdf0e10cSrcweir.ENDIF			# "$(SHL7VERSIONMAP)"!=""
1727cdf0e10cSrcweir
1728cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
1729cdf0e10cSrcweir
1730cdf0e10cSrcweirDEF7FILTER=$(SOLARENV)/inc/dummy.flt
1731cdf0e10cSrcweir
1732cdf0e10cSrcweirRMHACK7:=$(RM)
1733cdf0e10cSrcweir
1734cdf0e10cSrcweir.IF "$(DEF7CEXP)"!=""
1735cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF7CEXP)
1736cdf0e10cSrcweir.ENDIF
1737cdf0e10cSrcweir
1738cdf0e10cSrcweir.IF "$(link_always)"==""
1739cdf0e10cSrcweir$(DEF7TARGETN) : \
1740cdf0e10cSrcweir		$(DEF7DEPN) \
1741cdf0e10cSrcweir		$(DEF7EXPORTFILE)
1742cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
1743cdf0e10cSrcweir$(DEF7TARGETN) .PHONY :
1744cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
1745cdf0e10cSrcweir	@-$(RM) $@.tmpfile
1746cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
1747cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL7TARGETN:f)$(EMQ)" 								 >$@.tmpfile
1748cdf0e10cSrcweir.IF "$(COM)"!="GCC"
1749cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
1750cdf0e10cSrcweir.ENDIF
1751cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
1752cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
1753cdf0e10cSrcweir#	getversioninfo fuer alle!!
1754cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
1755cdf0e10cSrcweir.ENDIF
1756cdf0e10cSrcweir.IF "$(DEFLIB7NAME)"!=""
1757cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1758cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL7TARGET).exp
1759cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL7TARGET).exp --export-all-symbols \
1760cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB7NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
1761cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL7TARGET).exp | sed '/^;/d' >>$@.tmpfile
1762cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL7TARGET).exp
1763cdf0e10cSrcweir.ELSE
1764cdf0e10cSrcweir.IF "$(SHL7USE_EXPORTS)"==""
1765cdf0e10cSrcweir	@-$(RMHACK7) $(MISC)/$(SHL7TARGET).exp
1766cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL7TARGET).exp $(SLB)/$(DEFLIB7NAME).lib
1767cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL7TARGET).flt $(MISC)/$(SHL7TARGET).exp			   >>$@.tmpfile
1768cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK7) $(MISC)/$(SHL7TARGET).exp
1769cdf0e10cSrcweir.ELSE			# "$(SHL7USE_EXPORTS)"==""
1770cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB7NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL7TARGET).direct
1771cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF7FILTER) $(MISC)/$(SHL7TARGET).direct >>$@.tmpfile
1772cdf0e10cSrcweir.ENDIF			# "$(SHL7USE_EXPORTS)"==""
1773cdf0e10cSrcweir.ENDIF
1774cdf0e10cSrcweir.ENDIF				# "$(DEFLIB7NAME)"!=""
1775cdf0e10cSrcweir.IF "$(DEF7EXPORT1)"!=""
1776cdf0e10cSrcweir	@echo $(DEF7EXPORT1)										>>$@.tmpfile
1777cdf0e10cSrcweir.ENDIF
1778cdf0e10cSrcweir.IF "$(DEF7EXPORT2)"!=""
1779cdf0e10cSrcweir	@echo $(DEF7EXPORT2)										>>$@.tmpfile
1780cdf0e10cSrcweir.ENDIF
1781cdf0e10cSrcweir.IF "$(DEF7EXPORT3)"!=""
1782cdf0e10cSrcweir	@echo $(DEF7EXPORT3)										>>$@.tmpfile
1783cdf0e10cSrcweir.ENDIF
1784cdf0e10cSrcweir.IF "$(DEF7EXPORT4)"!=""
1785cdf0e10cSrcweir	@echo $(DEF7EXPORT4)										>>$@.tmpfile
1786cdf0e10cSrcweir.ENDIF
1787cdf0e10cSrcweir.IF "$(DEF7EXPORT5)"!=""
1788cdf0e10cSrcweir	@echo $(DEF7EXPORT5)										>>$@.tmpfile
1789cdf0e10cSrcweir.ENDIF
1790cdf0e10cSrcweir.IF "$(DEF7EXPORT6)"!=""
1791cdf0e10cSrcweir	@echo $(DEF7EXPORT6)										>>$@.tmpfile
1792cdf0e10cSrcweir.ENDIF
1793cdf0e10cSrcweir.IF "$(DEF7EXPORT7)"!=""
1794cdf0e10cSrcweir	@echo $(DEF7EXPORT7)										>>$@.tmpfile
1795cdf0e10cSrcweir.ENDIF
1796cdf0e10cSrcweir.IF "$(DEF7EXPORT8)"!=""
1797cdf0e10cSrcweir	@echo $(DEF7EXPORT8)										>>$@.tmpfile
1798cdf0e10cSrcweir.ENDIF
1799cdf0e10cSrcweir.IF "$(DEF7EXPORT9)"!=""
1800cdf0e10cSrcweir	@echo $(DEF7EXPORT9)										>>$@.tmpfile
1801cdf0e10cSrcweir.ENDIF
1802cdf0e10cSrcweir.IF "$(DEF7EXPORT10)"!=""
1803cdf0e10cSrcweir	@echo $(DEF7EXPORT10)										>>$@.tmpfile
1804cdf0e10cSrcweir.ENDIF
1805cdf0e10cSrcweir.IF "$(DEF7EXPORT11)"!=""
1806cdf0e10cSrcweir	@echo $(DEF7EXPORT11)										>>$@.tmpfile
1807cdf0e10cSrcweir.ENDIF
1808cdf0e10cSrcweir.IF "$(DEF7EXPORT12)"!=""
1809cdf0e10cSrcweir	@echo $(DEF7EXPORT12)										>>$@.tmpfile
1810cdf0e10cSrcweir.ENDIF
1811cdf0e10cSrcweir.IF "$(DEF7EXPORT13)"!=""
1812cdf0e10cSrcweir	@echo $(DEF7EXPORT13)										>>$@.tmpfile
1813cdf0e10cSrcweir.ENDIF
1814cdf0e10cSrcweir.IF "$(DEF7EXPORT14)"!=""
1815cdf0e10cSrcweir	@echo $(DEF7EXPORT14)										>>$@.tmpfile
1816cdf0e10cSrcweir.ENDIF
1817cdf0e10cSrcweir.IF "$(DEF7EXPORT15)"!=""
1818cdf0e10cSrcweir	@echo $(DEF7EXPORT15)										>>$@.tmpfile
1819cdf0e10cSrcweir.ENDIF
1820cdf0e10cSrcweir.IF "$(DEF7EXPORT16)"!=""
1821cdf0e10cSrcweir	@echo $(DEF7EXPORT16)										>>$@.tmpfile
1822cdf0e10cSrcweir.ENDIF
1823cdf0e10cSrcweir.IF "$(DEF7EXPORT17)"!=""
1824cdf0e10cSrcweir	@echo $(DEF7EXPORT17)										>>$@.tmpfile
1825cdf0e10cSrcweir.ENDIF
1826cdf0e10cSrcweir.IF "$(DEF7EXPORT18)"!=""
1827cdf0e10cSrcweir	@echo $(DEF7EXPORT18)										>>$@.tmpfile
1828cdf0e10cSrcweir.ENDIF
1829cdf0e10cSrcweir.IF "$(DEF7EXPORT19)"!=""
1830cdf0e10cSrcweir	@echo $(DEF7EXPORT19)										>>$@.tmpfile
1831cdf0e10cSrcweir.ENDIF
1832cdf0e10cSrcweir.IF "$(DEF7EXPORT20)"!=""
1833cdf0e10cSrcweir	@echo $(DEF7EXPORT20)										>>$@.tmpfile
1834cdf0e10cSrcweir.ENDIF
1835cdf0e10cSrcweir.IF "$(DEF7EXPORTFILE)"!=""
1836cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1837cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF7EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
1838cdf0e10cSrcweir.ELSE
1839cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF7EXPORTFILE) >> $@.tmpfile
1840cdf0e10cSrcweir.ENDIF
1841cdf0e10cSrcweir.ENDIF
1842cdf0e10cSrcweir	@-$(RM) $@
1843cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
1844cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
1845cdf0e10cSrcweir
1846cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
1847cdf0e10cSrcweir
1848cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
1849cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
1850*534c536dSYuri DarioSHL7TARGET8=$(shell @fix_shl.cmd $(SHL7TARGETN:f))
1851cdf0e10cSrcweir
1852cdf0e10cSrcweirDEF7FILTER=$(SOLARENV)/inc/dummy.flt
1853cdf0e10cSrcweirDEF7NAMELIST=$(foreach,i,$(DEFLIB7NAME) $(SLB)/$(i).lib)
1854cdf0e10cSrcweir
1855cdf0e10cSrcweir.IF "$(link_always)"==""
1856cdf0e10cSrcweir$(DEF7TARGETN) : \
1857cdf0e10cSrcweir		$(DEF7DEPN) \
1858cdf0e10cSrcweir		$(DEF7EXPORTFILE)
1859cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
1860cdf0e10cSrcweir$(DEF7TARGETN) .PHONY :
1861cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
1862cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
1863cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
1864cdf0e10cSrcweir	@echo LIBRARY	  $(SHL7TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
1865cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
1866cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
1867cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
1868cdf0e10cSrcweir#	getversioninfo fuer alle!!
1869cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
1870cdf0e10cSrcweir.ENDIF
1871cdf0e10cSrcweir
1872cdf0e10cSrcweir.IF "$(DEFLIB7NAME)"!=""
1873cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB7NAME).lib
1874cdf0e10cSrcweir	@+emxexpr $(DEF7NAMELIST) | fix_exp_file >> $@.tmp_ord
1875cdf0e10cSrcweir.ENDIF				# "$(DEFLIB7NAME)"!=""
1876cdf0e10cSrcweir
1877cdf0e10cSrcweir.IF "$(DEF7EXPORT1)"!=""
1878cdf0e10cSrcweir	@echo $(DEF7EXPORT1)										>>$@.tmpfile
1879cdf0e10cSrcweir.ENDIF
1880cdf0e10cSrcweir.IF "$(DEF7EXPORT2)"!=""
1881cdf0e10cSrcweir	@echo $(DEF7EXPORT2)										>>$@.tmpfile
1882cdf0e10cSrcweir.ENDIF
1883cdf0e10cSrcweir.IF "$(DEF7EXPORT3)"!=""
1884cdf0e10cSrcweir	@echo $(DEF7EXPORT3)										>>$@.tmpfile
1885cdf0e10cSrcweir.ENDIF
1886cdf0e10cSrcweir.IF "$(DEF7EXPORT4)"!=""
1887cdf0e10cSrcweir	@echo $(DEF7EXPORT4)										>>$@.tmpfile
1888cdf0e10cSrcweir.ENDIF
1889cdf0e10cSrcweir.IF "$(DEF7EXPORT5)"!=""
1890cdf0e10cSrcweir	@echo $(DEF7EXPORT5)										>>$@.tmpfile
1891cdf0e10cSrcweir.ENDIF
1892cdf0e10cSrcweir.IF "$(DEF7EXPORT6)"!=""
1893cdf0e10cSrcweir	@echo $(DEF7EXPORT6)										>>$@.tmpfile
1894cdf0e10cSrcweir.ENDIF
1895cdf0e10cSrcweir.IF "$(DEF7EXPORT7)"!=""
1896cdf0e10cSrcweir	@echo $(DEF7EXPORT7)										>>$@.tmpfile
1897cdf0e10cSrcweir.ENDIF
1898cdf0e10cSrcweir.IF "$(DEF7EXPORT8)"!=""
1899cdf0e10cSrcweir	@echo $(DEF7EXPORT8)										>>$@.tmpfile
1900cdf0e10cSrcweir.ENDIF
1901cdf0e10cSrcweir.IF "$(DEF7EXPORT9)"!=""
1902cdf0e10cSrcweir	@echo $(DEF7EXPORT9)										>>$@.tmpfile
1903cdf0e10cSrcweir.ENDIF
1904cdf0e10cSrcweir.IF "$(DEF7EXPORT10)"!=""
1905cdf0e10cSrcweir	@echo $(DEF7EXPORT10)										>>$@.tmpfile
1906cdf0e10cSrcweir.ENDIF
1907cdf0e10cSrcweir.IF "$(DEF7EXPORT11)"!=""
1908cdf0e10cSrcweir	@echo $(DEF7EXPORT11)										>>$@.tmpfile
1909cdf0e10cSrcweir.ENDIF
1910cdf0e10cSrcweir.IF "$(DEF7EXPORT12)"!=""
1911cdf0e10cSrcweir	@echo $(DEF7EXPORT12)										>>$@.tmpfile
1912cdf0e10cSrcweir.ENDIF
1913cdf0e10cSrcweir.IF "$(DEF7EXPORT13)"!=""
1914cdf0e10cSrcweir	@echo $(DEF7EXPORT13)										>>$@.tmpfile
1915cdf0e10cSrcweir.ENDIF
1916cdf0e10cSrcweir.IF "$(DEF7EXPORT14)"!=""
1917cdf0e10cSrcweir	@echo $(DEF7EXPORT14)										>>$@.tmpfile
1918cdf0e10cSrcweir.ENDIF
1919cdf0e10cSrcweir.IF "$(DEF7EXPORT15)"!=""
1920cdf0e10cSrcweir	@echo $(DEF7EXPORT15)										>>$@.tmpfile
1921cdf0e10cSrcweir.ENDIF
1922cdf0e10cSrcweir.IF "$(DEF7EXPORT16)"!=""
1923cdf0e10cSrcweir	@echo $(DEF7EXPORT16)										>>$@.tmpfile
1924cdf0e10cSrcweir.ENDIF
1925cdf0e10cSrcweir.IF "$(DEF7EXPORT17)"!=""
1926cdf0e10cSrcweir	@echo $(DEF7EXPORT17)										>>$@.tmpfile
1927cdf0e10cSrcweir.ENDIF
1928cdf0e10cSrcweir.IF "$(DEF7EXPORT18)"!=""
1929cdf0e10cSrcweir	@echo $(DEF7EXPORT18)										>>$@.tmpfile
1930cdf0e10cSrcweir.ENDIF
1931cdf0e10cSrcweir.IF "$(DEF7EXPORT19)"!=""
1932cdf0e10cSrcweir	@echo $(DEF7EXPORT19)										>>$@.tmpfile
1933cdf0e10cSrcweir.ENDIF
1934cdf0e10cSrcweir.IF "$(DEF7EXPORT20)"!=""
1935cdf0e10cSrcweir	@echo $(DEF7EXPORT20)										>>$@.tmpfile
1936cdf0e10cSrcweir.ENDIF
1937cdf0e10cSrcweir.IF "$(DEF7EXPORTFILE)"!=""
1938cdf0e10cSrcweir	@fix_def_file < $(DEF7EXPORTFILE) >> $@.tmp_ord
1939cdf0e10cSrcweir.ENDIF
1940cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
1941cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
1942cdf0e10cSrcweir	@+-$(RM) $@
1943cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
1944cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
1945cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
1946cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL7IMPLIBN:s/.lib/.a/) $@
1947cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL7IMPLIBN) $(SHL7IMPLIBN:s/.lib/.a/)
1948cdf0e10cSrcweir
1949cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
1950cdf0e10cSrcweir
1951cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
1952cdf0e10cSrcweir$(DEF7TARGETN): \
1953cdf0e10cSrcweir		$(DEF7DEPN) \
1954cdf0e10cSrcweir		$(DEF7EXPORTFILE)
1955cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
1956cdf0e10cSrcweir.ENDIF
1957cdf0e10cSrcweir.ENDIF			# "$(DEF7TARGETN)"!=""
1958cdf0e10cSrcweir
1959cdf0e10cSrcweir
1960cdf0e10cSrcweir# Anweisungen fuer das Linken
1961cdf0e10cSrcweir# unroll begin
1962cdf0e10cSrcweir
1963cdf0e10cSrcweir.IF "$(DEF8TARGETN)"!=""
1964cdf0e10cSrcweir
1965cdf0e10cSrcweir#to make intuitiv naming work
1966cdf0e10cSrcweir.IF "$(DEF8LIBNAME)"!=""
1967cdf0e10cSrcweirDEFLIB8NAME*=$(DEF8LIBNAME)
1968cdf0e10cSrcweir.ENDIF			# "$(DEF8LIBNAME)"!=""
1969cdf0e10cSrcweir
1970cdf0e10cSrcweir.IF "$(DEFLIB8NAME)"!=""
1971cdf0e10cSrcweirDEF8DEPN+=$(foreach,i,$(DEFLIB8NAME) $(SLB)/$(i).lib)
1972cdf0e10cSrcweir.ENDIF
1973cdf0e10cSrcweir
1974cdf0e10cSrcweir.IF "$(SHL8VERSIONMAP)"!=""
1975cdf0e10cSrcweir.IF "$(DEF8EXPORTFILE)"==""
1976cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
1977cdf0e10cSrcweirDEF8EXPORTFILE=$(MISC)/$(SHL8VERSIONMAP:b)_$(SHL8TARGET).dxp
1978cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1979cdf0e10cSrcweir$(DEF8EXPORTFILE) : $(SHL8OBJS) $(SHL8LIBS)
1980cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
1981cdf0e10cSrcweir
1982cdf0e10cSrcweir$(DEF8EXPORTFILE) : $(SHL8VERSIONMAP)
1983cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
1984cdf0e10cSrcweir.IF "$(COM)"=="GCC"
1985cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
1986cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
1987cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
1988cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
1989cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL8OBJS) \
1990cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL8LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
1991cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
1992cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
1993cdf0e10cSrcweir# exported symbols list
1994cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
1995cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
1996cdf0e10cSrcweir
1997cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
1998cdf0e10cSrcweir
1999cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
2000cdf0e10cSrcweirDEF8EXPORTFILE=$(MISC)/$(SHL8VERSIONMAP:b)_$(SHL8TARGET).dxp
2001cdf0e10cSrcweir$(DEF8EXPORTFILE) : $(SHL8VERSIONMAP)
2002cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
2003cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
2004cdf0e10cSrcweir
2005cdf0e10cSrcweir.ENDIF			# "$(DEF8EXPORTFILE)"==""
2006cdf0e10cSrcweir.ENDIF			# "$(SHL8VERSIONMAP)"!=""
2007cdf0e10cSrcweir
2008cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
2009cdf0e10cSrcweir
2010cdf0e10cSrcweirDEF8FILTER=$(SOLARENV)/inc/dummy.flt
2011cdf0e10cSrcweir
2012cdf0e10cSrcweirRMHACK8:=$(RM)
2013cdf0e10cSrcweir
2014cdf0e10cSrcweir.IF "$(DEF8CEXP)"!=""
2015cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF8CEXP)
2016cdf0e10cSrcweir.ENDIF
2017cdf0e10cSrcweir
2018cdf0e10cSrcweir.IF "$(link_always)"==""
2019cdf0e10cSrcweir$(DEF8TARGETN) : \
2020cdf0e10cSrcweir		$(DEF8DEPN) \
2021cdf0e10cSrcweir		$(DEF8EXPORTFILE)
2022cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
2023cdf0e10cSrcweir$(DEF8TARGETN) .PHONY :
2024cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
2025cdf0e10cSrcweir	@-$(RM) $@.tmpfile
2026cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
2027cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL8TARGETN:f)$(EMQ)" 								 >$@.tmpfile
2028cdf0e10cSrcweir.IF "$(COM)"!="GCC"
2029cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
2030cdf0e10cSrcweir.ENDIF
2031cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
2032cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
2033cdf0e10cSrcweir#	getversioninfo fuer alle!!
2034cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
2035cdf0e10cSrcweir.ENDIF
2036cdf0e10cSrcweir.IF "$(DEFLIB8NAME)"!=""
2037cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2038cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL8TARGET).exp
2039cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL8TARGET).exp --export-all-symbols \
2040cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB8NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
2041cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL8TARGET).exp | sed '/^;/d' >>$@.tmpfile
2042cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL8TARGET).exp
2043cdf0e10cSrcweir.ELSE
2044cdf0e10cSrcweir.IF "$(SHL8USE_EXPORTS)"==""
2045cdf0e10cSrcweir	@-$(RMHACK8) $(MISC)/$(SHL8TARGET).exp
2046cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL8TARGET).exp $(SLB)/$(DEFLIB8NAME).lib
2047cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL8TARGET).flt $(MISC)/$(SHL8TARGET).exp			   >>$@.tmpfile
2048cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK8) $(MISC)/$(SHL8TARGET).exp
2049cdf0e10cSrcweir.ELSE			# "$(SHL8USE_EXPORTS)"==""
2050cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB8NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL8TARGET).direct
2051cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF8FILTER) $(MISC)/$(SHL8TARGET).direct >>$@.tmpfile
2052cdf0e10cSrcweir.ENDIF			# "$(SHL8USE_EXPORTS)"==""
2053cdf0e10cSrcweir.ENDIF
2054cdf0e10cSrcweir.ENDIF				# "$(DEFLIB8NAME)"!=""
2055cdf0e10cSrcweir.IF "$(DEF8EXPORT1)"!=""
2056cdf0e10cSrcweir	@echo $(DEF8EXPORT1)										>>$@.tmpfile
2057cdf0e10cSrcweir.ENDIF
2058cdf0e10cSrcweir.IF "$(DEF8EXPORT2)"!=""
2059cdf0e10cSrcweir	@echo $(DEF8EXPORT2)										>>$@.tmpfile
2060cdf0e10cSrcweir.ENDIF
2061cdf0e10cSrcweir.IF "$(DEF8EXPORT3)"!=""
2062cdf0e10cSrcweir	@echo $(DEF8EXPORT3)										>>$@.tmpfile
2063cdf0e10cSrcweir.ENDIF
2064cdf0e10cSrcweir.IF "$(DEF8EXPORT4)"!=""
2065cdf0e10cSrcweir	@echo $(DEF8EXPORT4)										>>$@.tmpfile
2066cdf0e10cSrcweir.ENDIF
2067cdf0e10cSrcweir.IF "$(DEF8EXPORT5)"!=""
2068cdf0e10cSrcweir	@echo $(DEF8EXPORT5)										>>$@.tmpfile
2069cdf0e10cSrcweir.ENDIF
2070cdf0e10cSrcweir.IF "$(DEF8EXPORT6)"!=""
2071cdf0e10cSrcweir	@echo $(DEF8EXPORT6)										>>$@.tmpfile
2072cdf0e10cSrcweir.ENDIF
2073cdf0e10cSrcweir.IF "$(DEF8EXPORT7)"!=""
2074cdf0e10cSrcweir	@echo $(DEF8EXPORT7)										>>$@.tmpfile
2075cdf0e10cSrcweir.ENDIF
2076cdf0e10cSrcweir.IF "$(DEF8EXPORT8)"!=""
2077cdf0e10cSrcweir	@echo $(DEF8EXPORT8)										>>$@.tmpfile
2078cdf0e10cSrcweir.ENDIF
2079cdf0e10cSrcweir.IF "$(DEF8EXPORT9)"!=""
2080cdf0e10cSrcweir	@echo $(DEF8EXPORT9)										>>$@.tmpfile
2081cdf0e10cSrcweir.ENDIF
2082cdf0e10cSrcweir.IF "$(DEF8EXPORT10)"!=""
2083cdf0e10cSrcweir	@echo $(DEF8EXPORT10)										>>$@.tmpfile
2084cdf0e10cSrcweir.ENDIF
2085cdf0e10cSrcweir.IF "$(DEF8EXPORT11)"!=""
2086cdf0e10cSrcweir	@echo $(DEF8EXPORT11)										>>$@.tmpfile
2087cdf0e10cSrcweir.ENDIF
2088cdf0e10cSrcweir.IF "$(DEF8EXPORT12)"!=""
2089cdf0e10cSrcweir	@echo $(DEF8EXPORT12)										>>$@.tmpfile
2090cdf0e10cSrcweir.ENDIF
2091cdf0e10cSrcweir.IF "$(DEF8EXPORT13)"!=""
2092cdf0e10cSrcweir	@echo $(DEF8EXPORT13)										>>$@.tmpfile
2093cdf0e10cSrcweir.ENDIF
2094cdf0e10cSrcweir.IF "$(DEF8EXPORT14)"!=""
2095cdf0e10cSrcweir	@echo $(DEF8EXPORT14)										>>$@.tmpfile
2096cdf0e10cSrcweir.ENDIF
2097cdf0e10cSrcweir.IF "$(DEF8EXPORT15)"!=""
2098cdf0e10cSrcweir	@echo $(DEF8EXPORT15)										>>$@.tmpfile
2099cdf0e10cSrcweir.ENDIF
2100cdf0e10cSrcweir.IF "$(DEF8EXPORT16)"!=""
2101cdf0e10cSrcweir	@echo $(DEF8EXPORT16)										>>$@.tmpfile
2102cdf0e10cSrcweir.ENDIF
2103cdf0e10cSrcweir.IF "$(DEF8EXPORT17)"!=""
2104cdf0e10cSrcweir	@echo $(DEF8EXPORT17)										>>$@.tmpfile
2105cdf0e10cSrcweir.ENDIF
2106cdf0e10cSrcweir.IF "$(DEF8EXPORT18)"!=""
2107cdf0e10cSrcweir	@echo $(DEF8EXPORT18)										>>$@.tmpfile
2108cdf0e10cSrcweir.ENDIF
2109cdf0e10cSrcweir.IF "$(DEF8EXPORT19)"!=""
2110cdf0e10cSrcweir	@echo $(DEF8EXPORT19)										>>$@.tmpfile
2111cdf0e10cSrcweir.ENDIF
2112cdf0e10cSrcweir.IF "$(DEF8EXPORT20)"!=""
2113cdf0e10cSrcweir	@echo $(DEF8EXPORT20)										>>$@.tmpfile
2114cdf0e10cSrcweir.ENDIF
2115cdf0e10cSrcweir.IF "$(DEF8EXPORTFILE)"!=""
2116cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2117cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF8EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
2118cdf0e10cSrcweir.ELSE
2119cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF8EXPORTFILE) >> $@.tmpfile
2120cdf0e10cSrcweir.ENDIF
2121cdf0e10cSrcweir.ENDIF
2122cdf0e10cSrcweir	@-$(RM) $@
2123cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
2124cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
2125cdf0e10cSrcweir
2126cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
2127cdf0e10cSrcweir
2128cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
2129cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
2130*534c536dSYuri DarioSHL8TARGET8=$(shell @fix_shl.cmd $(SHL8TARGETN:f))
2131cdf0e10cSrcweir
2132cdf0e10cSrcweirDEF8FILTER=$(SOLARENV)/inc/dummy.flt
2133cdf0e10cSrcweirDEF8NAMELIST=$(foreach,i,$(DEFLIB8NAME) $(SLB)/$(i).lib)
2134cdf0e10cSrcweir
2135cdf0e10cSrcweir.IF "$(link_always)"==""
2136cdf0e10cSrcweir$(DEF8TARGETN) : \
2137cdf0e10cSrcweir		$(DEF8DEPN) \
2138cdf0e10cSrcweir		$(DEF8EXPORTFILE)
2139cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
2140cdf0e10cSrcweir$(DEF8TARGETN) .PHONY :
2141cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
2142cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
2143cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
2144cdf0e10cSrcweir	@echo LIBRARY	  $(SHL8TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
2145cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
2146cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
2147cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
2148cdf0e10cSrcweir#	getversioninfo fuer alle!!
2149cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
2150cdf0e10cSrcweir.ENDIF
2151cdf0e10cSrcweir
2152cdf0e10cSrcweir.IF "$(DEFLIB8NAME)"!=""
2153cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB8NAME).lib
2154cdf0e10cSrcweir	@+emxexpr $(DEF8NAMELIST) | fix_exp_file >> $@.tmp_ord
2155cdf0e10cSrcweir.ENDIF				# "$(DEFLIB8NAME)"!=""
2156cdf0e10cSrcweir
2157cdf0e10cSrcweir.IF "$(DEF8EXPORT1)"!=""
2158cdf0e10cSrcweir	@echo $(DEF8EXPORT1)										>>$@.tmpfile
2159cdf0e10cSrcweir.ENDIF
2160cdf0e10cSrcweir.IF "$(DEF8EXPORT2)"!=""
2161cdf0e10cSrcweir	@echo $(DEF8EXPORT2)										>>$@.tmpfile
2162cdf0e10cSrcweir.ENDIF
2163cdf0e10cSrcweir.IF "$(DEF8EXPORT3)"!=""
2164cdf0e10cSrcweir	@echo $(DEF8EXPORT3)										>>$@.tmpfile
2165cdf0e10cSrcweir.ENDIF
2166cdf0e10cSrcweir.IF "$(DEF8EXPORT4)"!=""
2167cdf0e10cSrcweir	@echo $(DEF8EXPORT4)										>>$@.tmpfile
2168cdf0e10cSrcweir.ENDIF
2169cdf0e10cSrcweir.IF "$(DEF8EXPORT5)"!=""
2170cdf0e10cSrcweir	@echo $(DEF8EXPORT5)										>>$@.tmpfile
2171cdf0e10cSrcweir.ENDIF
2172cdf0e10cSrcweir.IF "$(DEF8EXPORT6)"!=""
2173cdf0e10cSrcweir	@echo $(DEF8EXPORT6)										>>$@.tmpfile
2174cdf0e10cSrcweir.ENDIF
2175cdf0e10cSrcweir.IF "$(DEF8EXPORT7)"!=""
2176cdf0e10cSrcweir	@echo $(DEF8EXPORT7)										>>$@.tmpfile
2177cdf0e10cSrcweir.ENDIF
2178cdf0e10cSrcweir.IF "$(DEF8EXPORT8)"!=""
2179cdf0e10cSrcweir	@echo $(DEF8EXPORT8)										>>$@.tmpfile
2180cdf0e10cSrcweir.ENDIF
2181cdf0e10cSrcweir.IF "$(DEF8EXPORT9)"!=""
2182cdf0e10cSrcweir	@echo $(DEF8EXPORT9)										>>$@.tmpfile
2183cdf0e10cSrcweir.ENDIF
2184cdf0e10cSrcweir.IF "$(DEF8EXPORT10)"!=""
2185cdf0e10cSrcweir	@echo $(DEF8EXPORT10)										>>$@.tmpfile
2186cdf0e10cSrcweir.ENDIF
2187cdf0e10cSrcweir.IF "$(DEF8EXPORT11)"!=""
2188cdf0e10cSrcweir	@echo $(DEF8EXPORT11)										>>$@.tmpfile
2189cdf0e10cSrcweir.ENDIF
2190cdf0e10cSrcweir.IF "$(DEF8EXPORT12)"!=""
2191cdf0e10cSrcweir	@echo $(DEF8EXPORT12)										>>$@.tmpfile
2192cdf0e10cSrcweir.ENDIF
2193cdf0e10cSrcweir.IF "$(DEF8EXPORT13)"!=""
2194cdf0e10cSrcweir	@echo $(DEF8EXPORT13)										>>$@.tmpfile
2195cdf0e10cSrcweir.ENDIF
2196cdf0e10cSrcweir.IF "$(DEF8EXPORT14)"!=""
2197cdf0e10cSrcweir	@echo $(DEF8EXPORT14)										>>$@.tmpfile
2198cdf0e10cSrcweir.ENDIF
2199cdf0e10cSrcweir.IF "$(DEF8EXPORT15)"!=""
2200cdf0e10cSrcweir	@echo $(DEF8EXPORT15)										>>$@.tmpfile
2201cdf0e10cSrcweir.ENDIF
2202cdf0e10cSrcweir.IF "$(DEF8EXPORT16)"!=""
2203cdf0e10cSrcweir	@echo $(DEF8EXPORT16)										>>$@.tmpfile
2204cdf0e10cSrcweir.ENDIF
2205cdf0e10cSrcweir.IF "$(DEF8EXPORT17)"!=""
2206cdf0e10cSrcweir	@echo $(DEF8EXPORT17)										>>$@.tmpfile
2207cdf0e10cSrcweir.ENDIF
2208cdf0e10cSrcweir.IF "$(DEF8EXPORT18)"!=""
2209cdf0e10cSrcweir	@echo $(DEF8EXPORT18)										>>$@.tmpfile
2210cdf0e10cSrcweir.ENDIF
2211cdf0e10cSrcweir.IF "$(DEF8EXPORT19)"!=""
2212cdf0e10cSrcweir	@echo $(DEF8EXPORT19)										>>$@.tmpfile
2213cdf0e10cSrcweir.ENDIF
2214cdf0e10cSrcweir.IF "$(DEF8EXPORT20)"!=""
2215cdf0e10cSrcweir	@echo $(DEF8EXPORT20)										>>$@.tmpfile
2216cdf0e10cSrcweir.ENDIF
2217cdf0e10cSrcweir.IF "$(DEF8EXPORTFILE)"!=""
2218cdf0e10cSrcweir	@fix_def_file < $(DEF8EXPORTFILE) >> $@.tmp_ord
2219cdf0e10cSrcweir.ENDIF
2220cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
2221cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
2222cdf0e10cSrcweir	@+-$(RM) $@
2223cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
2224cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
2225cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
2226cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL8IMPLIBN:s/.lib/.a/) $@
2227cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL8IMPLIBN) $(SHL8IMPLIBN:s/.lib/.a/)
2228cdf0e10cSrcweir
2229cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
2230cdf0e10cSrcweir
2231cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
2232cdf0e10cSrcweir$(DEF8TARGETN): \
2233cdf0e10cSrcweir		$(DEF8DEPN) \
2234cdf0e10cSrcweir		$(DEF8EXPORTFILE)
2235cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
2236cdf0e10cSrcweir.ENDIF
2237cdf0e10cSrcweir.ENDIF			# "$(DEF8TARGETN)"!=""
2238cdf0e10cSrcweir
2239cdf0e10cSrcweir
2240cdf0e10cSrcweir# Anweisungen fuer das Linken
2241cdf0e10cSrcweir# unroll begin
2242cdf0e10cSrcweir
2243cdf0e10cSrcweir.IF "$(DEF9TARGETN)"!=""
2244cdf0e10cSrcweir
2245cdf0e10cSrcweir#to make intuitiv naming work
2246cdf0e10cSrcweir.IF "$(DEF9LIBNAME)"!=""
2247cdf0e10cSrcweirDEFLIB9NAME*=$(DEF9LIBNAME)
2248cdf0e10cSrcweir.ENDIF			# "$(DEF9LIBNAME)"!=""
2249cdf0e10cSrcweir
2250cdf0e10cSrcweir.IF "$(DEFLIB9NAME)"!=""
2251cdf0e10cSrcweirDEF9DEPN+=$(foreach,i,$(DEFLIB9NAME) $(SLB)/$(i).lib)
2252cdf0e10cSrcweir.ENDIF
2253cdf0e10cSrcweir
2254cdf0e10cSrcweir.IF "$(SHL9VERSIONMAP)"!=""
2255cdf0e10cSrcweir.IF "$(DEF9EXPORTFILE)"==""
2256cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
2257cdf0e10cSrcweirDEF9EXPORTFILE=$(MISC)/$(SHL9VERSIONMAP:b)_$(SHL9TARGET).dxp
2258cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2259cdf0e10cSrcweir$(DEF9EXPORTFILE) : $(SHL9OBJS) $(SHL9LIBS)
2260cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
2261cdf0e10cSrcweir
2262cdf0e10cSrcweir$(DEF9EXPORTFILE) : $(SHL9VERSIONMAP)
2263cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
2264cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2265cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
2266cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
2267cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
2268cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
2269cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL9OBJS) \
2270cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL9LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
2271cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
2272cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
2273cdf0e10cSrcweir# exported symbols list
2274cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
2275cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
2276cdf0e10cSrcweir
2277cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
2278cdf0e10cSrcweir
2279cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
2280cdf0e10cSrcweirDEF9EXPORTFILE=$(MISC)/$(SHL9VERSIONMAP:b)_$(SHL9TARGET).dxp
2281cdf0e10cSrcweir$(DEF9EXPORTFILE) : $(SHL9VERSIONMAP)
2282cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
2283cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
2284cdf0e10cSrcweir
2285cdf0e10cSrcweir.ENDIF			# "$(DEF9EXPORTFILE)"==""
2286cdf0e10cSrcweir.ENDIF			# "$(SHL9VERSIONMAP)"!=""
2287cdf0e10cSrcweir
2288cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
2289cdf0e10cSrcweir
2290cdf0e10cSrcweirDEF9FILTER=$(SOLARENV)/inc/dummy.flt
2291cdf0e10cSrcweir
2292cdf0e10cSrcweirRMHACK9:=$(RM)
2293cdf0e10cSrcweir
2294cdf0e10cSrcweir.IF "$(DEF9CEXP)"!=""
2295cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF9CEXP)
2296cdf0e10cSrcweir.ENDIF
2297cdf0e10cSrcweir
2298cdf0e10cSrcweir.IF "$(link_always)"==""
2299cdf0e10cSrcweir$(DEF9TARGETN) : \
2300cdf0e10cSrcweir		$(DEF9DEPN) \
2301cdf0e10cSrcweir		$(DEF9EXPORTFILE)
2302cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
2303cdf0e10cSrcweir$(DEF9TARGETN) .PHONY :
2304cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
2305cdf0e10cSrcweir	@-$(RM) $@.tmpfile
2306cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
2307cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL9TARGETN:f)$(EMQ)" 								 >$@.tmpfile
2308cdf0e10cSrcweir.IF "$(COM)"!="GCC"
2309cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
2310cdf0e10cSrcweir.ENDIF
2311cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
2312cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
2313cdf0e10cSrcweir#	getversioninfo fuer alle!!
2314cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
2315cdf0e10cSrcweir.ENDIF
2316cdf0e10cSrcweir.IF "$(DEFLIB9NAME)"!=""
2317cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2318cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL9TARGET).exp
2319cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL9TARGET).exp --export-all-symbols \
2320cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB9NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
2321cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL9TARGET).exp | sed '/^;/d' >>$@.tmpfile
2322cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL9TARGET).exp
2323cdf0e10cSrcweir.ELSE
2324cdf0e10cSrcweir.IF "$(SHL9USE_EXPORTS)"==""
2325cdf0e10cSrcweir	@-$(RMHACK9) $(MISC)/$(SHL9TARGET).exp
2326cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL9TARGET).exp $(SLB)/$(DEFLIB9NAME).lib
2327cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL9TARGET).flt $(MISC)/$(SHL9TARGET).exp			   >>$@.tmpfile
2328cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK9) $(MISC)/$(SHL9TARGET).exp
2329cdf0e10cSrcweir.ELSE			# "$(SHL9USE_EXPORTS)"==""
2330cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB9NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL9TARGET).direct
2331cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF9FILTER) $(MISC)/$(SHL9TARGET).direct >>$@.tmpfile
2332cdf0e10cSrcweir.ENDIF			# "$(SHL9USE_EXPORTS)"==""
2333cdf0e10cSrcweir.ENDIF
2334cdf0e10cSrcweir.ENDIF				# "$(DEFLIB9NAME)"!=""
2335cdf0e10cSrcweir.IF "$(DEF9EXPORT1)"!=""
2336cdf0e10cSrcweir	@echo $(DEF9EXPORT1)										>>$@.tmpfile
2337cdf0e10cSrcweir.ENDIF
2338cdf0e10cSrcweir.IF "$(DEF9EXPORT2)"!=""
2339cdf0e10cSrcweir	@echo $(DEF9EXPORT2)										>>$@.tmpfile
2340cdf0e10cSrcweir.ENDIF
2341cdf0e10cSrcweir.IF "$(DEF9EXPORT3)"!=""
2342cdf0e10cSrcweir	@echo $(DEF9EXPORT3)										>>$@.tmpfile
2343cdf0e10cSrcweir.ENDIF
2344cdf0e10cSrcweir.IF "$(DEF9EXPORT4)"!=""
2345cdf0e10cSrcweir	@echo $(DEF9EXPORT4)										>>$@.tmpfile
2346cdf0e10cSrcweir.ENDIF
2347cdf0e10cSrcweir.IF "$(DEF9EXPORT5)"!=""
2348cdf0e10cSrcweir	@echo $(DEF9EXPORT5)										>>$@.tmpfile
2349cdf0e10cSrcweir.ENDIF
2350cdf0e10cSrcweir.IF "$(DEF9EXPORT6)"!=""
2351cdf0e10cSrcweir	@echo $(DEF9EXPORT6)										>>$@.tmpfile
2352cdf0e10cSrcweir.ENDIF
2353cdf0e10cSrcweir.IF "$(DEF9EXPORT7)"!=""
2354cdf0e10cSrcweir	@echo $(DEF9EXPORT7)										>>$@.tmpfile
2355cdf0e10cSrcweir.ENDIF
2356cdf0e10cSrcweir.IF "$(DEF9EXPORT8)"!=""
2357cdf0e10cSrcweir	@echo $(DEF9EXPORT8)										>>$@.tmpfile
2358cdf0e10cSrcweir.ENDIF
2359cdf0e10cSrcweir.IF "$(DEF9EXPORT9)"!=""
2360cdf0e10cSrcweir	@echo $(DEF9EXPORT9)										>>$@.tmpfile
2361cdf0e10cSrcweir.ENDIF
2362cdf0e10cSrcweir.IF "$(DEF9EXPORT10)"!=""
2363cdf0e10cSrcweir	@echo $(DEF9EXPORT10)										>>$@.tmpfile
2364cdf0e10cSrcweir.ENDIF
2365cdf0e10cSrcweir.IF "$(DEF9EXPORT11)"!=""
2366cdf0e10cSrcweir	@echo $(DEF9EXPORT11)										>>$@.tmpfile
2367cdf0e10cSrcweir.ENDIF
2368cdf0e10cSrcweir.IF "$(DEF9EXPORT12)"!=""
2369cdf0e10cSrcweir	@echo $(DEF9EXPORT12)										>>$@.tmpfile
2370cdf0e10cSrcweir.ENDIF
2371cdf0e10cSrcweir.IF "$(DEF9EXPORT13)"!=""
2372cdf0e10cSrcweir	@echo $(DEF9EXPORT13)										>>$@.tmpfile
2373cdf0e10cSrcweir.ENDIF
2374cdf0e10cSrcweir.IF "$(DEF9EXPORT14)"!=""
2375cdf0e10cSrcweir	@echo $(DEF9EXPORT14)										>>$@.tmpfile
2376cdf0e10cSrcweir.ENDIF
2377cdf0e10cSrcweir.IF "$(DEF9EXPORT15)"!=""
2378cdf0e10cSrcweir	@echo $(DEF9EXPORT15)										>>$@.tmpfile
2379cdf0e10cSrcweir.ENDIF
2380cdf0e10cSrcweir.IF "$(DEF9EXPORT16)"!=""
2381cdf0e10cSrcweir	@echo $(DEF9EXPORT16)										>>$@.tmpfile
2382cdf0e10cSrcweir.ENDIF
2383cdf0e10cSrcweir.IF "$(DEF9EXPORT17)"!=""
2384cdf0e10cSrcweir	@echo $(DEF9EXPORT17)										>>$@.tmpfile
2385cdf0e10cSrcweir.ENDIF
2386cdf0e10cSrcweir.IF "$(DEF9EXPORT18)"!=""
2387cdf0e10cSrcweir	@echo $(DEF9EXPORT18)										>>$@.tmpfile
2388cdf0e10cSrcweir.ENDIF
2389cdf0e10cSrcweir.IF "$(DEF9EXPORT19)"!=""
2390cdf0e10cSrcweir	@echo $(DEF9EXPORT19)										>>$@.tmpfile
2391cdf0e10cSrcweir.ENDIF
2392cdf0e10cSrcweir.IF "$(DEF9EXPORT20)"!=""
2393cdf0e10cSrcweir	@echo $(DEF9EXPORT20)										>>$@.tmpfile
2394cdf0e10cSrcweir.ENDIF
2395cdf0e10cSrcweir.IF "$(DEF9EXPORTFILE)"!=""
2396cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2397cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF9EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
2398cdf0e10cSrcweir.ELSE
2399cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF9EXPORTFILE) >> $@.tmpfile
2400cdf0e10cSrcweir.ENDIF
2401cdf0e10cSrcweir.ENDIF
2402cdf0e10cSrcweir	@-$(RM) $@
2403cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
2404cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
2405cdf0e10cSrcweir
2406cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
2407cdf0e10cSrcweir
2408cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
2409cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
2410*534c536dSYuri DarioSHL9TARGET8=$(shell @fix_shl.cmd $(SHL9TARGETN:f))
2411cdf0e10cSrcweir
2412cdf0e10cSrcweirDEF9FILTER=$(SOLARENV)/inc/dummy.flt
2413cdf0e10cSrcweirDEF9NAMELIST=$(foreach,i,$(DEFLIB9NAME) $(SLB)/$(i).lib)
2414cdf0e10cSrcweir
2415cdf0e10cSrcweir.IF "$(link_always)"==""
2416cdf0e10cSrcweir$(DEF9TARGETN) : \
2417cdf0e10cSrcweir		$(DEF9DEPN) \
2418cdf0e10cSrcweir		$(DEF9EXPORTFILE)
2419cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
2420cdf0e10cSrcweir$(DEF9TARGETN) .PHONY :
2421cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
2422cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
2423cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
2424cdf0e10cSrcweir	@echo LIBRARY	  $(SHL9TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
2425cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
2426cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
2427cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
2428cdf0e10cSrcweir#	getversioninfo fuer alle!!
2429cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
2430cdf0e10cSrcweir.ENDIF
2431cdf0e10cSrcweir
2432cdf0e10cSrcweir.IF "$(DEFLIB9NAME)"!=""
2433cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB9NAME).lib
2434cdf0e10cSrcweir	@+emxexpr $(DEF9NAMELIST) | fix_exp_file >> $@.tmp_ord
2435cdf0e10cSrcweir.ENDIF				# "$(DEFLIB9NAME)"!=""
2436cdf0e10cSrcweir
2437cdf0e10cSrcweir.IF "$(DEF9EXPORT1)"!=""
2438cdf0e10cSrcweir	@echo $(DEF9EXPORT1)										>>$@.tmpfile
2439cdf0e10cSrcweir.ENDIF
2440cdf0e10cSrcweir.IF "$(DEF9EXPORT2)"!=""
2441cdf0e10cSrcweir	@echo $(DEF9EXPORT2)										>>$@.tmpfile
2442cdf0e10cSrcweir.ENDIF
2443cdf0e10cSrcweir.IF "$(DEF9EXPORT3)"!=""
2444cdf0e10cSrcweir	@echo $(DEF9EXPORT3)										>>$@.tmpfile
2445cdf0e10cSrcweir.ENDIF
2446cdf0e10cSrcweir.IF "$(DEF9EXPORT4)"!=""
2447cdf0e10cSrcweir	@echo $(DEF9EXPORT4)										>>$@.tmpfile
2448cdf0e10cSrcweir.ENDIF
2449cdf0e10cSrcweir.IF "$(DEF9EXPORT5)"!=""
2450cdf0e10cSrcweir	@echo $(DEF9EXPORT5)										>>$@.tmpfile
2451cdf0e10cSrcweir.ENDIF
2452cdf0e10cSrcweir.IF "$(DEF9EXPORT6)"!=""
2453cdf0e10cSrcweir	@echo $(DEF9EXPORT6)										>>$@.tmpfile
2454cdf0e10cSrcweir.ENDIF
2455cdf0e10cSrcweir.IF "$(DEF9EXPORT7)"!=""
2456cdf0e10cSrcweir	@echo $(DEF9EXPORT7)										>>$@.tmpfile
2457cdf0e10cSrcweir.ENDIF
2458cdf0e10cSrcweir.IF "$(DEF9EXPORT8)"!=""
2459cdf0e10cSrcweir	@echo $(DEF9EXPORT8)										>>$@.tmpfile
2460cdf0e10cSrcweir.ENDIF
2461cdf0e10cSrcweir.IF "$(DEF9EXPORT9)"!=""
2462cdf0e10cSrcweir	@echo $(DEF9EXPORT9)										>>$@.tmpfile
2463cdf0e10cSrcweir.ENDIF
2464cdf0e10cSrcweir.IF "$(DEF9EXPORT10)"!=""
2465cdf0e10cSrcweir	@echo $(DEF9EXPORT10)										>>$@.tmpfile
2466cdf0e10cSrcweir.ENDIF
2467cdf0e10cSrcweir.IF "$(DEF9EXPORT11)"!=""
2468cdf0e10cSrcweir	@echo $(DEF9EXPORT11)										>>$@.tmpfile
2469cdf0e10cSrcweir.ENDIF
2470cdf0e10cSrcweir.IF "$(DEF9EXPORT12)"!=""
2471cdf0e10cSrcweir	@echo $(DEF9EXPORT12)										>>$@.tmpfile
2472cdf0e10cSrcweir.ENDIF
2473cdf0e10cSrcweir.IF "$(DEF9EXPORT13)"!=""
2474cdf0e10cSrcweir	@echo $(DEF9EXPORT13)										>>$@.tmpfile
2475cdf0e10cSrcweir.ENDIF
2476cdf0e10cSrcweir.IF "$(DEF9EXPORT14)"!=""
2477cdf0e10cSrcweir	@echo $(DEF9EXPORT14)										>>$@.tmpfile
2478cdf0e10cSrcweir.ENDIF
2479cdf0e10cSrcweir.IF "$(DEF9EXPORT15)"!=""
2480cdf0e10cSrcweir	@echo $(DEF9EXPORT15)										>>$@.tmpfile
2481cdf0e10cSrcweir.ENDIF
2482cdf0e10cSrcweir.IF "$(DEF9EXPORT16)"!=""
2483cdf0e10cSrcweir	@echo $(DEF9EXPORT16)										>>$@.tmpfile
2484cdf0e10cSrcweir.ENDIF
2485cdf0e10cSrcweir.IF "$(DEF9EXPORT17)"!=""
2486cdf0e10cSrcweir	@echo $(DEF9EXPORT17)										>>$@.tmpfile
2487cdf0e10cSrcweir.ENDIF
2488cdf0e10cSrcweir.IF "$(DEF9EXPORT18)"!=""
2489cdf0e10cSrcweir	@echo $(DEF9EXPORT18)										>>$@.tmpfile
2490cdf0e10cSrcweir.ENDIF
2491cdf0e10cSrcweir.IF "$(DEF9EXPORT19)"!=""
2492cdf0e10cSrcweir	@echo $(DEF9EXPORT19)										>>$@.tmpfile
2493cdf0e10cSrcweir.ENDIF
2494cdf0e10cSrcweir.IF "$(DEF9EXPORT20)"!=""
2495cdf0e10cSrcweir	@echo $(DEF9EXPORT20)										>>$@.tmpfile
2496cdf0e10cSrcweir.ENDIF
2497cdf0e10cSrcweir.IF "$(DEF9EXPORTFILE)"!=""
2498cdf0e10cSrcweir	@fix_def_file < $(DEF9EXPORTFILE) >> $@.tmp_ord
2499cdf0e10cSrcweir.ENDIF
2500cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
2501cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
2502cdf0e10cSrcweir	@+-$(RM) $@
2503cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
2504cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
2505cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
2506cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL9IMPLIBN:s/.lib/.a/) $@
2507cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL9IMPLIBN) $(SHL9IMPLIBN:s/.lib/.a/)
2508cdf0e10cSrcweir
2509cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
2510cdf0e10cSrcweir
2511cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
2512cdf0e10cSrcweir$(DEF9TARGETN): \
2513cdf0e10cSrcweir		$(DEF9DEPN) \
2514cdf0e10cSrcweir		$(DEF9EXPORTFILE)
2515cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
2516cdf0e10cSrcweir.ENDIF
2517cdf0e10cSrcweir.ENDIF			# "$(DEF9TARGETN)"!=""
2518cdf0e10cSrcweir
2519cdf0e10cSrcweir
2520cdf0e10cSrcweir# Anweisungen fuer das Linken
2521cdf0e10cSrcweir# unroll begin
2522cdf0e10cSrcweir
2523cdf0e10cSrcweir.IF "$(DEF10TARGETN)"!=""
2524cdf0e10cSrcweir
2525cdf0e10cSrcweir#to make intuitiv naming work
2526cdf0e10cSrcweir.IF "$(DEF10LIBNAME)"!=""
2527cdf0e10cSrcweirDEFLIB10NAME*=$(DEF10LIBNAME)
2528cdf0e10cSrcweir.ENDIF			# "$(DEF10LIBNAME)"!=""
2529cdf0e10cSrcweir
2530cdf0e10cSrcweir.IF "$(DEFLIB10NAME)"!=""
2531cdf0e10cSrcweirDEF10DEPN+=$(foreach,i,$(DEFLIB10NAME) $(SLB)/$(i).lib)
2532cdf0e10cSrcweir.ENDIF
2533cdf0e10cSrcweir
2534cdf0e10cSrcweir.IF "$(SHL10VERSIONMAP)"!=""
2535cdf0e10cSrcweir.IF "$(DEF10EXPORTFILE)"==""
2536cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
2537cdf0e10cSrcweirDEF10EXPORTFILE=$(MISC)/$(SHL10VERSIONMAP:b)_$(SHL10TARGET).dxp
2538cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2539cdf0e10cSrcweir$(DEF10EXPORTFILE) : $(SHL10OBJS) $(SHL10LIBS)
2540cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
2541cdf0e10cSrcweir
2542cdf0e10cSrcweir$(DEF10EXPORTFILE) : $(SHL10VERSIONMAP)
2543cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
2544cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2545cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) -v "\*\|?" $@ | $(SED) -e 's@#.*@@' > $@.exported-symbols
2546cdf0e10cSrcweir	$(COMMAND_ECHO)-$(GREP) "\*\|?" $@ > $@.symbols-regexp
2547cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
2548cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library
2549cdf0e10cSrcweir	$(COMMAND_ECHO)nm -gP $(SHL10OBJS) \
2550cdf0e10cSrcweir		`$(TYPE) /dev/null $(foreach,j,$(SHL10LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
2551cdf0e10cSrcweir		| $(SOLARENV)/bin/addsym-mingw.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
2552cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated
2553cdf0e10cSrcweir# exported symbols list
2554cdf0e10cSrcweir	$(COMMAND_ECHO)$(RENAME) $@.exported-symbols $@
2555cdf0e10cSrcweir.ENDIF # .IF "$(COM)"=="GCC"
2556cdf0e10cSrcweir
2557cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
2558cdf0e10cSrcweir
2559cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
2560cdf0e10cSrcweirDEF10EXPORTFILE=$(MISC)/$(SHL10VERSIONMAP:b)_$(SHL10TARGET).dxp
2561cdf0e10cSrcweir$(DEF10EXPORTFILE) : $(SHL10VERSIONMAP)
2562cdf0e10cSrcweir	$(TYPE) $< | $(AWK) -f $(SOLARENV)/bin/getcsym.awk > $@
2563cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
2564cdf0e10cSrcweir
2565cdf0e10cSrcweir.ENDIF			# "$(DEF10EXPORTFILE)"==""
2566cdf0e10cSrcweir.ENDIF			# "$(SHL10VERSIONMAP)"!=""
2567cdf0e10cSrcweir
2568cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
2569cdf0e10cSrcweir
2570cdf0e10cSrcweirDEF10FILTER=$(SOLARENV)/inc/dummy.flt
2571cdf0e10cSrcweir
2572cdf0e10cSrcweirRMHACK10:=$(RM)
2573cdf0e10cSrcweir
2574cdf0e10cSrcweir.IF "$(DEF10CEXP)"!=""
2575cdf0e10cSrcweirEXPORT_ALL_SWITCH=-A $(DEF10CEXP)
2576cdf0e10cSrcweir.ENDIF
2577cdf0e10cSrcweir
2578cdf0e10cSrcweir.IF "$(link_always)"==""
2579cdf0e10cSrcweir$(DEF10TARGETN) : \
2580cdf0e10cSrcweir		$(DEF10DEPN) \
2581cdf0e10cSrcweir		$(DEF10EXPORTFILE)
2582cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
2583cdf0e10cSrcweir$(DEF10TARGETN) .PHONY :
2584cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
2585cdf0e10cSrcweir	@-$(RM) $@.tmpfile
2586cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
2587cdf0e10cSrcweir	@echo LIBRARY	  $(EMQ)"$(SHL10TARGETN:f)$(EMQ)" 								 >$@.tmpfile
2588cdf0e10cSrcweir.IF "$(COM)"!="GCC"
2589cdf0e10cSrcweir	@echo HEAPSIZE	  0 											>>$@.tmpfile
2590cdf0e10cSrcweir.ENDIF
2591cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
2592cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
2593cdf0e10cSrcweir#	getversioninfo fuer alle!!
2594cdf0e10cSrcweir	@echo GetVersionInfo		>>$@.tmpfile
2595cdf0e10cSrcweir.ENDIF
2596cdf0e10cSrcweir.IF "$(DEFLIB10NAME)"!=""
2597cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2598cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL10TARGET).exp
2599cdf0e10cSrcweir	$(COMMAND_ECHO)dlltool --output-def $(MISC)/$(SHL10TARGET).exp --export-all-symbols \
2600cdf0e10cSrcweir		`$(TYPE) $(foreach,i,$(DEFLIB10NAME) $(SLB)/$(i).lib) | sed s#$(ROUT)#$(PRJ)/$(ROUT)#g`
2601cdf0e10cSrcweir	$(COMMAND_ECHO)tail --lines +3 $(MISC)/$(SHL10TARGET).exp | sed '/^;/d' >>$@.tmpfile
2602cdf0e10cSrcweir	@-$(RM) $(MISC)/$(SHL10TARGET).exp
2603cdf0e10cSrcweir.ELSE
2604cdf0e10cSrcweir.IF "$(SHL10USE_EXPORTS)"==""
2605cdf0e10cSrcweir	@-$(RMHACK10) $(MISC)/$(SHL10TARGET).exp
2606cdf0e10cSrcweir	@$(LIBMGR) -EXTRACT:/ /OUT:$(MISC)/$(SHL10TARGET).exp $(SLB)/$(DEFLIB10NAME).lib
2607cdf0e10cSrcweir	@$(LDUMP2) -N $(EXPORT_ALL_SWITCH) -F $(MISC)/$(SHL10TARGET).flt $(MISC)/$(SHL10TARGET).exp			   >>$@.tmpfile
2608cdf0e10cSrcweir	$(COMMAND_ECHO)$(RMHACK10) $(MISC)/$(SHL10TARGET).exp
2609cdf0e10cSrcweir.ELSE			# "$(SHL10USE_EXPORTS)"==""
2610cdf0e10cSrcweir	@$(DUMPBIN) -DIRECTIVES  $(foreach,i,$(DEFLIB10NAME) $(SLB)/$(i).lib) | $(GREP) EXPORT: > $(MISC)/$(SHL10TARGET).direct
2611cdf0e10cSrcweir	@$(LDUMP2) -N -D $(EXPORT_ALL_SWITCH) -F $(DEF10FILTER) $(MISC)/$(SHL10TARGET).direct >>$@.tmpfile
2612cdf0e10cSrcweir.ENDIF			# "$(SHL10USE_EXPORTS)"==""
2613cdf0e10cSrcweir.ENDIF
2614cdf0e10cSrcweir.ENDIF				# "$(DEFLIB10NAME)"!=""
2615cdf0e10cSrcweir.IF "$(DEF10EXPORT1)"!=""
2616cdf0e10cSrcweir	@echo $(DEF10EXPORT1)										>>$@.tmpfile
2617cdf0e10cSrcweir.ENDIF
2618cdf0e10cSrcweir.IF "$(DEF10EXPORT2)"!=""
2619cdf0e10cSrcweir	@echo $(DEF10EXPORT2)										>>$@.tmpfile
2620cdf0e10cSrcweir.ENDIF
2621cdf0e10cSrcweir.IF "$(DEF10EXPORT3)"!=""
2622cdf0e10cSrcweir	@echo $(DEF10EXPORT3)										>>$@.tmpfile
2623cdf0e10cSrcweir.ENDIF
2624cdf0e10cSrcweir.IF "$(DEF10EXPORT4)"!=""
2625cdf0e10cSrcweir	@echo $(DEF10EXPORT4)										>>$@.tmpfile
2626cdf0e10cSrcweir.ENDIF
2627cdf0e10cSrcweir.IF "$(DEF10EXPORT5)"!=""
2628cdf0e10cSrcweir	@echo $(DEF10EXPORT5)										>>$@.tmpfile
2629cdf0e10cSrcweir.ENDIF
2630cdf0e10cSrcweir.IF "$(DEF10EXPORT6)"!=""
2631cdf0e10cSrcweir	@echo $(DEF10EXPORT6)										>>$@.tmpfile
2632cdf0e10cSrcweir.ENDIF
2633cdf0e10cSrcweir.IF "$(DEF10EXPORT7)"!=""
2634cdf0e10cSrcweir	@echo $(DEF10EXPORT7)										>>$@.tmpfile
2635cdf0e10cSrcweir.ENDIF
2636cdf0e10cSrcweir.IF "$(DEF10EXPORT8)"!=""
2637cdf0e10cSrcweir	@echo $(DEF10EXPORT8)										>>$@.tmpfile
2638cdf0e10cSrcweir.ENDIF
2639cdf0e10cSrcweir.IF "$(DEF10EXPORT9)"!=""
2640cdf0e10cSrcweir	@echo $(DEF10EXPORT9)										>>$@.tmpfile
2641cdf0e10cSrcweir.ENDIF
2642cdf0e10cSrcweir.IF "$(DEF10EXPORT10)"!=""
2643cdf0e10cSrcweir	@echo $(DEF10EXPORT10)										>>$@.tmpfile
2644cdf0e10cSrcweir.ENDIF
2645cdf0e10cSrcweir.IF "$(DEF10EXPORT11)"!=""
2646cdf0e10cSrcweir	@echo $(DEF10EXPORT11)										>>$@.tmpfile
2647cdf0e10cSrcweir.ENDIF
2648cdf0e10cSrcweir.IF "$(DEF10EXPORT12)"!=""
2649cdf0e10cSrcweir	@echo $(DEF10EXPORT12)										>>$@.tmpfile
2650cdf0e10cSrcweir.ENDIF
2651cdf0e10cSrcweir.IF "$(DEF10EXPORT13)"!=""
2652cdf0e10cSrcweir	@echo $(DEF10EXPORT13)										>>$@.tmpfile
2653cdf0e10cSrcweir.ENDIF
2654cdf0e10cSrcweir.IF "$(DEF10EXPORT14)"!=""
2655cdf0e10cSrcweir	@echo $(DEF10EXPORT14)										>>$@.tmpfile
2656cdf0e10cSrcweir.ENDIF
2657cdf0e10cSrcweir.IF "$(DEF10EXPORT15)"!=""
2658cdf0e10cSrcweir	@echo $(DEF10EXPORT15)										>>$@.tmpfile
2659cdf0e10cSrcweir.ENDIF
2660cdf0e10cSrcweir.IF "$(DEF10EXPORT16)"!=""
2661cdf0e10cSrcweir	@echo $(DEF10EXPORT16)										>>$@.tmpfile
2662cdf0e10cSrcweir.ENDIF
2663cdf0e10cSrcweir.IF "$(DEF10EXPORT17)"!=""
2664cdf0e10cSrcweir	@echo $(DEF10EXPORT17)										>>$@.tmpfile
2665cdf0e10cSrcweir.ENDIF
2666cdf0e10cSrcweir.IF "$(DEF10EXPORT18)"!=""
2667cdf0e10cSrcweir	@echo $(DEF10EXPORT18)										>>$@.tmpfile
2668cdf0e10cSrcweir.ENDIF
2669cdf0e10cSrcweir.IF "$(DEF10EXPORT19)"!=""
2670cdf0e10cSrcweir	@echo $(DEF10EXPORT19)										>>$@.tmpfile
2671cdf0e10cSrcweir.ENDIF
2672cdf0e10cSrcweir.IF "$(DEF10EXPORT20)"!=""
2673cdf0e10cSrcweir	@echo $(DEF10EXPORT20)										>>$@.tmpfile
2674cdf0e10cSrcweir.ENDIF
2675cdf0e10cSrcweir.IF "$(DEF10EXPORTFILE)"!=""
2676cdf0e10cSrcweir.IF "$(COM)"=="GCC"
2677cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF10EXPORTFILE) | sed -e s:PRIVATE:: >> $@.tmpfile
2678cdf0e10cSrcweir.ELSE
2679cdf0e10cSrcweir	$(COMMAND_ECHO)$(TYPE) $(DEF10EXPORTFILE) >> $@.tmpfile
2680cdf0e10cSrcweir.ENDIF
2681cdf0e10cSrcweir.ENDIF
2682cdf0e10cSrcweir	@-$(RM) $@
2683cdf0e10cSrcweir	@$(RENAME) $@.tmpfile $@
2684cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
2685cdf0e10cSrcweir
2686cdf0e10cSrcweir.IF "$(GUI)"=="OS2"
2687cdf0e10cSrcweir
2688cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script
2689cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule()
2690*534c536dSYuri DarioSHL10TARGET8=$(shell @fix_shl.cmd $(SHL10TARGETN:f))
2691cdf0e10cSrcweir
2692cdf0e10cSrcweirDEF10FILTER=$(SOLARENV)/inc/dummy.flt
2693cdf0e10cSrcweirDEF10NAMELIST=$(foreach,i,$(DEFLIB10NAME) $(SLB)/$(i).lib)
2694cdf0e10cSrcweir
2695cdf0e10cSrcweir.IF "$(link_always)"==""
2696cdf0e10cSrcweir$(DEF10TARGETN) : \
2697cdf0e10cSrcweir		$(DEF10DEPN) \
2698cdf0e10cSrcweir		$(DEF10EXPORTFILE)
2699cdf0e10cSrcweir.ELSE			# "$(link_always)"==""
2700cdf0e10cSrcweir$(DEF10TARGETN) .PHONY :
2701cdf0e10cSrcweir.ENDIF			# "$(link_always)"==""
2702cdf0e10cSrcweir	@+-$(RM) $@.tmpfile
2703cdf0e10cSrcweir	@echo "Making:    module definition file" $(@:f)
2704cdf0e10cSrcweir	@echo LIBRARY	  $(SHL10TARGET8) INITINSTANCE TERMINSTANCE	 >$@.tmpfile
2705cdf0e10cSrcweir	@echo DATA MULTIPLE	 >>$@.tmpfile
2706cdf0e10cSrcweir	@echo EXPORTS													>>$@.tmpfile
2707cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!=""
2708cdf0e10cSrcweir#	getversioninfo fuer alle!!
2709cdf0e10cSrcweir	@echo _GetVersionInfo		>$@.tmp_ord
2710cdf0e10cSrcweir.ENDIF
2711cdf0e10cSrcweir
2712cdf0e10cSrcweir.IF "$(DEFLIB10NAME)"!=""
2713cdf0e10cSrcweir	@+echo $(SLB)/$(DEFLIB10NAME).lib
2714cdf0e10cSrcweir	@+emxexpr $(DEF10NAMELIST) | fix_exp_file >> $@.tmp_ord
2715cdf0e10cSrcweir.ENDIF				# "$(DEFLIB10NAME)"!=""
2716cdf0e10cSrcweir
2717cdf0e10cSrcweir.IF "$(DEF10EXPORT1)"!=""
2718cdf0e10cSrcweir	@echo $(DEF10EXPORT1)										>>$@.tmpfile
2719cdf0e10cSrcweir.ENDIF
2720cdf0e10cSrcweir.IF "$(DEF10EXPORT2)"!=""
2721cdf0e10cSrcweir	@echo $(DEF10EXPORT2)										>>$@.tmpfile
2722cdf0e10cSrcweir.ENDIF
2723cdf0e10cSrcweir.IF "$(DEF10EXPORT3)"!=""
2724cdf0e10cSrcweir	@echo $(DEF10EXPORT3)										>>$@.tmpfile
2725cdf0e10cSrcweir.ENDIF
2726cdf0e10cSrcweir.IF "$(DEF10EXPORT4)"!=""
2727cdf0e10cSrcweir	@echo $(DEF10EXPORT4)										>>$@.tmpfile
2728cdf0e10cSrcweir.ENDIF
2729cdf0e10cSrcweir.IF "$(DEF10EXPORT5)"!=""
2730cdf0e10cSrcweir	@echo $(DEF10EXPORT5)										>>$@.tmpfile
2731cdf0e10cSrcweir.ENDIF
2732cdf0e10cSrcweir.IF "$(DEF10EXPORT6)"!=""
2733cdf0e10cSrcweir	@echo $(DEF10EXPORT6)										>>$@.tmpfile
2734cdf0e10cSrcweir.ENDIF
2735cdf0e10cSrcweir.IF "$(DEF10EXPORT7)"!=""
2736cdf0e10cSrcweir	@echo $(DEF10EXPORT7)										>>$@.tmpfile
2737cdf0e10cSrcweir.ENDIF
2738cdf0e10cSrcweir.IF "$(DEF10EXPORT8)"!=""
2739cdf0e10cSrcweir	@echo $(DEF10EXPORT8)										>>$@.tmpfile
2740cdf0e10cSrcweir.ENDIF
2741cdf0e10cSrcweir.IF "$(DEF10EXPORT9)"!=""
2742cdf0e10cSrcweir	@echo $(DEF10EXPORT9)										>>$@.tmpfile
2743cdf0e10cSrcweir.ENDIF
2744cdf0e10cSrcweir.IF "$(DEF10EXPORT10)"!=""
2745cdf0e10cSrcweir	@echo $(DEF10EXPORT10)										>>$@.tmpfile
2746cdf0e10cSrcweir.ENDIF
2747cdf0e10cSrcweir.IF "$(DEF10EXPORT11)"!=""
2748cdf0e10cSrcweir	@echo $(DEF10EXPORT11)										>>$@.tmpfile
2749cdf0e10cSrcweir.ENDIF
2750cdf0e10cSrcweir.IF "$(DEF10EXPORT12)"!=""
2751cdf0e10cSrcweir	@echo $(DEF10EXPORT12)										>>$@.tmpfile
2752cdf0e10cSrcweir.ENDIF
2753cdf0e10cSrcweir.IF "$(DEF10EXPORT13)"!=""
2754cdf0e10cSrcweir	@echo $(DEF10EXPORT13)										>>$@.tmpfile
2755cdf0e10cSrcweir.ENDIF
2756cdf0e10cSrcweir.IF "$(DEF10EXPORT14)"!=""
2757cdf0e10cSrcweir	@echo $(DEF10EXPORT14)										>>$@.tmpfile
2758cdf0e10cSrcweir.ENDIF
2759cdf0e10cSrcweir.IF "$(DEF10EXPORT15)"!=""
2760cdf0e10cSrcweir	@echo $(DEF10EXPORT15)										>>$@.tmpfile
2761cdf0e10cSrcweir.ENDIF
2762cdf0e10cSrcweir.IF "$(DEF10EXPORT16)"!=""
2763cdf0e10cSrcweir	@echo $(DEF10EXPORT16)										>>$@.tmpfile
2764cdf0e10cSrcweir.ENDIF
2765cdf0e10cSrcweir.IF "$(DEF10EXPORT17)"!=""
2766cdf0e10cSrcweir	@echo $(DEF10EXPORT17)										>>$@.tmpfile
2767cdf0e10cSrcweir.ENDIF
2768cdf0e10cSrcweir.IF "$(DEF10EXPORT18)"!=""
2769cdf0e10cSrcweir	@echo $(DEF10EXPORT18)										>>$@.tmpfile
2770cdf0e10cSrcweir.ENDIF
2771cdf0e10cSrcweir.IF "$(DEF10EXPORT19)"!=""
2772cdf0e10cSrcweir	@echo $(DEF10EXPORT19)										>>$@.tmpfile
2773cdf0e10cSrcweir.ENDIF
2774cdf0e10cSrcweir.IF "$(DEF10EXPORT20)"!=""
2775cdf0e10cSrcweir	@echo $(DEF10EXPORT20)										>>$@.tmpfile
2776cdf0e10cSrcweir.ENDIF
2777cdf0e10cSrcweir.IF "$(DEF10EXPORTFILE)"!=""
2778cdf0e10cSrcweir	@fix_def_file < $(DEF10EXPORTFILE) >> $@.tmp_ord
2779cdf0e10cSrcweir.ENDIF
2780cdf0e10cSrcweir	@sort < $@.tmp_ord | uniq > $@.exptmpfile
2781cdf0e10cSrcweir	@fix_def_ord < $@.exptmpfile >> $@.tmpfile
2782cdf0e10cSrcweir	@+-$(RM) $@
2783cdf0e10cSrcweir	$(COMMAND_ECHO)+$(RENAME) $@.tmpfile $@
2784cdf0e10cSrcweir	@+-$(RM) $@.tmp_ord
2785cdf0e10cSrcweir	@+-$(RM) $@.exptmpfile
2786cdf0e10cSrcweir	$(COMMAND_ECHO)+$(IMPLIB) $(IMPLIBFLAGS) $(SHL10IMPLIBN:s/.lib/.a/) $@
2787cdf0e10cSrcweir	$(COMMAND_ECHO)+emxomf -o $(SHL10IMPLIBN) $(SHL10IMPLIBN:s/.lib/.a/)
2788cdf0e10cSrcweir
2789cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="OS2"
2790cdf0e10cSrcweir
2791cdf0e10cSrcweir.IF "$(GUI)"=="UNX"
2792cdf0e10cSrcweir$(DEF10TARGETN): \
2793cdf0e10cSrcweir		$(DEF10DEPN) \
2794cdf0e10cSrcweir		$(DEF10EXPORTFILE)
2795cdf0e10cSrcweir	@echo just a dummy for UNIX > $@
2796cdf0e10cSrcweir.ENDIF
2797cdf0e10cSrcweir.ENDIF			# "$(DEF10TARGETN)"!=""
2798cdf0e10cSrcweir
2799cdf0e10cSrcweir
2800cdf0e10cSrcweir# Anweisungen fuer das Linken
2801