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