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