3 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
4 APP1DEF
= $(MISC
)/$(APP1TARGET
).def
7 .IF
"$(APP1LINKTYPE)" != ""
8 #must be either STATIC or SHARED
9 APP1LINKTYPEFLAG
=$(APPLINK
$(APP1LINKTYPE
))
13 .IF
"$(APP1CODETYPE)"=="C"
15 APP1STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
16 APP1LINKFLAGS
+=$(LINKCFLAGS
)
17 .ELSE
# "$(APP1CODETYPE)"=="C"
19 APP1STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
20 APP1LINKFLAGS
+=$(LINKFLAGS
)
21 .ENDIF
# "$(APP1CODETYPE)"=="C"
24 LINKFLAGSRUNPATH_
$(APP1RPATH
)*=/ERROR
:/Bad_APP1RPATH_value
25 .IF
"$(OS)" != "MACOSX"
26 APP1LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP1RPATH
))
29 .IF
"$(APP1STACK)" != ""
30 .IF
"$(LINKFLAGSTACK)" != ""
31 APP1STACKN
=$(LINKFLAGSTACK
)$(APP1STACK
)
37 .IF
"$(APP1NOSAL)"==""
38 .IF
"$(TARGETTYPE)" == "GUI"
39 APP1OBJS
+= $(STDOBJVCL
)
43 .IF
"$(GUI)$(COM)" == "WNTGCC"
45 .IF
"$(APP1LINKRES)" != "" ||
"$(APP1RES)" != ""
46 APP1RESO
=$(MISC
)/$(APP1TARGET
:b
)_res.o
51 APP1DEPN
+:=$(APP1DEPNU
)
55 .IF
"$(APP1TARGETN)"!=""
57 .IF
"$(APP1PRODUCTNAME)"!=""
58 APP1PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP1PRODUCTNAME
)\"
59 .ENDIF
# "$(APP1PRODUCTNAME)"!=""
62 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
64 $(MISC
)/$(APP1TARGET
)_linkinc.ls .PHONY
:
66 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP1LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
67 .ENDIF
#"$(APP1LIBS)"!=""
70 LINKINCTARGETS
+=$(MISC
)/$(APP1TARGETN
:b
)_linkinc.ls
71 $(APP1TARGETN
) : $(LINKINCTARGETS
)
72 .ENDIF
# "$(linkinc)"!=""
74 # Allow for target specific LIBSALCPPRT override
75 APP1LIBSALCPPRT
*=$(LIBSALCPPRT
)
78 _APP1IMP_ORD
= $(APP1STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP1STDLIBS
:^
"$(LB)/")
79 APP1IMP_ORD
= $(foreach,i
,$(_APP1IMP_ORD
) $(shell @
-ls
$i))
84 $(APP1TARGETN
): $(APP1OBJS
) $(APP1LIBS
) \
87 $(APP1ICON
) $(APP1DEPN
) $(USE_APP1DEF
)
88 @echo
------------------------------
89 @echo
"Making: " $(@
:f
)
93 @
-$(RM
) $(MISC
)/$(@
:b
).list
94 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
95 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
96 @echo
$(STDSLO
) $(APP1OBJS
:s
/.obj
/.o
/) \
97 `cat /dev/null $(APP1LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
98 @echo
-n
$(APP1LINKER
) $(APP1LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
99 $(APP1LINKTYPEFLAG
) $(APP1STDLIBS
) $(APP1STDLIB
) $(STDLIB1
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
100 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
101 `cat $(MISC)/$(TARGET).$(@:b)_1.cmd` \
102 >> $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
103 .IF
"$(VERBOSE)" == "TRUE"
104 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
106 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
107 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
108 # libraries at runtime
109 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
110 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
112 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
114 .IF
"$(TARGETTYPE)"=="GUI"
115 @echo
"Making: " $(@
:f
).app
116 @macosx-create-bundle
$@
117 .ENDIF
# "$(TARGETTYPE)"=="GUI"
118 .ELSE
# "$(OS)"=="MACOSX"
120 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
121 @echo
$(APP1LINKER
) $(APP1LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
122 $(APP1OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_1.cmd
123 @cat $(mktmp /dev/null $(APP1LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_1.cmd
124 @echo
$(APP1LINKTYPEFLAG
) $(APP1LIBSALCPPRT
) $(APP1STDLIBS
) $(APP1STDLIB
) $(STDLIB1
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
125 .IF
"$(VERBOSE)" == "TRUE"
126 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
128 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
129 .IF
"$(VERBOSE)" == "TRUE"
132 .ENDIF
# "$(OS)"=="MACOSX"
134 .IF
"$(GUI)" == "WNT"
136 .IF
"$(APP1LINKRES)" != ""
137 @@
-$(RM
) $(MISC
)/$(APP1LINKRES
:b
).rc
138 .IF
"$(APP1ICON)" != ""
139 @
-echo
1 ICON
$(EMQ
)"$(APP1ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP1LINKRES
:b
).rc
140 .ENDIF
# "$(APP1ICON)" != ""
141 .IF
"$(APP1VERINFO)" != ""
142 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP1LINKRES:b).rc
143 @
-echo
$(EMQ
)#include $(EMQ)"$(APP1VERINFO)$(EMQ)" >> $(MISC)/$(APP1LINKRES:b).rc
144 .ENDIF
# "$(APP1VERINFO)" != ""
145 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP1PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP1LINKRES
:b
).rc
146 .ENDIF
# "$(APP1LINKRES)" != ""
147 .IF
"$(COM)" == "GCC"
149 .IF
"$(APP1LINKRES)" != "" ||
"$(APP1RES)" != ""
150 @cat
$(APP1LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP1RES
)) > $(MISC
)/$(@
:b
)_all.res
151 windres
$(MISC
)/$(@
:b
)_all.res
$(APP1RESO
)
153 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
154 $(APP1BASEX
) $(APP1STACKN
) -o
$@
$(APP1OBJS
) \
155 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP1RESO
) \
156 `$(TYPE) /dev/null $(APP1LIBS) | sed s#$(ROUT)#$(OUT)#g` \
157 $(APP_LINKTYPE
) $(APP1LIBSALCPPRT
) \
158 -Wl
,--start-group
$(APP1STDLIBS
) -Wl
,--end-group
$(APP1STDLIB
) \
159 $(STDLIB1
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
160 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
161 .IF
"$(VERBOSE)" == "TRUE"
162 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
164 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
166 .ELSE
# "$(COM)" == "GCC"
167 .IF
"$(linkinc)" == ""
168 $(COMMAND_ECHO
)$(APP1LINKER
) @
$(mktmp \
170 $(LINKFLAGSAPP
) $(APP1BASEX
) \
173 -map
:$(MISC
)/{$(subst,/,_
$(APP1TARGET
)).map
} \
180 $(APP1STDLIB
) $(STDLIB1
) \
182 @
-echo linking
$@.manifest ...
183 .IF
"$(VISTA_MANIFEST)"!=""
184 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
185 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
187 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
188 .ENDIF
# "$(VISTA_MANIFEST)"!=""
189 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
190 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
192 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP1TARGET
).lnk
193 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP1TARGET
).lst
194 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
195 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
196 type
$(mktmp
,$(MISC
)\
$(APP1TARGET
).lst
198 $(LINKFLAGSAPP
) $(APP1BASEX
) \
207 $(APP1STDLIB
) $(STDLIB1
))
208 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP1TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP1TARGET
).lst
209 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP1TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP1TARGET
).lst
>> $(MISC
)/$(APP1TARGET
).lnk
$(FI
)
210 $(COMMAND_ECHO
)$(SED
)$(APP1LINKER
) @
$(MISC
)\
$(APP1TARGET
).lnk
211 .ENDIF
# "$(linkinc)" == ""
212 .ENDIF
# "$(COM)" == "GCC"
213 .IF
"$(APP1TARGET)" == "loader"
214 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
215 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
216 $(COMMAND_ECHO
)$(RM
) $@
217 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
218 .ENDIF
# "$(TARGET)" == "setup"
220 .ENDIF
# "$(GUI)" == "WNT"
222 .IF
"$(GUI)" == "OS2"
223 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
224 .IF
"$(APP1LINKRES)" != ""
225 @
+-$(RM
) $(MISC
)/$(APP1LINKRES
:b
).rc
>& $(NULLDEV
)
226 .IF
"$(APP1ICON)" != ""
227 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP1ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP1LINKRES
:b
).rc
228 .ENDIF
# "$(APP1ICON)" != ""
229 .IF
"$(APP1VERINFO)" != ""
230 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP1LINKRES:b).rc
231 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP1VERINFO)$(EMQ)" >> $(MISC)/$(APP1LINKRES:b).rc
232 .ENDIF
# "$(APP1VERINFO)" != ""
233 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP1PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP1LINKRES
:b
).rc
234 .ENDIF
# "$(APP1LINKRES)" != ""
236 .IF
"$(TARGETTYPE)" == "GUI"
237 @echo NAME
$(APP1TARGET
) WINDOWAPI
> $(MISC
)/$(APP1TARGET
).def
240 .IF
"$(VERBOSE)" == "TRUE"
241 @
+echo
$(APP1LINKFLAGS
) \
242 $(LINKFLAGSAPP
) $(APP1BASEX
) \
246 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
253 $(APP1STDLIBS
:^
"-l") \
254 $(APP1STDLIB
:^
"-l") $(STDLIB1
:^
"-l")
256 $(COMMAND_ECHO
)$(APP1LINKER
) -v \
258 $(LINKFLAGSAPP
) $(APP1BASEX
) \
262 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
269 $(APP1STDLIBS
:^
"-l") \
270 $(APP1STDLIB
:^
"-l") $(STDLIB1
:^
"-l")
273 .IF
"$(APP1TARGET)" == "loader"
274 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
275 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
276 $(COMMAND_ECHO
)+$(RM
) $@
277 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
278 .ENDIF
# "$(TARGET)" == "setup"
280 .ENDIF
# "$(GUI)" == "OS2"
282 .ENDIF
# "$(APP1TARGETN)"!=""
285 # Instruction for linking
288 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
289 APP2DEF
= $(MISC
)/$(APP2TARGET
).def
292 .IF
"$(APP2LINKTYPE)" != ""
293 #must be either STATIC or SHARED
294 APP2LINKTYPEFLAG
=$(APPLINK
$(APP2LINKTYPE
))
298 .IF
"$(APP2CODETYPE)"=="C"
300 APP2STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
301 APP2LINKFLAGS
+=$(LINKCFLAGS
)
302 .ELSE
# "$(APP2CODETYPE)"=="C"
304 APP2STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
305 APP2LINKFLAGS
+=$(LINKFLAGS
)
306 .ENDIF
# "$(APP2CODETYPE)"=="C"
309 LINKFLAGSRUNPATH_
$(APP2RPATH
)*=/ERROR
:/Bad_APP2RPATH_value
310 .IF
"$(OS)" != "MACOSX"
311 APP2LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP2RPATH
))
314 .IF
"$(APP2STACK)" != ""
315 .IF
"$(LINKFLAGSTACK)" != ""
316 APP2STACKN
=$(LINKFLAGSTACK
)$(APP2STACK
)
322 .IF
"$(APP2NOSAL)"==""
323 .IF
"$(TARGETTYPE)" == "GUI"
324 APP2OBJS
+= $(STDOBJVCL
)
328 .IF
"$(GUI)$(COM)" == "WNTGCC"
330 .IF
"$(APP2LINKRES)" != "" ||
"$(APP2RES)" != ""
331 APP2RESO
=$(MISC
)/$(APP2TARGET
:b
)_res.o
335 .IF
"$(GUI)" == "UNX"
336 APP2DEPN
+:=$(APP2DEPNU
)
340 .IF
"$(APP2TARGETN)"!=""
342 .IF
"$(APP2PRODUCTNAME)"!=""
343 APP2PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP2PRODUCTNAME
)\"
344 .ENDIF
# "$(APP2PRODUCTNAME)"!=""
347 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
348 .IF
"$(APP2LIBS)"!=""
349 $(MISC
)/$(APP2TARGET
)_linkinc.ls .PHONY
:
351 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP2LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
352 .ENDIF
#"$(APP2LIBS)"!=""
355 LINKINCTARGETS
+=$(MISC
)/$(APP2TARGETN
:b
)_linkinc.ls
356 $(APP2TARGETN
) : $(LINKINCTARGETS
)
357 .ENDIF
# "$(linkinc)"!=""
359 # Allow for target specific LIBSALCPPRT override
360 APP2LIBSALCPPRT
*=$(LIBSALCPPRT
)
362 .IF
"$(GUI)" == "OS2"
363 _APP2IMP_ORD
= $(APP2STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP2STDLIBS
:^
"$(LB)/")
364 APP2IMP_ORD
= $(foreach,i
,$(_APP2IMP_ORD
) $(shell @
-ls
$i))
369 $(APP2TARGETN
): $(APP2OBJS
) $(APP2LIBS
) \
372 $(APP2ICON
) $(APP2DEPN
) $(USE_APP2DEF
)
373 @echo
------------------------------
374 @echo
"Making: " $(@
:f
)
376 .IF
"$(OS)"=="MACOSX"
378 @
-$(RM
) $(MISC
)/$(@
:b
).list
379 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
380 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
381 @echo
$(STDSLO
) $(APP2OBJS
:s
/.obj
/.o
/) \
382 `cat /dev/null $(APP2LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
383 @echo
-n
$(APP2LINKER
) $(APP2LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
384 $(APP2LINKTYPEFLAG
) $(APP2STDLIBS
) $(APP2STDLIB
) $(STDLIB2
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
385 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
386 `cat $(MISC)/$(TARGET).$(@:b)_2.cmd` \
387 >> $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
388 .IF
"$(VERBOSE)" == "TRUE"
389 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
391 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
392 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
393 # libraries at runtime
394 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
395 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
397 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
399 .IF
"$(TARGETTYPE)"=="GUI"
400 @echo
"Making: " $(@
:f
).app
401 @macosx-create-bundle
$@
402 .ENDIF
# "$(TARGETTYPE)"=="GUI"
403 .ELSE
# "$(OS)"=="MACOSX"
405 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
406 @echo
$(APP2LINKER
) $(APP2LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
407 $(APP2OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_2.cmd
408 @cat $(mktmp /dev/null $(APP2LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_2.cmd
409 @echo
$(APP2LINKTYPEFLAG
) $(APP2LIBSALCPPRT
) $(APP2STDLIBS
) $(APP2STDLIB
) $(STDLIB2
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
410 .IF
"$(VERBOSE)" == "TRUE"
411 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
413 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
414 .IF
"$(VERBOSE)" == "TRUE"
417 .ENDIF
# "$(OS)"=="MACOSX"
419 .IF
"$(GUI)" == "WNT"
421 .IF
"$(APP2LINKRES)" != ""
422 @@
-$(RM
) $(MISC
)/$(APP2LINKRES
:b
).rc
423 .IF
"$(APP2ICON)" != ""
424 @
-echo
1 ICON
$(EMQ
)"$(APP2ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP2LINKRES
:b
).rc
425 .ENDIF
# "$(APP2ICON)" != ""
426 .IF
"$(APP2VERINFO)" != ""
427 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP2LINKRES:b).rc
428 @
-echo
$(EMQ
)#include $(EMQ)"$(APP2VERINFO)$(EMQ)" >> $(MISC)/$(APP2LINKRES:b).rc
429 .ENDIF
# "$(APP2VERINFO)" != ""
430 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP2PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP2LINKRES
:b
).rc
431 .ENDIF
# "$(APP2LINKRES)" != ""
432 .IF
"$(COM)" == "GCC"
434 .IF
"$(APP2LINKRES)" != "" ||
"$(APP2RES)" != ""
435 @cat
$(APP2LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP2RES
)) > $(MISC
)/$(@
:b
)_all.res
436 windres
$(MISC
)/$(@
:b
)_all.res
$(APP2RESO
)
438 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
439 $(APP2BASEX
) $(APP2STACKN
) -o
$@
$(APP2OBJS
) \
440 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP2RESO
) \
441 `$(TYPE) /dev/null $(APP2LIBS) | sed s#$(ROUT)#$(OUT)#g` \
442 $(APP_LINKTYPE
) $(APP2LIBSALCPPRT
) \
443 -Wl
,--start-group
$(APP2STDLIBS
) -Wl
,--end-group
$(APP2STDLIB
) \
444 $(STDLIB2
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
445 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
446 .IF
"$(VERBOSE)" == "TRUE"
447 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
449 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
451 .ELSE
# "$(COM)" == "GCC"
452 .IF
"$(linkinc)" == ""
453 $(COMMAND_ECHO
)$(APP2LINKER
) @
$(mktmp \
455 $(LINKFLAGSAPP
) $(APP2BASEX
) \
458 -map
:$(MISC
)/{$(subst,/,_
$(APP2TARGET
)).map
} \
465 $(APP2STDLIB
) $(STDLIB2
) \
467 @
-echo linking
$@.manifest ...
468 .IF
"$(VISTA_MANIFEST)"!=""
469 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
470 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
472 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
473 .ENDIF
# "$(VISTA_MANIFEST)"!=""
474 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
475 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
477 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP2TARGET
).lnk
478 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP2TARGET
).lst
479 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
480 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
481 type
$(mktmp
,$(MISC
)\
$(APP2TARGET
).lst
483 $(LINKFLAGSAPP
) $(APP2BASEX
) \
492 $(APP2STDLIB
) $(STDLIB2
))
493 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP2TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP2TARGET
).lst
494 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP2TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP2TARGET
).lst
>> $(MISC
)/$(APP2TARGET
).lnk
$(FI
)
495 $(COMMAND_ECHO
)$(SED
)$(APP2LINKER
) @
$(MISC
)\
$(APP2TARGET
).lnk
496 .ENDIF
# "$(linkinc)" == ""
497 .ENDIF
# "$(COM)" == "GCC"
498 .IF
"$(APP2TARGET)" == "loader"
499 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
500 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
501 $(COMMAND_ECHO
)$(RM
) $@
502 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
503 .ENDIF
# "$(TARGET)" == "setup"
505 .ENDIF
# "$(GUI)" == "WNT"
507 .IF
"$(GUI)" == "OS2"
508 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
509 .IF
"$(APP2LINKRES)" != ""
510 @
+-$(RM
) $(MISC
)/$(APP2LINKRES
:b
).rc
>& $(NULLDEV
)
511 .IF
"$(APP2ICON)" != ""
512 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP2ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP2LINKRES
:b
).rc
513 .ENDIF
# "$(APP2ICON)" != ""
514 .IF
"$(APP2VERINFO)" != ""
515 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP2LINKRES:b).rc
516 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP2VERINFO)$(EMQ)" >> $(MISC)/$(APP2LINKRES:b).rc
517 .ENDIF
# "$(APP2VERINFO)" != ""
518 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP2PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP2LINKRES
:b
).rc
519 .ENDIF
# "$(APP2LINKRES)" != ""
521 .IF
"$(TARGETTYPE)" == "GUI"
522 @echo NAME
$(APP2TARGET
) WINDOWAPI
> $(MISC
)/$(APP2TARGET
).def
525 .IF
"$(VERBOSE)" == "TRUE"
526 @
+echo
$(APP2LINKFLAGS
) \
527 $(LINKFLAGSAPP
) $(APP2BASEX
) \
531 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
538 $(APP2STDLIBS
:^
"-l") \
539 $(APP2STDLIB
:^
"-l") $(STDLIB2
:^
"-l")
541 $(COMMAND_ECHO
)$(APP2LINKER
) -v \
543 $(LINKFLAGSAPP
) $(APP2BASEX
) \
547 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
554 $(APP2STDLIBS
:^
"-l") \
555 $(APP2STDLIB
:^
"-l") $(STDLIB2
:^
"-l")
558 .IF
"$(APP2TARGET)" == "loader"
559 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
560 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
561 $(COMMAND_ECHO
)+$(RM
) $@
562 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
563 .ENDIF
# "$(TARGET)" == "setup"
565 .ENDIF
# "$(GUI)" == "OS2"
567 .ENDIF
# "$(APP2TARGETN)"!=""
570 # Instruction for linking
573 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
574 APP3DEF
= $(MISC
)/$(APP3TARGET
).def
577 .IF
"$(APP3LINKTYPE)" != ""
578 #must be either STATIC or SHARED
579 APP3LINKTYPEFLAG
=$(APPLINK
$(APP3LINKTYPE
))
583 .IF
"$(APP3CODETYPE)"=="C"
585 APP3STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
586 APP3LINKFLAGS
+=$(LINKCFLAGS
)
587 .ELSE
# "$(APP3CODETYPE)"=="C"
589 APP3STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
590 APP3LINKFLAGS
+=$(LINKFLAGS
)
591 .ENDIF
# "$(APP3CODETYPE)"=="C"
594 LINKFLAGSRUNPATH_
$(APP3RPATH
)*=/ERROR
:/Bad_APP3RPATH_value
595 .IF
"$(OS)" != "MACOSX"
596 APP3LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP3RPATH
))
599 .IF
"$(APP3STACK)" != ""
600 .IF
"$(LINKFLAGSTACK)" != ""
601 APP3STACKN
=$(LINKFLAGSTACK
)$(APP3STACK
)
607 .IF
"$(APP3NOSAL)"==""
608 .IF
"$(TARGETTYPE)" == "GUI"
609 APP3OBJS
+= $(STDOBJVCL
)
613 .IF
"$(GUI)$(COM)" == "WNTGCC"
615 .IF
"$(APP3LINKRES)" != "" ||
"$(APP3RES)" != ""
616 APP3RESO
=$(MISC
)/$(APP3TARGET
:b
)_res.o
620 .IF
"$(GUI)" == "UNX"
621 APP3DEPN
+:=$(APP3DEPNU
)
625 .IF
"$(APP3TARGETN)"!=""
627 .IF
"$(APP3PRODUCTNAME)"!=""
628 APP3PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP3PRODUCTNAME
)\"
629 .ENDIF
# "$(APP3PRODUCTNAME)"!=""
632 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
633 .IF
"$(APP3LIBS)"!=""
634 $(MISC
)/$(APP3TARGET
)_linkinc.ls .PHONY
:
636 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP3LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
637 .ENDIF
#"$(APP3LIBS)"!=""
640 LINKINCTARGETS
+=$(MISC
)/$(APP3TARGETN
:b
)_linkinc.ls
641 $(APP3TARGETN
) : $(LINKINCTARGETS
)
642 .ENDIF
# "$(linkinc)"!=""
644 # Allow for target specific LIBSALCPPRT override
645 APP3LIBSALCPPRT
*=$(LIBSALCPPRT
)
647 .IF
"$(GUI)" == "OS2"
648 _APP3IMP_ORD
= $(APP3STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP3STDLIBS
:^
"$(LB)/")
649 APP3IMP_ORD
= $(foreach,i
,$(_APP3IMP_ORD
) $(shell @
-ls
$i))
654 $(APP3TARGETN
): $(APP3OBJS
) $(APP3LIBS
) \
657 $(APP3ICON
) $(APP3DEPN
) $(USE_APP3DEF
)
658 @echo
------------------------------
659 @echo
"Making: " $(@
:f
)
661 .IF
"$(OS)"=="MACOSX"
663 @
-$(RM
) $(MISC
)/$(@
:b
).list
664 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
665 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
666 @echo
$(STDSLO
) $(APP3OBJS
:s
/.obj
/.o
/) \
667 `cat /dev/null $(APP3LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
668 @echo
-n
$(APP3LINKER
) $(APP3LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
669 $(APP3LINKTYPEFLAG
) $(APP3STDLIBS
) $(APP3STDLIB
) $(STDLIB3
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
670 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
671 `cat $(MISC)/$(TARGET).$(@:b)_3.cmd` \
672 >> $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
673 .IF
"$(VERBOSE)" == "TRUE"
674 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
676 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
677 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
678 # libraries at runtime
679 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
680 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
682 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
684 .IF
"$(TARGETTYPE)"=="GUI"
685 @echo
"Making: " $(@
:f
).app
686 @macosx-create-bundle
$@
687 .ENDIF
# "$(TARGETTYPE)"=="GUI"
688 .ELSE
# "$(OS)"=="MACOSX"
690 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
691 @echo
$(APP3LINKER
) $(APP3LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
692 $(APP3OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_3.cmd
693 @cat $(mktmp /dev/null $(APP3LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_3.cmd
694 @echo
$(APP3LINKTYPEFLAG
) $(APP3LIBSALCPPRT
) $(APP3STDLIBS
) $(APP3STDLIB
) $(STDLIB3
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
695 .IF
"$(VERBOSE)" == "TRUE"
696 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
698 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
699 .IF
"$(VERBOSE)" == "TRUE"
702 .ENDIF
# "$(OS)"=="MACOSX"
704 .IF
"$(GUI)" == "WNT"
706 .IF
"$(APP3LINKRES)" != ""
707 @@
-$(RM
) $(MISC
)/$(APP3LINKRES
:b
).rc
708 .IF
"$(APP3ICON)" != ""
709 @
-echo
1 ICON
$(EMQ
)"$(APP3ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP3LINKRES
:b
).rc
710 .ENDIF
# "$(APP3ICON)" != ""
711 .IF
"$(APP3VERINFO)" != ""
712 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP3LINKRES:b).rc
713 @
-echo
$(EMQ
)#include $(EMQ)"$(APP3VERINFO)$(EMQ)" >> $(MISC)/$(APP3LINKRES:b).rc
714 .ENDIF
# "$(APP3VERINFO)" != ""
715 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP3PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP3LINKRES
:b
).rc
716 .ENDIF
# "$(APP3LINKRES)" != ""
717 .IF
"$(COM)" == "GCC"
719 .IF
"$(APP3LINKRES)" != "" ||
"$(APP3RES)" != ""
720 @cat
$(APP3LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP3RES
)) > $(MISC
)/$(@
:b
)_all.res
721 windres
$(MISC
)/$(@
:b
)_all.res
$(APP3RESO
)
723 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
724 $(APP3BASEX
) $(APP3STACKN
) -o
$@
$(APP3OBJS
) \
725 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP3RESO
) \
726 `$(TYPE) /dev/null $(APP3LIBS) | sed s#$(ROUT)#$(OUT)#g` \
727 $(APP_LINKTYPE
) $(APP3LIBSALCPPRT
) \
728 -Wl
,--start-group
$(APP3STDLIBS
) -Wl
,--end-group
$(APP3STDLIB
) \
729 $(STDLIB3
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
730 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
731 .IF
"$(VERBOSE)" == "TRUE"
732 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
734 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
736 .ELSE
# "$(COM)" == "GCC"
737 .IF
"$(linkinc)" == ""
738 $(COMMAND_ECHO
)$(APP3LINKER
) @
$(mktmp \
740 $(LINKFLAGSAPP
) $(APP3BASEX
) \
743 -map
:$(MISC
)/{$(subst,/,_
$(APP3TARGET
)).map
} \
750 $(APP3STDLIB
) $(STDLIB3
) \
752 @
-echo linking
$@.manifest ...
753 .IF
"$(VISTA_MANIFEST)"!=""
754 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
755 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
757 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
758 .ENDIF
# "$(VISTA_MANIFEST)"!=""
759 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
760 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
762 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP3TARGET
).lnk
763 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP3TARGET
).lst
764 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
765 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
766 type
$(mktmp
,$(MISC
)\
$(APP3TARGET
).lst
768 $(LINKFLAGSAPP
) $(APP3BASEX
) \
777 $(APP3STDLIB
) $(STDLIB3
))
778 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP3TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP3TARGET
).lst
779 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP3TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP3TARGET
).lst
>> $(MISC
)/$(APP3TARGET
).lnk
$(FI
)
780 $(COMMAND_ECHO
)$(SED
)$(APP3LINKER
) @
$(MISC
)\
$(APP3TARGET
).lnk
781 .ENDIF
# "$(linkinc)" == ""
782 .ENDIF
# "$(COM)" == "GCC"
783 .IF
"$(APP3TARGET)" == "loader"
784 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
785 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
786 $(COMMAND_ECHO
)$(RM
) $@
787 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
788 .ENDIF
# "$(TARGET)" == "setup"
790 .ENDIF
# "$(GUI)" == "WNT"
792 .IF
"$(GUI)" == "OS2"
793 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
794 .IF
"$(APP3LINKRES)" != ""
795 @
+-$(RM
) $(MISC
)/$(APP3LINKRES
:b
).rc
>& $(NULLDEV
)
796 .IF
"$(APP3ICON)" != ""
797 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP3ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP3LINKRES
:b
).rc
798 .ENDIF
# "$(APP3ICON)" != ""
799 .IF
"$(APP3VERINFO)" != ""
800 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP3LINKRES:b).rc
801 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP3VERINFO)$(EMQ)" >> $(MISC)/$(APP3LINKRES:b).rc
802 .ENDIF
# "$(APP3VERINFO)" != ""
803 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP3PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP3LINKRES
:b
).rc
804 .ENDIF
# "$(APP3LINKRES)" != ""
806 .IF
"$(TARGETTYPE)" == "GUI"
807 @echo NAME
$(APP3TARGET
) WINDOWAPI
> $(MISC
)/$(APP3TARGET
).def
810 .IF
"$(VERBOSE)" == "TRUE"
811 @
+echo
$(APP3LINKFLAGS
) \
812 $(LINKFLAGSAPP
) $(APP3BASEX
) \
816 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
823 $(APP3STDLIBS
:^
"-l") \
824 $(APP3STDLIB
:^
"-l") $(STDLIB3
:^
"-l")
826 $(COMMAND_ECHO
)$(APP3LINKER
) -v \
828 $(LINKFLAGSAPP
) $(APP3BASEX
) \
832 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
839 $(APP3STDLIBS
:^
"-l") \
840 $(APP3STDLIB
:^
"-l") $(STDLIB3
:^
"-l")
843 .IF
"$(APP3TARGET)" == "loader"
844 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
845 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
846 $(COMMAND_ECHO
)+$(RM
) $@
847 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
848 .ENDIF
# "$(TARGET)" == "setup"
850 .ENDIF
# "$(GUI)" == "OS2"
852 .ENDIF
# "$(APP3TARGETN)"!=""
855 # Instruction for linking
858 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
859 APP4DEF
= $(MISC
)/$(APP4TARGET
).def
862 .IF
"$(APP4LINKTYPE)" != ""
863 #must be either STATIC or SHARED
864 APP4LINKTYPEFLAG
=$(APPLINK
$(APP4LINKTYPE
))
868 .IF
"$(APP4CODETYPE)"=="C"
870 APP4STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
871 APP4LINKFLAGS
+=$(LINKCFLAGS
)
872 .ELSE
# "$(APP4CODETYPE)"=="C"
874 APP4STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
875 APP4LINKFLAGS
+=$(LINKFLAGS
)
876 .ENDIF
# "$(APP4CODETYPE)"=="C"
879 LINKFLAGSRUNPATH_
$(APP4RPATH
)*=/ERROR
:/Bad_APP4RPATH_value
880 .IF
"$(OS)" != "MACOSX"
881 APP4LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP4RPATH
))
884 .IF
"$(APP4STACK)" != ""
885 .IF
"$(LINKFLAGSTACK)" != ""
886 APP4STACKN
=$(LINKFLAGSTACK
)$(APP4STACK
)
892 .IF
"$(APP4NOSAL)"==""
893 .IF
"$(TARGETTYPE)" == "GUI"
894 APP4OBJS
+= $(STDOBJVCL
)
898 .IF
"$(GUI)$(COM)" == "WNTGCC"
900 .IF
"$(APP4LINKRES)" != "" ||
"$(APP4RES)" != ""
901 APP4RESO
=$(MISC
)/$(APP4TARGET
:b
)_res.o
905 .IF
"$(GUI)" == "UNX"
906 APP4DEPN
+:=$(APP4DEPNU
)
910 .IF
"$(APP4TARGETN)"!=""
912 .IF
"$(APP4PRODUCTNAME)"!=""
913 APP4PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP4PRODUCTNAME
)\"
914 .ENDIF
# "$(APP4PRODUCTNAME)"!=""
917 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
918 .IF
"$(APP4LIBS)"!=""
919 $(MISC
)/$(APP4TARGET
)_linkinc.ls .PHONY
:
921 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP4LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
922 .ENDIF
#"$(APP4LIBS)"!=""
925 LINKINCTARGETS
+=$(MISC
)/$(APP4TARGETN
:b
)_linkinc.ls
926 $(APP4TARGETN
) : $(LINKINCTARGETS
)
927 .ENDIF
# "$(linkinc)"!=""
929 # Allow for target specific LIBSALCPPRT override
930 APP4LIBSALCPPRT
*=$(LIBSALCPPRT
)
932 .IF
"$(GUI)" == "OS2"
933 _APP4IMP_ORD
= $(APP4STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP4STDLIBS
:^
"$(LB)/")
934 APP4IMP_ORD
= $(foreach,i
,$(_APP4IMP_ORD
) $(shell @
-ls
$i))
939 $(APP4TARGETN
): $(APP4OBJS
) $(APP4LIBS
) \
942 $(APP4ICON
) $(APP4DEPN
) $(USE_APP4DEF
)
943 @echo
------------------------------
944 @echo
"Making: " $(@
:f
)
946 .IF
"$(OS)"=="MACOSX"
948 @
-$(RM
) $(MISC
)/$(@
:b
).list
949 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
950 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
951 @echo
$(STDSLO
) $(APP4OBJS
:s
/.obj
/.o
/) \
952 `cat /dev/null $(APP4LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
953 @echo
-n
$(APP4LINKER
) $(APP4LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
954 $(APP4LINKTYPEFLAG
) $(APP4STDLIBS
) $(APP4STDLIB
) $(STDLIB4
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
955 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
956 `cat $(MISC)/$(TARGET).$(@:b)_4.cmd` \
957 >> $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
958 .IF
"$(VERBOSE)" == "TRUE"
959 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
961 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
962 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
963 # libraries at runtime
964 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
965 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
967 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
969 .IF
"$(TARGETTYPE)"=="GUI"
970 @echo
"Making: " $(@
:f
).app
971 @macosx-create-bundle
$@
972 .ENDIF
# "$(TARGETTYPE)"=="GUI"
973 .ELSE
# "$(OS)"=="MACOSX"
975 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
976 @echo
$(APP4LINKER
) $(APP4LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
977 $(APP4OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_4.cmd
978 @cat $(mktmp /dev/null $(APP4LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_4.cmd
979 @echo
$(APP4LINKTYPEFLAG
) $(APP4LIBSALCPPRT
) $(APP4STDLIBS
) $(APP4STDLIB
) $(STDLIB4
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
980 .IF
"$(VERBOSE)" == "TRUE"
981 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
983 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
984 .IF
"$(VERBOSE)" == "TRUE"
987 .ENDIF
# "$(OS)"=="MACOSX"
989 .IF
"$(GUI)" == "WNT"
991 .IF
"$(APP4LINKRES)" != ""
992 @@
-$(RM
) $(MISC
)/$(APP4LINKRES
:b
).rc
993 .IF
"$(APP4ICON)" != ""
994 @
-echo
1 ICON
$(EMQ
)"$(APP4ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP4LINKRES
:b
).rc
995 .ENDIF
# "$(APP4ICON)" != ""
996 .IF
"$(APP4VERINFO)" != ""
997 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP4LINKRES:b).rc
998 @
-echo
$(EMQ
)#include $(EMQ)"$(APP4VERINFO)$(EMQ)" >> $(MISC)/$(APP4LINKRES:b).rc
999 .ENDIF
# "$(APP4VERINFO)" != ""
1000 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP4PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP4LINKRES
:b
).rc
1001 .ENDIF
# "$(APP4LINKRES)" != ""
1002 .IF
"$(COM)" == "GCC"
1004 .IF
"$(APP4LINKRES)" != "" ||
"$(APP4RES)" != ""
1005 @cat
$(APP4LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP4RES
)) > $(MISC
)/$(@
:b
)_all.res
1006 windres
$(MISC
)/$(@
:b
)_all.res
$(APP4RESO
)
1008 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1009 $(APP4BASEX
) $(APP4STACKN
) -o
$@
$(APP4OBJS
) \
1010 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP4RESO
) \
1011 `$(TYPE) /dev/null $(APP4LIBS) | sed s#$(ROUT)#$(OUT)#g` \
1012 $(APP_LINKTYPE
) $(APP4LIBSALCPPRT
) \
1013 -Wl
,--start-group
$(APP4STDLIBS
) -Wl
,--end-group
$(APP4STDLIB
) \
1014 $(STDLIB4
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
1015 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
1016 .IF
"$(VERBOSE)" == "TRUE"
1017 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
1019 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
1021 .ELSE
# "$(COM)" == "GCC"
1022 .IF
"$(linkinc)" == ""
1023 $(COMMAND_ECHO
)$(APP4LINKER
) @
$(mktmp \
1025 $(LINKFLAGSAPP
) $(APP4BASEX
) \
1028 -map
:$(MISC
)/{$(subst,/,_
$(APP4TARGET
)).map
} \
1035 $(APP4STDLIB
) $(STDLIB4
) \
1037 @
-echo linking
$@.manifest ...
1038 .IF
"$(VISTA_MANIFEST)"!=""
1039 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1040 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1042 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1043 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1044 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1045 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1047 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP4TARGET
).lnk
1048 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP4TARGET
).lst
1049 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1050 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1051 type
$(mktmp
,$(MISC
)\
$(APP4TARGET
).lst
1053 $(LINKFLAGSAPP
) $(APP4BASEX
) \
1062 $(APP4STDLIB
) $(STDLIB4
))
1063 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP4TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP4TARGET
).lst
1064 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP4TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP4TARGET
).lst
>> $(MISC
)/$(APP4TARGET
).lnk
$(FI
)
1065 $(COMMAND_ECHO
)$(SED
)$(APP4LINKER
) @
$(MISC
)\
$(APP4TARGET
).lnk
1066 .ENDIF
# "$(linkinc)" == ""
1067 .ENDIF
# "$(COM)" == "GCC"
1068 .IF
"$(APP4TARGET)" == "loader"
1069 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1070 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1071 $(COMMAND_ECHO
)$(RM
) $@
1072 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1073 .ENDIF
# "$(TARGET)" == "setup"
1075 .ENDIF
# "$(GUI)" == "WNT"
1077 .IF
"$(GUI)" == "OS2"
1078 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
1079 .IF
"$(APP4LINKRES)" != ""
1080 @
+-$(RM
) $(MISC
)/$(APP4LINKRES
:b
).rc
>& $(NULLDEV
)
1081 .IF
"$(APP4ICON)" != ""
1082 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP4ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP4LINKRES
:b
).rc
1083 .ENDIF
# "$(APP4ICON)" != ""
1084 .IF
"$(APP4VERINFO)" != ""
1085 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP4LINKRES:b).rc
1086 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP4VERINFO)$(EMQ)" >> $(MISC)/$(APP4LINKRES:b).rc
1087 .ENDIF
# "$(APP4VERINFO)" != ""
1088 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP4PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP4LINKRES
:b
).rc
1089 .ENDIF
# "$(APP4LINKRES)" != ""
1091 .IF
"$(TARGETTYPE)" == "GUI"
1092 @echo NAME
$(APP4TARGET
) WINDOWAPI
> $(MISC
)/$(APP4TARGET
).def
1095 .IF
"$(VERBOSE)" == "TRUE"
1096 @
+echo
$(APP4LINKFLAGS
) \
1097 $(LINKFLAGSAPP
) $(APP4BASEX
) \
1101 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
1108 $(APP4STDLIBS
:^
"-l") \
1109 $(APP4STDLIB
:^
"-l") $(STDLIB4
:^
"-l")
1111 $(COMMAND_ECHO
)$(APP4LINKER
) -v \
1113 $(LINKFLAGSAPP
) $(APP4BASEX
) \
1117 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
1124 $(APP4STDLIBS
:^
"-l") \
1125 $(APP4STDLIB
:^
"-l") $(STDLIB4
:^
"-l")
1128 .IF
"$(APP4TARGET)" == "loader"
1129 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
1130 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1131 $(COMMAND_ECHO
)+$(RM
) $@
1132 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1133 .ENDIF
# "$(TARGET)" == "setup"
1135 .ENDIF
# "$(GUI)" == "OS2"
1137 .ENDIF
# "$(APP4TARGETN)"!=""
1140 # Instruction for linking
1143 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
1144 APP5DEF
= $(MISC
)/$(APP5TARGET
).def
1147 .IF
"$(APP5LINKTYPE)" != ""
1148 #must be either STATIC or SHARED
1149 APP5LINKTYPEFLAG
=$(APPLINK
$(APP5LINKTYPE
))
1152 # decide how to link
1153 .IF
"$(APP5CODETYPE)"=="C"
1155 APP5STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
1156 APP5LINKFLAGS
+=$(LINKCFLAGS
)
1157 .ELSE
# "$(APP5CODETYPE)"=="C"
1159 APP5STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
1160 APP5LINKFLAGS
+=$(LINKFLAGS
)
1161 .ENDIF
# "$(APP5CODETYPE)"=="C"
1164 LINKFLAGSRUNPATH_
$(APP5RPATH
)*=/ERROR
:/Bad_APP5RPATH_value
1165 .IF
"$(OS)" != "MACOSX"
1166 APP5LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP5RPATH
))
1169 .IF
"$(APP5STACK)" != ""
1170 .IF
"$(LINKFLAGSTACK)" != ""
1171 APP5STACKN
=$(LINKFLAGSTACK
)$(APP5STACK
)
1177 .IF
"$(APP5NOSAL)"==""
1178 .IF
"$(TARGETTYPE)" == "GUI"
1179 APP5OBJS
+= $(STDOBJVCL
)
1183 .IF
"$(GUI)$(COM)" == "WNTGCC"
1185 .IF
"$(APP5LINKRES)" != "" ||
"$(APP5RES)" != ""
1186 APP5RESO
=$(MISC
)/$(APP5TARGET
:b
)_res.o
1190 .IF
"$(GUI)" == "UNX"
1191 APP5DEPN
+:=$(APP5DEPNU
)
1195 .IF
"$(APP5TARGETN)"!=""
1197 .IF
"$(APP5PRODUCTNAME)"!=""
1198 APP5PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP5PRODUCTNAME
)\"
1199 .ENDIF
# "$(APP5PRODUCTNAME)"!=""
1201 .IF
"$(linkinc)"!=""
1202 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
1203 .IF
"$(APP5LIBS)"!=""
1204 $(MISC
)/$(APP5TARGET
)_linkinc.ls .PHONY
:
1206 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP5LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
1207 .ENDIF
#"$(APP5LIBS)"!=""
1210 LINKINCTARGETS
+=$(MISC
)/$(APP5TARGETN
:b
)_linkinc.ls
1211 $(APP5TARGETN
) : $(LINKINCTARGETS
)
1212 .ENDIF
# "$(linkinc)"!=""
1214 # Allow for target specific LIBSALCPPRT override
1215 APP5LIBSALCPPRT
*=$(LIBSALCPPRT
)
1217 .IF
"$(GUI)" == "OS2"
1218 _APP5IMP_ORD
= $(APP5STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP5STDLIBS
:^
"$(LB)/")
1219 APP5IMP_ORD
= $(foreach,i
,$(_APP5IMP_ORD
) $(shell @
-ls
$i))
1224 $(APP5TARGETN
): $(APP5OBJS
) $(APP5LIBS
) \
1227 $(APP5ICON
) $(APP5DEPN
) $(USE_APP5DEF
)
1228 @echo
------------------------------
1229 @echo
"Making: " $(@
:f
)
1231 .IF
"$(OS)"=="MACOSX"
1233 @
-$(RM
) $(MISC
)/$(@
:b
).list
1234 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1235 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
1236 @echo
$(STDSLO
) $(APP5OBJS
:s
/.obj
/.o
/) \
1237 `cat /dev/null $(APP5LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
1238 @echo
-n
$(APP5LINKER
) $(APP5LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
1239 $(APP5LINKTYPEFLAG
) $(APP5STDLIBS
) $(APP5STDLIB
) $(STDLIB5
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1240 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
1241 `cat $(MISC)/$(TARGET).$(@:b)_5.cmd` \
1242 >> $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1243 .IF
"$(VERBOSE)" == "TRUE"
1244 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1246 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1247 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
1248 # libraries at runtime
1249 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
1250 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
1252 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
1254 .IF
"$(TARGETTYPE)"=="GUI"
1255 @echo
"Making: " $(@
:f
).app
1256 @macosx-create-bundle
$@
1257 .ENDIF
# "$(TARGETTYPE)"=="GUI"
1258 .ELSE
# "$(OS)"=="MACOSX"
1260 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1261 @echo
$(APP5LINKER
) $(APP5LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1262 $(APP5OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_5.cmd
1263 @cat $(mktmp /dev/null $(APP5LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_5.cmd
1264 @echo
$(APP5LINKTYPEFLAG
) $(APP5LIBSALCPPRT
) $(APP5STDLIBS
) $(APP5STDLIB
) $(STDLIB5
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1265 .IF
"$(VERBOSE)" == "TRUE"
1266 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1268 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1269 .IF
"$(VERBOSE)" == "TRUE"
1272 .ENDIF
# "$(OS)"=="MACOSX"
1274 .IF
"$(GUI)" == "WNT"
1275 @@
-$(MKDIR
) $(@
:d
:d
)
1276 .IF
"$(APP5LINKRES)" != ""
1277 @@
-$(RM
) $(MISC
)/$(APP5LINKRES
:b
).rc
1278 .IF
"$(APP5ICON)" != ""
1279 @
-echo
1 ICON
$(EMQ
)"$(APP5ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP5LINKRES
:b
).rc
1280 .ENDIF
# "$(APP5ICON)" != ""
1281 .IF
"$(APP5VERINFO)" != ""
1282 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP5LINKRES:b).rc
1283 @
-echo
$(EMQ
)#include $(EMQ)"$(APP5VERINFO)$(EMQ)" >> $(MISC)/$(APP5LINKRES:b).rc
1284 .ENDIF
# "$(APP5VERINFO)" != ""
1285 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP5PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP5LINKRES
:b
).rc
1286 .ENDIF
# "$(APP5LINKRES)" != ""
1287 .IF
"$(COM)" == "GCC"
1289 .IF
"$(APP5LINKRES)" != "" ||
"$(APP5RES)" != ""
1290 @cat
$(APP5LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP5RES
)) > $(MISC
)/$(@
:b
)_all.res
1291 windres
$(MISC
)/$(@
:b
)_all.res
$(APP5RESO
)
1293 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1294 $(APP5BASEX
) $(APP5STACKN
) -o
$@
$(APP5OBJS
) \
1295 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP5RESO
) \
1296 `$(TYPE) /dev/null $(APP5LIBS) | sed s#$(ROUT)#$(OUT)#g` \
1297 $(APP_LINKTYPE
) $(APP5LIBSALCPPRT
) \
1298 -Wl
,--start-group
$(APP5STDLIBS
) -Wl
,--end-group
$(APP5STDLIB
) \
1299 $(STDLIB5
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1300 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
1301 .IF
"$(VERBOSE)" == "TRUE"
1302 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1304 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
1306 .ELSE
# "$(COM)" == "GCC"
1307 .IF
"$(linkinc)" == ""
1308 $(COMMAND_ECHO
)$(APP5LINKER
) @
$(mktmp \
1310 $(LINKFLAGSAPP
) $(APP5BASEX
) \
1313 -map
:$(MISC
)/{$(subst,/,_
$(APP5TARGET
)).map
} \
1320 $(APP5STDLIB
) $(STDLIB5
) \
1322 @
-echo linking
$@.manifest ...
1323 .IF
"$(VISTA_MANIFEST)"!=""
1324 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1325 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1327 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1328 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1329 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1330 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1332 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP5TARGET
).lnk
1333 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP5TARGET
).lst
1334 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1335 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1336 type
$(mktmp
,$(MISC
)\
$(APP5TARGET
).lst
1338 $(LINKFLAGSAPP
) $(APP5BASEX
) \
1347 $(APP5STDLIB
) $(STDLIB5
))
1348 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP5TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP5TARGET
).lst
1349 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP5TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP5TARGET
).lst
>> $(MISC
)/$(APP5TARGET
).lnk
$(FI
)
1350 $(COMMAND_ECHO
)$(SED
)$(APP5LINKER
) @
$(MISC
)\
$(APP5TARGET
).lnk
1351 .ENDIF
# "$(linkinc)" == ""
1352 .ENDIF
# "$(COM)" == "GCC"
1353 .IF
"$(APP5TARGET)" == "loader"
1354 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1355 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1356 $(COMMAND_ECHO
)$(RM
) $@
1357 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1358 .ENDIF
# "$(TARGET)" == "setup"
1360 .ENDIF
# "$(GUI)" == "WNT"
1362 .IF
"$(GUI)" == "OS2"
1363 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
1364 .IF
"$(APP5LINKRES)" != ""
1365 @
+-$(RM
) $(MISC
)/$(APP5LINKRES
:b
).rc
>& $(NULLDEV
)
1366 .IF
"$(APP5ICON)" != ""
1367 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP5ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP5LINKRES
:b
).rc
1368 .ENDIF
# "$(APP5ICON)" != ""
1369 .IF
"$(APP5VERINFO)" != ""
1370 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP5LINKRES:b).rc
1371 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP5VERINFO)$(EMQ)" >> $(MISC)/$(APP5LINKRES:b).rc
1372 .ENDIF
# "$(APP5VERINFO)" != ""
1373 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP5PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP5LINKRES
:b
).rc
1374 .ENDIF
# "$(APP5LINKRES)" != ""
1376 .IF
"$(TARGETTYPE)" == "GUI"
1377 @echo NAME
$(APP5TARGET
) WINDOWAPI
> $(MISC
)/$(APP5TARGET
).def
1380 .IF
"$(VERBOSE)" == "TRUE"
1381 @
+echo
$(APP5LINKFLAGS
) \
1382 $(LINKFLAGSAPP
) $(APP5BASEX
) \
1386 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
1393 $(APP5STDLIBS
:^
"-l") \
1394 $(APP5STDLIB
:^
"-l") $(STDLIB5
:^
"-l")
1396 $(COMMAND_ECHO
)$(APP5LINKER
) -v \
1398 $(LINKFLAGSAPP
) $(APP5BASEX
) \
1402 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
1409 $(APP5STDLIBS
:^
"-l") \
1410 $(APP5STDLIB
:^
"-l") $(STDLIB5
:^
"-l")
1413 .IF
"$(APP5TARGET)" == "loader"
1414 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
1415 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1416 $(COMMAND_ECHO
)+$(RM
) $@
1417 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1418 .ENDIF
# "$(TARGET)" == "setup"
1420 .ENDIF
# "$(GUI)" == "OS2"
1422 .ENDIF
# "$(APP5TARGETN)"!=""
1425 # Instruction for linking
1428 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
1429 APP6DEF
= $(MISC
)/$(APP6TARGET
).def
1432 .IF
"$(APP6LINKTYPE)" != ""
1433 #must be either STATIC or SHARED
1434 APP6LINKTYPEFLAG
=$(APPLINK
$(APP6LINKTYPE
))
1437 # decide how to link
1438 .IF
"$(APP6CODETYPE)"=="C"
1440 APP6STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
1441 APP6LINKFLAGS
+=$(LINKCFLAGS
)
1442 .ELSE
# "$(APP6CODETYPE)"=="C"
1444 APP6STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
1445 APP6LINKFLAGS
+=$(LINKFLAGS
)
1446 .ENDIF
# "$(APP6CODETYPE)"=="C"
1449 LINKFLAGSRUNPATH_
$(APP6RPATH
)*=/ERROR
:/Bad_APP6RPATH_value
1450 .IF
"$(OS)" != "MACOSX"
1451 APP6LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP6RPATH
))
1454 .IF
"$(APP6STACK)" != ""
1455 .IF
"$(LINKFLAGSTACK)" != ""
1456 APP6STACKN
=$(LINKFLAGSTACK
)$(APP6STACK
)
1462 .IF
"$(APP6NOSAL)"==""
1463 .IF
"$(TARGETTYPE)" == "GUI"
1464 APP6OBJS
+= $(STDOBJVCL
)
1468 .IF
"$(GUI)$(COM)" == "WNTGCC"
1470 .IF
"$(APP6LINKRES)" != "" ||
"$(APP6RES)" != ""
1471 APP6RESO
=$(MISC
)/$(APP6TARGET
:b
)_res.o
1475 .IF
"$(GUI)" == "UNX"
1476 APP6DEPN
+:=$(APP6DEPNU
)
1480 .IF
"$(APP6TARGETN)"!=""
1482 .IF
"$(APP6PRODUCTNAME)"!=""
1483 APP6PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP6PRODUCTNAME
)\"
1484 .ENDIF
# "$(APP6PRODUCTNAME)"!=""
1486 .IF
"$(linkinc)"!=""
1487 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
1488 .IF
"$(APP6LIBS)"!=""
1489 $(MISC
)/$(APP6TARGET
)_linkinc.ls .PHONY
:
1491 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP6LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
1492 .ENDIF
#"$(APP6LIBS)"!=""
1495 LINKINCTARGETS
+=$(MISC
)/$(APP6TARGETN
:b
)_linkinc.ls
1496 $(APP6TARGETN
) : $(LINKINCTARGETS
)
1497 .ENDIF
# "$(linkinc)"!=""
1499 # Allow for target specific LIBSALCPPRT override
1500 APP6LIBSALCPPRT
*=$(LIBSALCPPRT
)
1502 .IF
"$(GUI)" == "OS2"
1503 _APP6IMP_ORD
= $(APP6STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP6STDLIBS
:^
"$(LB)/")
1504 APP6IMP_ORD
= $(foreach,i
,$(_APP6IMP_ORD
) $(shell @
-ls
$i))
1509 $(APP6TARGETN
): $(APP6OBJS
) $(APP6LIBS
) \
1512 $(APP6ICON
) $(APP6DEPN
) $(USE_APP6DEF
)
1513 @echo
------------------------------
1514 @echo
"Making: " $(@
:f
)
1516 .IF
"$(OS)"=="MACOSX"
1518 @
-$(RM
) $(MISC
)/$(@
:b
).list
1519 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1520 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
1521 @echo
$(STDSLO
) $(APP6OBJS
:s
/.obj
/.o
/) \
1522 `cat /dev/null $(APP6LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
1523 @echo
-n
$(APP6LINKER
) $(APP6LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
1524 $(APP6LINKTYPEFLAG
) $(APP6STDLIBS
) $(APP6STDLIB
) $(STDLIB6
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1525 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
1526 `cat $(MISC)/$(TARGET).$(@:b)_6.cmd` \
1527 >> $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1528 .IF
"$(VERBOSE)" == "TRUE"
1529 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1531 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1532 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
1533 # libraries at runtime
1534 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
1535 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
1537 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
1539 .IF
"$(TARGETTYPE)"=="GUI"
1540 @echo
"Making: " $(@
:f
).app
1541 @macosx-create-bundle
$@
1542 .ENDIF
# "$(TARGETTYPE)"=="GUI"
1543 .ELSE
# "$(OS)"=="MACOSX"
1545 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1546 @echo
$(APP6LINKER
) $(APP6LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1547 $(APP6OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_6.cmd
1548 @cat $(mktmp /dev/null $(APP6LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_6.cmd
1549 @echo
$(APP6LINKTYPEFLAG
) $(APP6LIBSALCPPRT
) $(APP6STDLIBS
) $(APP6STDLIB
) $(STDLIB6
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1550 .IF
"$(VERBOSE)" == "TRUE"
1551 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1553 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1554 .IF
"$(VERBOSE)" == "TRUE"
1557 .ENDIF
# "$(OS)"=="MACOSX"
1559 .IF
"$(GUI)" == "WNT"
1560 @@
-$(MKDIR
) $(@
:d
:d
)
1561 .IF
"$(APP6LINKRES)" != ""
1562 @@
-$(RM
) $(MISC
)/$(APP6LINKRES
:b
).rc
1563 .IF
"$(APP6ICON)" != ""
1564 @
-echo
1 ICON
$(EMQ
)"$(APP6ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP6LINKRES
:b
).rc
1565 .ENDIF
# "$(APP6ICON)" != ""
1566 .IF
"$(APP6VERINFO)" != ""
1567 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP6LINKRES:b).rc
1568 @
-echo
$(EMQ
)#include $(EMQ)"$(APP6VERINFO)$(EMQ)" >> $(MISC)/$(APP6LINKRES:b).rc
1569 .ENDIF
# "$(APP6VERINFO)" != ""
1570 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP6PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP6LINKRES
:b
).rc
1571 .ENDIF
# "$(APP6LINKRES)" != ""
1572 .IF
"$(COM)" == "GCC"
1574 .IF
"$(APP6LINKRES)" != "" ||
"$(APP6RES)" != ""
1575 @cat
$(APP6LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP6RES
)) > $(MISC
)/$(@
:b
)_all.res
1576 windres
$(MISC
)/$(@
:b
)_all.res
$(APP6RESO
)
1578 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1579 $(APP6BASEX
) $(APP6STACKN
) -o
$@
$(APP6OBJS
) \
1580 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP6RESO
) \
1581 `$(TYPE) /dev/null $(APP6LIBS) | sed s#$(ROUT)#$(OUT)#g` \
1582 $(APP_LINKTYPE
) $(APP6LIBSALCPPRT
) \
1583 -Wl
,--start-group
$(APP6STDLIBS
) -Wl
,--end-group
$(APP6STDLIB
) \
1584 $(STDLIB6
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1585 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
1586 .IF
"$(VERBOSE)" == "TRUE"
1587 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1589 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1591 .ELSE
# "$(COM)" == "GCC"
1592 .IF
"$(linkinc)" == ""
1593 $(COMMAND_ECHO
)$(APP6LINKER
) @
$(mktmp \
1595 $(LINKFLAGSAPP
) $(APP6BASEX
) \
1598 -map
:$(MISC
)/{$(subst,/,_
$(APP6TARGET
)).map
} \
1605 $(APP6STDLIB
) $(STDLIB6
) \
1607 @
-echo linking
$@.manifest ...
1608 .IF
"$(VISTA_MANIFEST)"!=""
1609 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1610 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1612 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1613 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1614 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1615 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1617 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP6TARGET
).lnk
1618 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP6TARGET
).lst
1619 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1620 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1621 type
$(mktmp
,$(MISC
)\
$(APP6TARGET
).lst
1623 $(LINKFLAGSAPP
) $(APP6BASEX
) \
1632 $(APP6STDLIB
) $(STDLIB6
))
1633 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP6TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP6TARGET
).lst
1634 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP6TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP6TARGET
).lst
>> $(MISC
)/$(APP6TARGET
).lnk
$(FI
)
1635 $(COMMAND_ECHO
)$(SED
)$(APP6LINKER
) @
$(MISC
)\
$(APP6TARGET
).lnk
1636 .ENDIF
# "$(linkinc)" == ""
1637 .ENDIF
# "$(COM)" == "GCC"
1638 .IF
"$(APP6TARGET)" == "loader"
1639 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1640 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1641 $(COMMAND_ECHO
)$(RM
) $@
1642 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1643 .ENDIF
# "$(TARGET)" == "setup"
1645 .ENDIF
# "$(GUI)" == "WNT"
1647 .IF
"$(GUI)" == "OS2"
1648 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
1649 .IF
"$(APP6LINKRES)" != ""
1650 @
+-$(RM
) $(MISC
)/$(APP6LINKRES
:b
).rc
>& $(NULLDEV
)
1651 .IF
"$(APP6ICON)" != ""
1652 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP6ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP6LINKRES
:b
).rc
1653 .ENDIF
# "$(APP6ICON)" != ""
1654 .IF
"$(APP6VERINFO)" != ""
1655 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP6LINKRES:b).rc
1656 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP6VERINFO)$(EMQ)" >> $(MISC)/$(APP6LINKRES:b).rc
1657 .ENDIF
# "$(APP6VERINFO)" != ""
1658 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP6PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP6LINKRES
:b
).rc
1659 .ENDIF
# "$(APP6LINKRES)" != ""
1661 .IF
"$(TARGETTYPE)" == "GUI"
1662 @echo NAME
$(APP6TARGET
) WINDOWAPI
> $(MISC
)/$(APP6TARGET
).def
1665 .IF
"$(VERBOSE)" == "TRUE"
1666 @
+echo
$(APP6LINKFLAGS
) \
1667 $(LINKFLAGSAPP
) $(APP6BASEX
) \
1671 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
1678 $(APP6STDLIBS
:^
"-l") \
1679 $(APP6STDLIB
:^
"-l") $(STDLIB6
:^
"-l")
1681 $(COMMAND_ECHO
)$(APP6LINKER
) -v \
1683 $(LINKFLAGSAPP
) $(APP6BASEX
) \
1687 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
1694 $(APP6STDLIBS
:^
"-l") \
1695 $(APP6STDLIB
:^
"-l") $(STDLIB6
:^
"-l")
1698 .IF
"$(APP6TARGET)" == "loader"
1699 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
1700 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1701 $(COMMAND_ECHO
)+$(RM
) $@
1702 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1703 .ENDIF
# "$(TARGET)" == "setup"
1705 .ENDIF
# "$(GUI)" == "OS2"
1707 .ENDIF
# "$(APP6TARGETN)"!=""
1710 # Instruction for linking
1713 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
1714 APP7DEF
= $(MISC
)/$(APP7TARGET
).def
1717 .IF
"$(APP7LINKTYPE)" != ""
1718 #must be either STATIC or SHARED
1719 APP7LINKTYPEFLAG
=$(APPLINK
$(APP7LINKTYPE
))
1722 # decide how to link
1723 .IF
"$(APP7CODETYPE)"=="C"
1725 APP7STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
1726 APP7LINKFLAGS
+=$(LINKCFLAGS
)
1727 .ELSE
# "$(APP7CODETYPE)"=="C"
1729 APP7STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
1730 APP7LINKFLAGS
+=$(LINKFLAGS
)
1731 .ENDIF
# "$(APP7CODETYPE)"=="C"
1734 LINKFLAGSRUNPATH_
$(APP7RPATH
)*=/ERROR
:/Bad_APP7RPATH_value
1735 .IF
"$(OS)" != "MACOSX"
1736 APP7LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP7RPATH
))
1739 .IF
"$(APP7STACK)" != ""
1740 .IF
"$(LINKFLAGSTACK)" != ""
1741 APP7STACKN
=$(LINKFLAGSTACK
)$(APP7STACK
)
1747 .IF
"$(APP7NOSAL)"==""
1748 .IF
"$(TARGETTYPE)" == "GUI"
1749 APP7OBJS
+= $(STDOBJVCL
)
1753 .IF
"$(GUI)$(COM)" == "WNTGCC"
1755 .IF
"$(APP7LINKRES)" != "" ||
"$(APP7RES)" != ""
1756 APP7RESO
=$(MISC
)/$(APP7TARGET
:b
)_res.o
1760 .IF
"$(GUI)" == "UNX"
1761 APP7DEPN
+:=$(APP7DEPNU
)
1765 .IF
"$(APP7TARGETN)"!=""
1767 .IF
"$(APP7PRODUCTNAME)"!=""
1768 APP7PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP7PRODUCTNAME
)\"
1769 .ENDIF
# "$(APP7PRODUCTNAME)"!=""
1771 .IF
"$(linkinc)"!=""
1772 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
1773 .IF
"$(APP7LIBS)"!=""
1774 $(MISC
)/$(APP7TARGET
)_linkinc.ls .PHONY
:
1776 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP7LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
1777 .ENDIF
#"$(APP7LIBS)"!=""
1780 LINKINCTARGETS
+=$(MISC
)/$(APP7TARGETN
:b
)_linkinc.ls
1781 $(APP7TARGETN
) : $(LINKINCTARGETS
)
1782 .ENDIF
# "$(linkinc)"!=""
1784 # Allow for target specific LIBSALCPPRT override
1785 APP7LIBSALCPPRT
*=$(LIBSALCPPRT
)
1787 .IF
"$(GUI)" == "OS2"
1788 _APP7IMP_ORD
= $(APP7STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP7STDLIBS
:^
"$(LB)/")
1789 APP7IMP_ORD
= $(foreach,i
,$(_APP7IMP_ORD
) $(shell @
-ls
$i))
1794 $(APP7TARGETN
): $(APP7OBJS
) $(APP7LIBS
) \
1797 $(APP7ICON
) $(APP7DEPN
) $(USE_APP7DEF
)
1798 @echo
------------------------------
1799 @echo
"Making: " $(@
:f
)
1801 .IF
"$(OS)"=="MACOSX"
1803 @
-$(RM
) $(MISC
)/$(@
:b
).list
1804 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1805 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
1806 @echo
$(STDSLO
) $(APP7OBJS
:s
/.obj
/.o
/) \
1807 `cat /dev/null $(APP7LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
1808 @echo
-n
$(APP7LINKER
) $(APP7LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
1809 $(APP7LINKTYPEFLAG
) $(APP7STDLIBS
) $(APP7STDLIB
) $(STDLIB7
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1810 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
1811 `cat $(MISC)/$(TARGET).$(@:b)_7.cmd` \
1812 >> $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1813 .IF
"$(VERBOSE)" == "TRUE"
1814 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1816 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1817 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
1818 # libraries at runtime
1819 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
1820 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
1822 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
1824 .IF
"$(TARGETTYPE)"=="GUI"
1825 @echo
"Making: " $(@
:f
).app
1826 @macosx-create-bundle
$@
1827 .ENDIF
# "$(TARGETTYPE)"=="GUI"
1828 .ELSE
# "$(OS)"=="MACOSX"
1830 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1831 @echo
$(APP7LINKER
) $(APP7LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1832 $(APP7OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_7.cmd
1833 @cat $(mktmp /dev/null $(APP7LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_7.cmd
1834 @echo
$(APP7LINKTYPEFLAG
) $(APP7LIBSALCPPRT
) $(APP7STDLIBS
) $(APP7STDLIB
) $(STDLIB7
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1835 .IF
"$(VERBOSE)" == "TRUE"
1836 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1838 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1839 .IF
"$(VERBOSE)" == "TRUE"
1842 .ENDIF
# "$(OS)"=="MACOSX"
1844 .IF
"$(GUI)" == "WNT"
1845 @@
-$(MKDIR
) $(@
:d
:d
)
1846 .IF
"$(APP7LINKRES)" != ""
1847 @@
-$(RM
) $(MISC
)/$(APP7LINKRES
:b
).rc
1848 .IF
"$(APP7ICON)" != ""
1849 @
-echo
1 ICON
$(EMQ
)"$(APP7ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP7LINKRES
:b
).rc
1850 .ENDIF
# "$(APP7ICON)" != ""
1851 .IF
"$(APP7VERINFO)" != ""
1852 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP7LINKRES:b).rc
1853 @
-echo
$(EMQ
)#include $(EMQ)"$(APP7VERINFO)$(EMQ)" >> $(MISC)/$(APP7LINKRES:b).rc
1854 .ENDIF
# "$(APP7VERINFO)" != ""
1855 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP7PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP7LINKRES
:b
).rc
1856 .ENDIF
# "$(APP7LINKRES)" != ""
1857 .IF
"$(COM)" == "GCC"
1859 .IF
"$(APP7LINKRES)" != "" ||
"$(APP7RES)" != ""
1860 @cat
$(APP7LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP7RES
)) > $(MISC
)/$(@
:b
)_all.res
1861 windres
$(MISC
)/$(@
:b
)_all.res
$(APP7RESO
)
1863 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1864 $(APP7BASEX
) $(APP7STACKN
) -o
$@
$(APP7OBJS
) \
1865 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP7RESO
) \
1866 `$(TYPE) /dev/null $(APP7LIBS) | sed s#$(ROUT)#$(OUT)#g` \
1867 $(APP_LINKTYPE
) $(APP7LIBSALCPPRT
) \
1868 -Wl
,--start-group
$(APP7STDLIBS
) -Wl
,--end-group
$(APP7STDLIB
) \
1869 $(STDLIB7
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1870 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
1871 .IF
"$(VERBOSE)" == "TRUE"
1872 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1874 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1876 .ELSE
# "$(COM)" == "GCC"
1877 .IF
"$(linkinc)" == ""
1878 $(COMMAND_ECHO
)$(APP7LINKER
) @
$(mktmp \
1880 $(LINKFLAGSAPP
) $(APP7BASEX
) \
1883 -map
:$(MISC
)/{$(subst,/,_
$(APP7TARGET
)).map
} \
1890 $(APP7STDLIB
) $(STDLIB7
) \
1892 @
-echo linking
$@.manifest ...
1893 .IF
"$(VISTA_MANIFEST)"!=""
1894 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1895 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1897 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1898 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1899 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1900 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1902 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP7TARGET
).lnk
1903 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP7TARGET
).lst
1904 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1905 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1906 type
$(mktmp
,$(MISC
)\
$(APP7TARGET
).lst
1908 $(LINKFLAGSAPP
) $(APP7BASEX
) \
1917 $(APP7STDLIB
) $(STDLIB7
))
1918 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP7TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP7TARGET
).lst
1919 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP7TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP7TARGET
).lst
>> $(MISC
)/$(APP7TARGET
).lnk
$(FI
)
1920 $(COMMAND_ECHO
)$(SED
)$(APP7LINKER
) @
$(MISC
)\
$(APP7TARGET
).lnk
1921 .ENDIF
# "$(linkinc)" == ""
1922 .ENDIF
# "$(COM)" == "GCC"
1923 .IF
"$(APP7TARGET)" == "loader"
1924 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1925 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1926 $(COMMAND_ECHO
)$(RM
) $@
1927 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1928 .ENDIF
# "$(TARGET)" == "setup"
1930 .ENDIF
# "$(GUI)" == "WNT"
1932 .IF
"$(GUI)" == "OS2"
1933 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
1934 .IF
"$(APP7LINKRES)" != ""
1935 @
+-$(RM
) $(MISC
)/$(APP7LINKRES
:b
).rc
>& $(NULLDEV
)
1936 .IF
"$(APP7ICON)" != ""
1937 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP7ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP7LINKRES
:b
).rc
1938 .ENDIF
# "$(APP7ICON)" != ""
1939 .IF
"$(APP7VERINFO)" != ""
1940 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP7LINKRES:b).rc
1941 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP7VERINFO)$(EMQ)" >> $(MISC)/$(APP7LINKRES:b).rc
1942 .ENDIF
# "$(APP7VERINFO)" != ""
1943 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP7PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP7LINKRES
:b
).rc
1944 .ENDIF
# "$(APP7LINKRES)" != ""
1946 .IF
"$(TARGETTYPE)" == "GUI"
1947 @echo NAME
$(APP7TARGET
) WINDOWAPI
> $(MISC
)/$(APP7TARGET
).def
1950 .IF
"$(VERBOSE)" == "TRUE"
1951 @
+echo
$(APP7LINKFLAGS
) \
1952 $(LINKFLAGSAPP
) $(APP7BASEX
) \
1956 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
1963 $(APP7STDLIBS
:^
"-l") \
1964 $(APP7STDLIB
:^
"-l") $(STDLIB7
:^
"-l")
1966 $(COMMAND_ECHO
)$(APP7LINKER
) -v \
1968 $(LINKFLAGSAPP
) $(APP7BASEX
) \
1972 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
1979 $(APP7STDLIBS
:^
"-l") \
1980 $(APP7STDLIB
:^
"-l") $(STDLIB7
:^
"-l")
1983 .IF
"$(APP7TARGET)" == "loader"
1984 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
1985 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1986 $(COMMAND_ECHO
)+$(RM
) $@
1987 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1988 .ENDIF
# "$(TARGET)" == "setup"
1990 .ENDIF
# "$(GUI)" == "OS2"
1992 .ENDIF
# "$(APP7TARGETN)"!=""
1995 # Instruction for linking
1998 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
1999 APP8DEF
= $(MISC
)/$(APP8TARGET
).def
2002 .IF
"$(APP8LINKTYPE)" != ""
2003 #must be either STATIC or SHARED
2004 APP8LINKTYPEFLAG
=$(APPLINK
$(APP8LINKTYPE
))
2007 # decide how to link
2008 .IF
"$(APP8CODETYPE)"=="C"
2010 APP8STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
2011 APP8LINKFLAGS
+=$(LINKCFLAGS
)
2012 .ELSE
# "$(APP8CODETYPE)"=="C"
2014 APP8STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
2015 APP8LINKFLAGS
+=$(LINKFLAGS
)
2016 .ENDIF
# "$(APP8CODETYPE)"=="C"
2019 LINKFLAGSRUNPATH_
$(APP8RPATH
)*=/ERROR
:/Bad_APP8RPATH_value
2020 .IF
"$(OS)" != "MACOSX"
2021 APP8LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP8RPATH
))
2024 .IF
"$(APP8STACK)" != ""
2025 .IF
"$(LINKFLAGSTACK)" != ""
2026 APP8STACKN
=$(LINKFLAGSTACK
)$(APP8STACK
)
2032 .IF
"$(APP8NOSAL)"==""
2033 .IF
"$(TARGETTYPE)" == "GUI"
2034 APP8OBJS
+= $(STDOBJVCL
)
2038 .IF
"$(GUI)$(COM)" == "WNTGCC"
2040 .IF
"$(APP8LINKRES)" != "" ||
"$(APP8RES)" != ""
2041 APP8RESO
=$(MISC
)/$(APP8TARGET
:b
)_res.o
2045 .IF
"$(GUI)" == "UNX"
2046 APP8DEPN
+:=$(APP8DEPNU
)
2050 .IF
"$(APP8TARGETN)"!=""
2052 .IF
"$(APP8PRODUCTNAME)"!=""
2053 APP8PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP8PRODUCTNAME
)\"
2054 .ENDIF
# "$(APP8PRODUCTNAME)"!=""
2056 .IF
"$(linkinc)"!=""
2057 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
2058 .IF
"$(APP8LIBS)"!=""
2059 $(MISC
)/$(APP8TARGET
)_linkinc.ls .PHONY
:
2061 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP8LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
2062 .ENDIF
#"$(APP8LIBS)"!=""
2065 LINKINCTARGETS
+=$(MISC
)/$(APP8TARGETN
:b
)_linkinc.ls
2066 $(APP8TARGETN
) : $(LINKINCTARGETS
)
2067 .ENDIF
# "$(linkinc)"!=""
2069 # Allow for target specific LIBSALCPPRT override
2070 APP8LIBSALCPPRT
*=$(LIBSALCPPRT
)
2072 .IF
"$(GUI)" == "OS2"
2073 _APP8IMP_ORD
= $(APP8STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP8STDLIBS
:^
"$(LB)/")
2074 APP8IMP_ORD
= $(foreach,i
,$(_APP8IMP_ORD
) $(shell @
-ls
$i))
2079 $(APP8TARGETN
): $(APP8OBJS
) $(APP8LIBS
) \
2082 $(APP8ICON
) $(APP8DEPN
) $(USE_APP8DEF
)
2083 @echo
------------------------------
2084 @echo
"Making: " $(@
:f
)
2086 .IF
"$(OS)"=="MACOSX"
2088 @
-$(RM
) $(MISC
)/$(@
:b
).list
2089 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2090 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
2091 @echo
$(STDSLO
) $(APP8OBJS
:s
/.obj
/.o
/) \
2092 `cat /dev/null $(APP8LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
2093 @echo
-n
$(APP8LINKER
) $(APP8LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
2094 $(APP8LINKTYPEFLAG
) $(APP8STDLIBS
) $(APP8STDLIB
) $(STDLIB8
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2095 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
2096 `cat $(MISC)/$(TARGET).$(@:b)_8.cmd` \
2097 >> $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2098 .IF
"$(VERBOSE)" == "TRUE"
2099 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2101 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2102 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
2103 # libraries at runtime
2104 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
2105 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
2107 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
2109 .IF
"$(TARGETTYPE)"=="GUI"
2110 @echo
"Making: " $(@
:f
).app
2111 @macosx-create-bundle
$@
2112 .ENDIF
# "$(TARGETTYPE)"=="GUI"
2113 .ELSE
# "$(OS)"=="MACOSX"
2115 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2116 @echo
$(APP8LINKER
) $(APP8LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
2117 $(APP8OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_8.cmd
2118 @cat $(mktmp /dev/null $(APP8LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_8.cmd
2119 @echo
$(APP8LINKTYPEFLAG
) $(APP8LIBSALCPPRT
) $(APP8STDLIBS
) $(APP8STDLIB
) $(STDLIB8
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2120 .IF
"$(VERBOSE)" == "TRUE"
2121 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2123 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2124 .IF
"$(VERBOSE)" == "TRUE"
2127 .ENDIF
# "$(OS)"=="MACOSX"
2129 .IF
"$(GUI)" == "WNT"
2130 @@
-$(MKDIR
) $(@
:d
:d
)
2131 .IF
"$(APP8LINKRES)" != ""
2132 @@
-$(RM
) $(MISC
)/$(APP8LINKRES
:b
).rc
2133 .IF
"$(APP8ICON)" != ""
2134 @
-echo
1 ICON
$(EMQ
)"$(APP8ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP8LINKRES
:b
).rc
2135 .ENDIF
# "$(APP8ICON)" != ""
2136 .IF
"$(APP8VERINFO)" != ""
2137 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP8LINKRES:b).rc
2138 @
-echo
$(EMQ
)#include $(EMQ)"$(APP8VERINFO)$(EMQ)" >> $(MISC)/$(APP8LINKRES:b).rc
2139 .ENDIF
# "$(APP8VERINFO)" != ""
2140 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP8PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP8LINKRES
:b
).rc
2141 .ENDIF
# "$(APP8LINKRES)" != ""
2142 .IF
"$(COM)" == "GCC"
2144 .IF
"$(APP8LINKRES)" != "" ||
"$(APP8RES)" != ""
2145 @cat
$(APP8LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP8RES
)) > $(MISC
)/$(@
:b
)_all.res
2146 windres
$(MISC
)/$(@
:b
)_all.res
$(APP8RESO
)
2148 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
2149 $(APP8BASEX
) $(APP8STACKN
) -o
$@
$(APP8OBJS
) \
2150 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP8RESO
) \
2151 `$(TYPE) /dev/null $(APP8LIBS) | sed s#$(ROUT)#$(OUT)#g` \
2152 $(APP_LINKTYPE
) $(APP8LIBSALCPPRT
) \
2153 -Wl
,--start-group
$(APP8STDLIBS
) -Wl
,--end-group
$(APP8STDLIB
) \
2154 $(STDLIB8
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2155 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
2156 .IF
"$(VERBOSE)" == "TRUE"
2157 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2159 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
2161 .ELSE
# "$(COM)" == "GCC"
2162 .IF
"$(linkinc)" == ""
2163 $(COMMAND_ECHO
)$(APP8LINKER
) @
$(mktmp \
2165 $(LINKFLAGSAPP
) $(APP8BASEX
) \
2168 -map
:$(MISC
)/{$(subst,/,_
$(APP8TARGET
)).map
} \
2175 $(APP8STDLIB
) $(STDLIB8
) \
2177 @
-echo linking
$@.manifest ...
2178 .IF
"$(VISTA_MANIFEST)"!=""
2179 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
2180 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
2182 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
2183 .ENDIF
# "$(VISTA_MANIFEST)"!=""
2184 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
2185 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
2187 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP8TARGET
).lnk
2188 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP8TARGET
).lst
2189 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
2190 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
2191 type
$(mktmp
,$(MISC
)\
$(APP8TARGET
).lst
2193 $(LINKFLAGSAPP
) $(APP8BASEX
) \
2202 $(APP8STDLIB
) $(STDLIB8
))
2203 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP8TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP8TARGET
).lst
2204 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP8TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP8TARGET
).lst
>> $(MISC
)/$(APP8TARGET
).lnk
$(FI
)
2205 $(COMMAND_ECHO
)$(SED
)$(APP8LINKER
) @
$(MISC
)\
$(APP8TARGET
).lnk
2206 .ENDIF
# "$(linkinc)" == ""
2207 .ENDIF
# "$(COM)" == "GCC"
2208 .IF
"$(APP8TARGET)" == "loader"
2209 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
2210 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
2211 $(COMMAND_ECHO
)$(RM
) $@
2212 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
2213 .ENDIF
# "$(TARGET)" == "setup"
2215 .ENDIF
# "$(GUI)" == "WNT"
2217 .IF
"$(GUI)" == "OS2"
2218 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
2219 .IF
"$(APP8LINKRES)" != ""
2220 @
+-$(RM
) $(MISC
)/$(APP8LINKRES
:b
).rc
>& $(NULLDEV
)
2221 .IF
"$(APP8ICON)" != ""
2222 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP8ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP8LINKRES
:b
).rc
2223 .ENDIF
# "$(APP8ICON)" != ""
2224 .IF
"$(APP8VERINFO)" != ""
2225 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP8LINKRES:b).rc
2226 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP8VERINFO)$(EMQ)" >> $(MISC)/$(APP8LINKRES:b).rc
2227 .ENDIF
# "$(APP8VERINFO)" != ""
2228 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP8PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP8LINKRES
:b
).rc
2229 .ENDIF
# "$(APP8LINKRES)" != ""
2231 .IF
"$(TARGETTYPE)" == "GUI"
2232 @echo NAME
$(APP8TARGET
) WINDOWAPI
> $(MISC
)/$(APP8TARGET
).def
2235 .IF
"$(VERBOSE)" == "TRUE"
2236 @
+echo
$(APP8LINKFLAGS
) \
2237 $(LINKFLAGSAPP
) $(APP8BASEX
) \
2241 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
2248 $(APP8STDLIBS
:^
"-l") \
2249 $(APP8STDLIB
:^
"-l") $(STDLIB8
:^
"-l")
2251 $(COMMAND_ECHO
)$(APP8LINKER
) -v \
2253 $(LINKFLAGSAPP
) $(APP8BASEX
) \
2257 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
2264 $(APP8STDLIBS
:^
"-l") \
2265 $(APP8STDLIB
:^
"-l") $(STDLIB8
:^
"-l")
2268 .IF
"$(APP8TARGET)" == "loader"
2269 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
2270 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
2271 $(COMMAND_ECHO
)+$(RM
) $@
2272 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
2273 .ENDIF
# "$(TARGET)" == "setup"
2275 .ENDIF
# "$(GUI)" == "OS2"
2277 .ENDIF
# "$(APP8TARGETN)"!=""
2280 # Instruction for linking
2283 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
2284 APP9DEF
= $(MISC
)/$(APP9TARGET
).def
2287 .IF
"$(APP9LINKTYPE)" != ""
2288 #must be either STATIC or SHARED
2289 APP9LINKTYPEFLAG
=$(APPLINK
$(APP9LINKTYPE
))
2292 # decide how to link
2293 .IF
"$(APP9CODETYPE)"=="C"
2295 APP9STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
2296 APP9LINKFLAGS
+=$(LINKCFLAGS
)
2297 .ELSE
# "$(APP9CODETYPE)"=="C"
2299 APP9STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
2300 APP9LINKFLAGS
+=$(LINKFLAGS
)
2301 .ENDIF
# "$(APP9CODETYPE)"=="C"
2304 LINKFLAGSRUNPATH_
$(APP9RPATH
)*=/ERROR
:/Bad_APP9RPATH_value
2305 .IF
"$(OS)" != "MACOSX"
2306 APP9LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP9RPATH
))
2309 .IF
"$(APP9STACK)" != ""
2310 .IF
"$(LINKFLAGSTACK)" != ""
2311 APP9STACKN
=$(LINKFLAGSTACK
)$(APP9STACK
)
2317 .IF
"$(APP9NOSAL)"==""
2318 .IF
"$(TARGETTYPE)" == "GUI"
2319 APP9OBJS
+= $(STDOBJVCL
)
2323 .IF
"$(GUI)$(COM)" == "WNTGCC"
2325 .IF
"$(APP9LINKRES)" != "" ||
"$(APP9RES)" != ""
2326 APP9RESO
=$(MISC
)/$(APP9TARGET
:b
)_res.o
2330 .IF
"$(GUI)" == "UNX"
2331 APP9DEPN
+:=$(APP9DEPNU
)
2335 .IF
"$(APP9TARGETN)"!=""
2337 .IF
"$(APP9PRODUCTNAME)"!=""
2338 APP9PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP9PRODUCTNAME
)\"
2339 .ENDIF
# "$(APP9PRODUCTNAME)"!=""
2341 .IF
"$(linkinc)"!=""
2342 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
2343 .IF
"$(APP9LIBS)"!=""
2344 $(MISC
)/$(APP9TARGET
)_linkinc.ls .PHONY
:
2346 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP9LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
2347 .ENDIF
#"$(APP9LIBS)"!=""
2350 LINKINCTARGETS
+=$(MISC
)/$(APP9TARGETN
:b
)_linkinc.ls
2351 $(APP9TARGETN
) : $(LINKINCTARGETS
)
2352 .ENDIF
# "$(linkinc)"!=""
2354 # Allow for target specific LIBSALCPPRT override
2355 APP9LIBSALCPPRT
*=$(LIBSALCPPRT
)
2357 .IF
"$(GUI)" == "OS2"
2358 _APP9IMP_ORD
= $(APP9STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP9STDLIBS
:^
"$(LB)/")
2359 APP9IMP_ORD
= $(foreach,i
,$(_APP9IMP_ORD
) $(shell @
-ls
$i))
2364 $(APP9TARGETN
): $(APP9OBJS
) $(APP9LIBS
) \
2367 $(APP9ICON
) $(APP9DEPN
) $(USE_APP9DEF
)
2368 @echo
------------------------------
2369 @echo
"Making: " $(@
:f
)
2371 .IF
"$(OS)"=="MACOSX"
2373 @
-$(RM
) $(MISC
)/$(@
:b
).list
2374 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2375 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
2376 @echo
$(STDSLO
) $(APP9OBJS
:s
/.obj
/.o
/) \
2377 `cat /dev/null $(APP9LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
2378 @echo
-n
$(APP9LINKER
) $(APP9LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
2379 $(APP9LINKTYPEFLAG
) $(APP9STDLIBS
) $(APP9STDLIB
) $(STDLIB9
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2380 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
2381 `cat $(MISC)/$(TARGET).$(@:b)_9.cmd` \
2382 >> $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2383 .IF
"$(VERBOSE)" == "TRUE"
2384 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2386 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2387 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
2388 # libraries at runtime
2389 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
2390 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
2392 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
2394 .IF
"$(TARGETTYPE)"=="GUI"
2395 @echo
"Making: " $(@
:f
).app
2396 @macosx-create-bundle
$@
2397 .ENDIF
# "$(TARGETTYPE)"=="GUI"
2398 .ELSE
# "$(OS)"=="MACOSX"
2400 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2401 @echo
$(APP9LINKER
) $(APP9LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
2402 $(APP9OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_9.cmd
2403 @cat $(mktmp /dev/null $(APP9LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_9.cmd
2404 @echo
$(APP9LINKTYPEFLAG
) $(APP9LIBSALCPPRT
) $(APP9STDLIBS
) $(APP9STDLIB
) $(STDLIB9
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2405 .IF
"$(VERBOSE)" == "TRUE"
2406 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2408 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2409 .IF
"$(VERBOSE)" == "TRUE"
2412 .ENDIF
# "$(OS)"=="MACOSX"
2414 .IF
"$(GUI)" == "WNT"
2415 @@
-$(MKDIR
) $(@
:d
:d
)
2416 .IF
"$(APP9LINKRES)" != ""
2417 @@
-$(RM
) $(MISC
)/$(APP9LINKRES
:b
).rc
2418 .IF
"$(APP9ICON)" != ""
2419 @
-echo
1 ICON
$(EMQ
)"$(APP9ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP9LINKRES
:b
).rc
2420 .ENDIF
# "$(APP9ICON)" != ""
2421 .IF
"$(APP9VERINFO)" != ""
2422 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP9LINKRES:b).rc
2423 @
-echo
$(EMQ
)#include $(EMQ)"$(APP9VERINFO)$(EMQ)" >> $(MISC)/$(APP9LINKRES:b).rc
2424 .ENDIF
# "$(APP9VERINFO)" != ""
2425 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP9PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP9LINKRES
:b
).rc
2426 .ENDIF
# "$(APP9LINKRES)" != ""
2427 .IF
"$(COM)" == "GCC"
2429 .IF
"$(APP9LINKRES)" != "" ||
"$(APP9RES)" != ""
2430 @cat
$(APP9LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP9RES
)) > $(MISC
)/$(@
:b
)_all.res
2431 windres
$(MISC
)/$(@
:b
)_all.res
$(APP9RESO
)
2433 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
2434 $(APP9BASEX
) $(APP9STACKN
) -o
$@
$(APP9OBJS
) \
2435 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP9RESO
) \
2436 `$(TYPE) /dev/null $(APP9LIBS) | sed s#$(ROUT)#$(OUT)#g` \
2437 $(APP_LINKTYPE
) $(APP9LIBSALCPPRT
) \
2438 -Wl
,--start-group
$(APP9STDLIBS
) -Wl
,--end-group
$(APP9STDLIB
) \
2439 $(STDLIB9
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2440 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
2441 .IF
"$(VERBOSE)" == "TRUE"
2442 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2444 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
2446 .ELSE
# "$(COM)" == "GCC"
2447 .IF
"$(linkinc)" == ""
2448 $(COMMAND_ECHO
)$(APP9LINKER
) @
$(mktmp \
2450 $(LINKFLAGSAPP
) $(APP9BASEX
) \
2453 -map
:$(MISC
)/{$(subst,/,_
$(APP9TARGET
)).map
} \
2460 $(APP9STDLIB
) $(STDLIB9
) \
2462 @
-echo linking
$@.manifest ...
2463 .IF
"$(VISTA_MANIFEST)"!=""
2464 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
2465 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
2467 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
2468 .ENDIF
# "$(VISTA_MANIFEST)"!=""
2469 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
2470 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
2472 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP9TARGET
).lnk
2473 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP9TARGET
).lst
2474 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
2475 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
2476 type
$(mktmp
,$(MISC
)\
$(APP9TARGET
).lst
2478 $(LINKFLAGSAPP
) $(APP9BASEX
) \
2487 $(APP9STDLIB
) $(STDLIB9
))
2488 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP9TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP9TARGET
).lst
2489 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP9TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP9TARGET
).lst
>> $(MISC
)/$(APP9TARGET
).lnk
$(FI
)
2490 $(COMMAND_ECHO
)$(SED
)$(APP9LINKER
) @
$(MISC
)\
$(APP9TARGET
).lnk
2491 .ENDIF
# "$(linkinc)" == ""
2492 .ENDIF
# "$(COM)" == "GCC"
2493 .IF
"$(APP9TARGET)" == "loader"
2494 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
2495 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
2496 $(COMMAND_ECHO
)$(RM
) $@
2497 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
2498 .ENDIF
# "$(TARGET)" == "setup"
2500 .ENDIF
# "$(GUI)" == "WNT"
2502 .IF
"$(GUI)" == "OS2"
2503 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
2504 .IF
"$(APP9LINKRES)" != ""
2505 @
+-$(RM
) $(MISC
)/$(APP9LINKRES
:b
).rc
>& $(NULLDEV
)
2506 .IF
"$(APP9ICON)" != ""
2507 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP9ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP9LINKRES
:b
).rc
2508 .ENDIF
# "$(APP9ICON)" != ""
2509 .IF
"$(APP9VERINFO)" != ""
2510 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP9LINKRES:b).rc
2511 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP9VERINFO)$(EMQ)" >> $(MISC)/$(APP9LINKRES:b).rc
2512 .ENDIF
# "$(APP9VERINFO)" != ""
2513 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP9PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP9LINKRES
:b
).rc
2514 .ENDIF
# "$(APP9LINKRES)" != ""
2516 .IF
"$(TARGETTYPE)" == "GUI"
2517 @echo NAME
$(APP9TARGET
) WINDOWAPI
> $(MISC
)/$(APP9TARGET
).def
2520 .IF
"$(VERBOSE)" == "TRUE"
2521 @
+echo
$(APP9LINKFLAGS
) \
2522 $(LINKFLAGSAPP
) $(APP9BASEX
) \
2526 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
2533 $(APP9STDLIBS
:^
"-l") \
2534 $(APP9STDLIB
:^
"-l") $(STDLIB9
:^
"-l")
2536 $(COMMAND_ECHO
)$(APP9LINKER
) -v \
2538 $(LINKFLAGSAPP
) $(APP9BASEX
) \
2542 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
2549 $(APP9STDLIBS
:^
"-l") \
2550 $(APP9STDLIB
:^
"-l") $(STDLIB9
:^
"-l")
2553 .IF
"$(APP9TARGET)" == "loader"
2554 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
2555 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
2556 $(COMMAND_ECHO
)+$(RM
) $@
2557 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
2558 .ENDIF
# "$(TARGET)" == "setup"
2560 .ENDIF
# "$(GUI)" == "OS2"
2562 .ENDIF
# "$(APP9TARGETN)"!=""
2565 # Instruction for linking
2568 .IF
"$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI"
2569 APP10DEF
= $(MISC
)/$(APP10TARGET
).def
2572 .IF
"$(APP10LINKTYPE)" != ""
2573 #must be either STATIC or SHARED
2574 APP10LINKTYPEFLAG
=$(APPLINK
$(APP10LINKTYPE
))
2577 # decide how to link
2578 .IF
"$(APP10CODETYPE)"=="C"
2579 APP10LINKER
=$(LINKC
)
2580 APP10STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
2581 APP10LINKFLAGS
+=$(LINKCFLAGS
)
2582 .ELSE
# "$(APP10CODETYPE)"=="C"
2584 APP10STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
2585 APP10LINKFLAGS
+=$(LINKFLAGS
)
2586 .ENDIF
# "$(APP10CODETYPE)"=="C"
2589 LINKFLAGSRUNPATH_
$(APP10RPATH
)*=/ERROR
:/Bad_APP10RPATH_value
2590 .IF
"$(OS)" != "MACOSX"
2591 APP10LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP10RPATH
))
2594 .IF
"$(APP10STACK)" != ""
2595 .IF
"$(LINKFLAGSTACK)" != ""
2596 APP10STACKN
=$(LINKFLAGSTACK
)$(APP10STACK
)
2602 .IF
"$(APP10NOSAL)"==""
2603 .IF
"$(TARGETTYPE)" == "GUI"
2604 APP10OBJS
+= $(STDOBJVCL
)
2608 .IF
"$(GUI)$(COM)" == "WNTGCC"
2610 .IF
"$(APP10LINKRES)" != "" ||
"$(APP10RES)" != ""
2611 APP10RESO
=$(MISC
)/$(APP10TARGET
:b
)_res.o
2615 .IF
"$(GUI)" == "UNX"
2616 APP10DEPN
+:=$(APP10DEPNU
)
2620 .IF
"$(APP10TARGETN)"!=""
2622 .IF
"$(APP10PRODUCTNAME)"!=""
2623 APP10PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP10PRODUCTNAME
)\"
2624 .ENDIF
# "$(APP10PRODUCTNAME)"!=""
2626 .IF
"$(linkinc)"!=""
2627 .IF
"$(GUI)"=="WNT" ||
"$(GUI)"=="OS2"
2628 .IF
"$(APP10LIBS)"!=""
2629 $(MISC
)/$(APP10TARGET
)_linkinc.ls .PHONY
:
2631 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP10LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
2632 .ENDIF
#"$(APP10LIBS)"!=""
2635 LINKINCTARGETS
+=$(MISC
)/$(APP10TARGETN
:b
)_linkinc.ls
2636 $(APP10TARGETN
) : $(LINKINCTARGETS
)
2637 .ENDIF
# "$(linkinc)"!=""
2639 # Allow for target specific LIBSALCPPRT override
2640 APP10LIBSALCPPRT
*=$(LIBSALCPPRT
)
2642 .IF
"$(GUI)" == "OS2"
2643 _APP10IMP_ORD
= $(APP10STDLIBS
:^
"$(SOLARVERSION)/$(INPATH)/lib/") $(APP10STDLIBS
:^
"$(LB)/")
2644 APP10IMP_ORD
= $(foreach,i
,$(_APP10IMP_ORD
) $(shell @
-ls
$i))
2649 $(APP10TARGETN
): $(APP10OBJS
) $(APP10LIBS
) \
2652 $(APP10ICON
) $(APP10DEPN
) $(USE_APP10DEF
)
2653 @echo
------------------------------
2654 @echo
"Making: " $(@
:f
)
2656 .IF
"$(OS)"=="MACOSX"
2658 @
-$(RM
) $(MISC
)/$(@
:b
).list
2659 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2660 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
2661 @echo
$(STDSLO
) $(APP10OBJS
:s
/.obj
/.o
/) \
2662 `cat /dev/null $(APP10LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
2663 @echo
-n
$(APP10LINKER
) $(APP10LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
2664 $(APP10LINKTYPEFLAG
) $(APP10STDLIBS
) $(APP10STDLIB
) $(STDLIB10
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2665 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
2666 `cat $(MISC)/$(TARGET).$(@:b)_10.cmd` \
2667 >> $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2668 .IF
"$(VERBOSE)" == "TRUE"
2669 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2671 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2672 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
2673 # libraries at runtime
2674 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
2675 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
2677 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
2678 app
$(APP10RPATH
) $@
2679 .IF
"$(TARGETTYPE)"=="GUI"
2680 @echo
"Making: " $(@
:f
).app
2681 @macosx-create-bundle
$@
2682 .ENDIF
# "$(TARGETTYPE)"=="GUI"
2683 .ELSE
# "$(OS)"=="MACOSX"
2685 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2686 @echo
$(APP10LINKER
) $(APP10LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
2687 $(APP10OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_10.cmd
2688 @cat $(mktmp /dev/null $(APP10LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_10.cmd
2689 @echo
$(APP10LINKTYPEFLAG
) $(APP10LIBSALCPPRT
) $(APP10STDLIBS
) $(APP10STDLIB
) $(STDLIB10
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2690 .IF
"$(VERBOSE)" == "TRUE"
2691 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2693 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2694 .IF
"$(VERBOSE)" == "TRUE"
2697 .ENDIF
# "$(OS)"=="MACOSX"
2699 .IF
"$(GUI)" == "WNT"
2700 @@
-$(MKDIR
) $(@
:d
:d
)
2701 .IF
"$(APP10LINKRES)" != ""
2702 @@
-$(RM
) $(MISC
)/$(APP10LINKRES
:b
).rc
2703 .IF
"$(APP10ICON)" != ""
2704 @
-echo
1 ICON
$(EMQ
)"$(APP10ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP10LINKRES
:b
).rc
2705 .ENDIF
# "$(APP10ICON)" != ""
2706 .IF
"$(APP10VERINFO)" != ""
2707 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP10LINKRES:b).rc
2708 @
-echo
$(EMQ
)#include $(EMQ)"$(APP10VERINFO)$(EMQ)" >> $(MISC)/$(APP10LINKRES:b).rc
2709 .ENDIF
# "$(APP10VERINFO)" != ""
2710 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP10PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP10LINKRES
:b
).rc
2711 .ENDIF
# "$(APP10LINKRES)" != ""
2712 .IF
"$(COM)" == "GCC"
2714 .IF
"$(APP10LINKRES)" != "" ||
"$(APP10RES)" != ""
2715 @cat
$(APP10LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP10RES
)) > $(MISC
)/$(@
:b
)_all.res
2716 windres
$(MISC
)/$(@
:b
)_all.res
$(APP10RESO
)
2718 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
2719 $(APP10BASEX
) $(APP10STACKN
) -o
$@
$(APP10OBJS
) \
2720 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP10RESO
) \
2721 `$(TYPE) /dev/null $(APP10LIBS) | sed s#$(ROUT)#$(OUT)#g` \
2722 $(APP_LINKTYPE
) $(APP10LIBSALCPPRT
) \
2723 -Wl
,--start-group
$(APP10STDLIBS
) -Wl
,--end-group
$(APP10STDLIB
) \
2724 $(STDLIB10
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2725 # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs
2726 .IF
"$(VERBOSE)" == "TRUE"
2727 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2729 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2731 .ELSE
# "$(COM)" == "GCC"
2732 .IF
"$(linkinc)" == ""
2733 $(COMMAND_ECHO
)$(APP10LINKER
) @
$(mktmp \
2735 $(LINKFLAGSAPP
) $(APP10BASEX
) \
2738 -map
:$(MISC
)/{$(subst,/,_
$(APP10TARGET
)).map
} \
2745 $(APP10STDLIB
) $(STDLIB10
) \
2747 @
-echo linking
$@.manifest ...
2748 .IF
"$(VISTA_MANIFEST)"!=""
2749 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
2750 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
2752 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
2753 .ENDIF
# "$(VISTA_MANIFEST)"!=""
2754 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
2755 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
2757 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP10TARGET
).lnk
2758 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP10TARGET
).lst
2759 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
2760 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
2761 type
$(mktmp
,$(MISC
)\
$(APP10TARGET
).lst
2763 $(LINKFLAGSAPP
) $(APP10BASEX
) \
2772 $(APP10STDLIB
) $(STDLIB10
))
2773 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP10TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP10TARGET
).lst
2774 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP10TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP10TARGET
).lst
>> $(MISC
)/$(APP10TARGET
).lnk
$(FI
)
2775 $(COMMAND_ECHO
)$(SED
)$(APP10LINKER
) @
$(MISC
)\
$(APP10TARGET
).lnk
2776 .ENDIF
# "$(linkinc)" == ""
2777 .ENDIF
# "$(COM)" == "GCC"
2778 .IF
"$(APP10TARGET)" == "loader"
2779 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
2780 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
2781 $(COMMAND_ECHO
)$(RM
) $@
2782 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
2783 .ENDIF
# "$(TARGET)" == "setup"
2785 .ENDIF
# "$(GUI)" == "WNT"
2787 .IF
"$(GUI)" == "OS2"
2788 @
+-$(MKDIR
) $(@
:d
:d
) >& $(NULLDEV
)
2789 .IF
"$(APP10LINKRES)" != ""
2790 @
+-$(RM
) $(MISC
)/$(APP10LINKRES
:b
).rc
>& $(NULLDEV
)
2791 .IF
"$(APP10ICON)" != ""
2792 @
-+$(WRAPCMD
) echo
1 ICON
$(EMQ
)"$(APP10ICON)$(EMQ)" |
$(SED
) 'sX\\X\\\\Xg' >> $(MISC
)/$(APP10LINKRES
:b
).rc
2793 .ENDIF
# "$(APP10ICON)" != ""
2794 .IF
"$(APP10VERINFO)" != ""
2795 @
-+echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP10LINKRES:b).rc
2796 @
-+echo
$(EMQ
)#include $(EMQ)"$(APP10VERINFO)$(EMQ)" >> $(MISC)/$(APP10LINKRES:b).rc
2797 .ENDIF
# "$(APP10VERINFO)" != ""
2798 $(COMMAND_ECHO
)$(RC
) -r
-DOS2
$(APP10PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP10LINKRES
:b
).rc
2799 .ENDIF
# "$(APP10LINKRES)" != ""
2801 .IF
"$(TARGETTYPE)" == "GUI"
2802 @echo NAME
$(APP10TARGET
) WINDOWAPI
> $(MISC
)/$(APP10TARGET
).def
2805 .IF
"$(VERBOSE)" == "TRUE"
2806 @
+echo
$(APP10LINKFLAGS
) \
2807 $(LINKFLAGSAPP
) $(APP10BASEX
) \
2811 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
2818 $(APP10STDLIBS
:^
"-l") \
2819 $(APP10STDLIB
:^
"-l") $(STDLIB10
:^
"-l")
2821 $(COMMAND_ECHO
)$(APP10LINKER
) -v \
2823 $(LINKFLAGSAPP
) $(APP10BASEX
) \
2827 -L
$(SOLARVERSION
)/$(INPATH
)/lib \
2834 $(APP10STDLIBS
:^
"-l") \
2835 $(APP10STDLIB
:^
"-l") $(STDLIB10
:^
"-l")
2838 .IF
"$(APP10TARGET)" == "loader"
2839 $(COMMAND_ECHO
)+$(PERL
) loader.pl
$@
2840 $(COMMAND_ECHO
)+$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
2841 $(COMMAND_ECHO
)+$(RM
) $@
2842 $(COMMAND_ECHO
)+$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
2843 .ENDIF
# "$(TARGET)" == "setup"
2845 .ENDIF
# "$(GUI)" == "OS2"
2847 .ENDIF
# "$(APP10TARGETN)"!=""
2850 # Instruction for linking