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