3 .IF
"$(APP1LINKTYPE)" != ""
4 #must be either STATIC or SHARED
5 APP1LINKTYPEFLAG
=$(APPLINK
$(APP1LINKTYPE
))
9 .IF
"$(APP1CODETYPE)"=="C"
11 APP1STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
12 APP1LINKFLAGS
+=$(LINKCFLAGS
)
13 .ELSE
# "$(APP1CODETYPE)"=="C"
15 APP1STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
16 APP1LINKFLAGS
+=$(LINKFLAGS
)
17 .ENDIF
# "$(APP1CODETYPE)"=="C"
20 LINKFLAGSRUNPATH_
$(APP1RPATH
)*=/ERROR
:/Bad_APP1RPATH_value
21 .IF
"$(OS)" != "MACOSX"
22 APP1LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP1RPATH
))
25 .IF
"$(APP1STACK)" != ""
26 .IF
"$(LINKFLAGSTACK)" != ""
27 APP1STACKN
=$(LINKFLAGSTACK
)$(APP1STACK
)
33 .IF
"$(APP1NOSAL)"==""
34 .IF
"$(TARGETTYPE)" == "GUI"
35 APP1STDLIB
+= -lvclmain
39 .IF
"$(GUI)$(COM)" == "WNTGCC"
41 .IF
"$(APP1LINKRES)" != "" ||
"$(APP1RES)" != ""
42 APP1RESO
=$(MISC
)/$(APP1TARGET
:b
)_res.o
47 APP1DEPN
+:=$(APP1DEPNU
)
51 .IF
"$(APP1TARGETN)"!=""
53 .IF
"$(APP1PRODUCTNAME)"!=""
54 APP1PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP1PRODUCTNAME
)\"
55 .ENDIF
# "$(APP1PRODUCTNAME)"!=""
60 $(MISC
)/$(APP1TARGET
)_linkinc.ls .PHONY
:
62 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP1LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
63 .ENDIF
#"$(APP1LIBS)"!=""
66 LINKINCTARGETS
+=$(MISC
)/$(APP1TARGETN
:b
)_linkinc.ls
67 $(APP1TARGETN
) : $(LINKINCTARGETS
)
68 .ENDIF
# "$(linkinc)"!=""
70 # Allow for target specific LIBSALCPPRT override
71 APP1LIBSALCPPRT
*=$(LIBSALCPPRT
)
73 $(APP1TARGETN
): $(APP1OBJS
) $(APP1LIBS
) \
75 $(APP1ICON
) $(APP1DEPN
) $(USE_APP1DEF
)
76 @echo
"Making: " $(@
:f
)
79 @
-$(RM
) $(MISC
)/$(@
:b
).list
80 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
81 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
82 @echo
$(STDSLO
) $(APP1OBJS
:s
/.obj
/.o
/) \
83 `cat /dev/null $(APP1LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
84 @
/bin
/echo
-n
$(APP1LINKER
) $(APP1LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
85 $(APP1LINKTYPEFLAG
) $(APP1STDLIBS
) $(APP1STDLIB
) $(STDLIB1
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
86 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
87 `cat $(MISC)/$(TARGET).$(@:b)_1.cmd` \
88 >> $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
89 .IF
"$(VERBOSE)" == "TRUE"
90 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
92 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
93 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
94 # libraries at runtime
95 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
96 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
97 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
99 .IF
"$(TARGETTYPE)"=="GUI"
100 @echo
"Making: " $(@
:f
).app
101 @macosx-create-bundle
$@
102 .ENDIF
# "$(TARGETTYPE)"=="GUI"
103 .ELSE
# "$(OS)"=="MACOSX"
104 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
105 @echo
$(APP1LINKER
) $(APP1LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
106 $(APP1OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_1.cmd
107 @cat $(mktmp /dev/null $(APP1LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_1.cmd
108 @echo
$(APP1LINKTYPEFLAG
) $(APP1LIBSALCPPRT
) $(APP1STDLIBS
) $(APP1STDLIB
) $(STDLIB1
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
109 .IF
"$(VERBOSE)" == "TRUE"
110 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
112 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
113 .IF
"$(VERBOSE)" == "TRUE"
115 .ENDIF
# "$(OS)"=="MACOSX"
117 .IF
"$(GUI)" == "WNT"
119 .IF
"$(APP1LINKRES)" != ""
120 @@
-$(RM
) $(MISC
)/$(APP1LINKRES
:b
).rc
121 .IF
"$(APP1ICON)" != ""
122 @
-echo
1 ICON
$(EMQ
)"$(APP1ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP1LINKRES
:b
).rc
123 .ENDIF
# "$(APP1ICON)" != ""
124 .IF
"$(APP1VERINFO)" != ""
125 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP1LINKRES:b).rc
126 @
-echo
$(EMQ
)#include $(EMQ)"$(APP1VERINFO)$(EMQ)" >> $(MISC)/$(APP1LINKRES:b).rc
127 .ENDIF
# "$(APP1VERINFO)" != ""
128 .IF
"$(COM)" == "GCC"
129 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP1PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP1LINKRES
:b
).res
$(MISC
)/$(APP1LINKRES
:b
).rc
131 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP1PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP1LINKRES
:b
).rc
133 .ENDIF
# "$(APP1LINKRES)" != ""
134 .IF
"$(COM)" == "GCC"
135 .IF
"$(APP1LINKRES)" != "" ||
"$(APP1RES)" != ""
136 @cat
$(APP1LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP1RES
)) > $(MISC
)/$(@
:b
)_all.res
137 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP1RESO
)
139 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
140 $(APP1BASEX
) $(APP1STACKN
) -o
$@
$(APP1OBJS
) \
141 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP1RESO
) \
142 `$(TYPE) /dev/null $(APP1LIBS) | sed s#$(ROUT)#$(OUT)#g` \
143 $(APP_LINKTYPE
) $(APP1LIBSALCPPRT
) \
144 -Wl
,--start-group
$(APP1STDLIBS
) -Wl
,--end-group
$(APP1STDLIB
) \
145 $(STDLIB1
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
146 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
147 .IF
"$(VERBOSE)" == "TRUE"
148 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
150 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_1.cmd
151 .ELSE
# "$(COM)" == "GCC"
152 .IF
"$(linkinc)" == ""
153 $(COMMAND_ECHO
)$(APP1LINKER
) @
$(mktmp \
155 $(LINKFLAGSAPP
) $(APP1BASEX
) \
158 -map
:$(MISC
)/{$(subst,/,_
$(APP1TARGET
)).map
} \
165 $(APP1STDLIB
) $(STDLIB1
) \
167 @
-echo linking
$@.manifest ...
168 .IF
"$(VISTA_MANIFEST)"!=""
169 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
170 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
172 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
173 .ENDIF
# "$(VISTA_MANIFEST)"!=""
174 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
175 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
177 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP1TARGET
).lnk
178 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP1TARGET
).lst
179 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
180 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
181 type
$(mktmp
,$(MISC
)\
$(APP1TARGET
).lst
183 $(LINKFLAGSAPP
) $(APP1BASEX
) \
192 $(APP1STDLIB
) $(STDLIB1
))
193 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP1TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP1TARGET
).lst
194 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP1TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP1TARGET
).lst
>> $(MISC
)/$(APP1TARGET
).lnk
$(FI
)
195 $(COMMAND_ECHO
)$(SED
)$(APP1LINKER
) @
$(MISC
)\
$(APP1TARGET
).lnk
196 .ENDIF
# "$(linkinc)" == ""
197 .ENDIF
# "$(COM)" == "GCC"
198 .IF
"$(APP1TARGET)" == "loader"
199 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
200 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
201 $(COMMAND_ECHO
)$(RM
) $@
202 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
203 .ENDIF
# "$(TARGET)" == "setup"
205 .ENDIF
# "$(GUI)" == "WNT"
207 .ENDIF
# "$(APP1TARGETN)"!=""
210 # Instruction for linking
213 .IF
"$(APP2LINKTYPE)" != ""
214 #must be either STATIC or SHARED
215 APP2LINKTYPEFLAG
=$(APPLINK
$(APP2LINKTYPE
))
219 .IF
"$(APP2CODETYPE)"=="C"
221 APP2STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
222 APP2LINKFLAGS
+=$(LINKCFLAGS
)
223 .ELSE
# "$(APP2CODETYPE)"=="C"
225 APP2STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
226 APP2LINKFLAGS
+=$(LINKFLAGS
)
227 .ENDIF
# "$(APP2CODETYPE)"=="C"
230 LINKFLAGSRUNPATH_
$(APP2RPATH
)*=/ERROR
:/Bad_APP2RPATH_value
231 .IF
"$(OS)" != "MACOSX"
232 APP2LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP2RPATH
))
235 .IF
"$(APP2STACK)" != ""
236 .IF
"$(LINKFLAGSTACK)" != ""
237 APP2STACKN
=$(LINKFLAGSTACK
)$(APP2STACK
)
243 .IF
"$(APP2NOSAL)"==""
244 .IF
"$(TARGETTYPE)" == "GUI"
245 APP2STDLIB
+= -lvclmain
249 .IF
"$(GUI)$(COM)" == "WNTGCC"
251 .IF
"$(APP2LINKRES)" != "" ||
"$(APP2RES)" != ""
252 APP2RESO
=$(MISC
)/$(APP2TARGET
:b
)_res.o
256 .IF
"$(GUI)" == "UNX"
257 APP2DEPN
+:=$(APP2DEPNU
)
261 .IF
"$(APP2TARGETN)"!=""
263 .IF
"$(APP2PRODUCTNAME)"!=""
264 APP2PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP2PRODUCTNAME
)\"
265 .ENDIF
# "$(APP2PRODUCTNAME)"!=""
269 .IF
"$(APP2LIBS)"!=""
270 $(MISC
)/$(APP2TARGET
)_linkinc.ls .PHONY
:
272 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP2LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
273 .ENDIF
#"$(APP2LIBS)"!=""
276 LINKINCTARGETS
+=$(MISC
)/$(APP2TARGETN
:b
)_linkinc.ls
277 $(APP2TARGETN
) : $(LINKINCTARGETS
)
278 .ENDIF
# "$(linkinc)"!=""
280 # Allow for target specific LIBSALCPPRT override
281 APP2LIBSALCPPRT
*=$(LIBSALCPPRT
)
283 $(APP2TARGETN
): $(APP2OBJS
) $(APP2LIBS
) \
285 $(APP2ICON
) $(APP2DEPN
) $(USE_APP2DEF
)
286 @echo
"Making: " $(@
:f
)
288 .IF
"$(OS)"=="MACOSX"
289 @
-$(RM
) $(MISC
)/$(@
:b
).list
290 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
291 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
292 @echo
$(STDSLO
) $(APP2OBJS
:s
/.obj
/.o
/) \
293 `cat /dev/null $(APP2LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
294 @
/bin
/echo
-n
$(APP2LINKER
) $(APP2LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
295 $(APP2LINKTYPEFLAG
) $(APP2STDLIBS
) $(APP2STDLIB
) $(STDLIB2
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
296 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
297 `cat $(MISC)/$(TARGET).$(@:b)_2.cmd` \
298 >> $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
299 .IF
"$(VERBOSE)" == "TRUE"
300 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
302 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
303 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
304 # libraries at runtime
305 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
306 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
307 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
309 .IF
"$(TARGETTYPE)"=="GUI"
310 @echo
"Making: " $(@
:f
).app
311 @macosx-create-bundle
$@
312 .ENDIF
# "$(TARGETTYPE)"=="GUI"
313 .ELSE
# "$(OS)"=="MACOSX"
314 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
315 @echo
$(APP2LINKER
) $(APP2LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
316 $(APP2OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_2.cmd
317 @cat $(mktmp /dev/null $(APP2LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_2.cmd
318 @echo
$(APP2LINKTYPEFLAG
) $(APP2LIBSALCPPRT
) $(APP2STDLIBS
) $(APP2STDLIB
) $(STDLIB2
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
319 .IF
"$(VERBOSE)" == "TRUE"
320 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
322 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
323 .IF
"$(VERBOSE)" == "TRUE"
325 .ENDIF
# "$(OS)"=="MACOSX"
327 .IF
"$(GUI)" == "WNT"
329 .IF
"$(APP2LINKRES)" != ""
330 @@
-$(RM
) $(MISC
)/$(APP2LINKRES
:b
).rc
331 .IF
"$(APP2ICON)" != ""
332 @
-echo
1 ICON
$(EMQ
)"$(APP2ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP2LINKRES
:b
).rc
333 .ENDIF
# "$(APP2ICON)" != ""
334 .IF
"$(APP2VERINFO)" != ""
335 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP2LINKRES:b).rc
336 @
-echo
$(EMQ
)#include $(EMQ)"$(APP2VERINFO)$(EMQ)" >> $(MISC)/$(APP2LINKRES:b).rc
337 .ENDIF
# "$(APP2VERINFO)" != ""
338 .IF
"$(COM)" == "GCC"
339 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP2PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP2LINKRES
:b
).res
$(MISC
)/$(APP2LINKRES
:b
).rc
341 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP2PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP2LINKRES
:b
).rc
343 .ENDIF
# "$(APP2LINKRES)" != ""
344 .IF
"$(COM)" == "GCC"
345 .IF
"$(APP2LINKRES)" != "" ||
"$(APP2RES)" != ""
346 @cat
$(APP2LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP2RES
)) > $(MISC
)/$(@
:b
)_all.res
347 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP2RESO
)
349 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
350 $(APP2BASEX
) $(APP2STACKN
) -o
$@
$(APP2OBJS
) \
351 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP2RESO
) \
352 `$(TYPE) /dev/null $(APP2LIBS) | sed s#$(ROUT)#$(OUT)#g` \
353 $(APP_LINKTYPE
) $(APP2LIBSALCPPRT
) \
354 -Wl
,--start-group
$(APP2STDLIBS
) -Wl
,--end-group
$(APP2STDLIB
) \
355 $(STDLIB2
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
356 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
357 .IF
"$(VERBOSE)" == "TRUE"
358 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
360 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_2.cmd
361 .ELSE
# "$(COM)" == "GCC"
362 .IF
"$(linkinc)" == ""
363 $(COMMAND_ECHO
)$(APP2LINKER
) @
$(mktmp \
365 $(LINKFLAGSAPP
) $(APP2BASEX
) \
368 -map
:$(MISC
)/{$(subst,/,_
$(APP2TARGET
)).map
} \
375 $(APP2STDLIB
) $(STDLIB2
) \
377 @
-echo linking
$@.manifest ...
378 .IF
"$(VISTA_MANIFEST)"!=""
379 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
380 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
382 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
383 .ENDIF
# "$(VISTA_MANIFEST)"!=""
384 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
385 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
387 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP2TARGET
).lnk
388 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP2TARGET
).lst
389 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
390 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
391 type
$(mktmp
,$(MISC
)\
$(APP2TARGET
).lst
393 $(LINKFLAGSAPP
) $(APP2BASEX
) \
402 $(APP2STDLIB
) $(STDLIB2
))
403 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP2TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP2TARGET
).lst
404 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP2TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP2TARGET
).lst
>> $(MISC
)/$(APP2TARGET
).lnk
$(FI
)
405 $(COMMAND_ECHO
)$(SED
)$(APP2LINKER
) @
$(MISC
)\
$(APP2TARGET
).lnk
406 .ENDIF
# "$(linkinc)" == ""
407 .ENDIF
# "$(COM)" == "GCC"
408 .IF
"$(APP2TARGET)" == "loader"
409 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
410 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
411 $(COMMAND_ECHO
)$(RM
) $@
412 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
413 .ENDIF
# "$(TARGET)" == "setup"
415 .ENDIF
# "$(GUI)" == "WNT"
417 .ENDIF
# "$(APP2TARGETN)"!=""
420 # Instruction for linking
423 .IF
"$(APP3LINKTYPE)" != ""
424 #must be either STATIC or SHARED
425 APP3LINKTYPEFLAG
=$(APPLINK
$(APP3LINKTYPE
))
429 .IF
"$(APP3CODETYPE)"=="C"
431 APP3STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
432 APP3LINKFLAGS
+=$(LINKCFLAGS
)
433 .ELSE
# "$(APP3CODETYPE)"=="C"
435 APP3STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
436 APP3LINKFLAGS
+=$(LINKFLAGS
)
437 .ENDIF
# "$(APP3CODETYPE)"=="C"
440 LINKFLAGSRUNPATH_
$(APP3RPATH
)*=/ERROR
:/Bad_APP3RPATH_value
441 .IF
"$(OS)" != "MACOSX"
442 APP3LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP3RPATH
))
445 .IF
"$(APP3STACK)" != ""
446 .IF
"$(LINKFLAGSTACK)" != ""
447 APP3STACKN
=$(LINKFLAGSTACK
)$(APP3STACK
)
453 .IF
"$(APP3NOSAL)"==""
454 .IF
"$(TARGETTYPE)" == "GUI"
455 APP3STDLIB
+= -lvclmain
459 .IF
"$(GUI)$(COM)" == "WNTGCC"
461 .IF
"$(APP3LINKRES)" != "" ||
"$(APP3RES)" != ""
462 APP3RESO
=$(MISC
)/$(APP3TARGET
:b
)_res.o
466 .IF
"$(GUI)" == "UNX"
467 APP3DEPN
+:=$(APP3DEPNU
)
471 .IF
"$(APP3TARGETN)"!=""
473 .IF
"$(APP3PRODUCTNAME)"!=""
474 APP3PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP3PRODUCTNAME
)\"
475 .ENDIF
# "$(APP3PRODUCTNAME)"!=""
479 .IF
"$(APP3LIBS)"!=""
480 $(MISC
)/$(APP3TARGET
)_linkinc.ls .PHONY
:
482 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP3LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
483 .ENDIF
#"$(APP3LIBS)"!=""
486 LINKINCTARGETS
+=$(MISC
)/$(APP3TARGETN
:b
)_linkinc.ls
487 $(APP3TARGETN
) : $(LINKINCTARGETS
)
488 .ENDIF
# "$(linkinc)"!=""
490 # Allow for target specific LIBSALCPPRT override
491 APP3LIBSALCPPRT
*=$(LIBSALCPPRT
)
493 $(APP3TARGETN
): $(APP3OBJS
) $(APP3LIBS
) \
495 $(APP3ICON
) $(APP3DEPN
) $(USE_APP3DEF
)
496 @echo
"Making: " $(@
:f
)
498 .IF
"$(OS)"=="MACOSX"
499 @
-$(RM
) $(MISC
)/$(@
:b
).list
500 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
501 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
502 @echo
$(STDSLO
) $(APP3OBJS
:s
/.obj
/.o
/) \
503 `cat /dev/null $(APP3LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
504 @
/bin
/echo
-n
$(APP3LINKER
) $(APP3LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
505 $(APP3LINKTYPEFLAG
) $(APP3STDLIBS
) $(APP3STDLIB
) $(STDLIB3
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
506 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
507 `cat $(MISC)/$(TARGET).$(@:b)_3.cmd` \
508 >> $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
509 .IF
"$(VERBOSE)" == "TRUE"
510 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
512 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
513 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
514 # libraries at runtime
515 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
516 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
517 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
519 .IF
"$(TARGETTYPE)"=="GUI"
520 @echo
"Making: " $(@
:f
).app
521 @macosx-create-bundle
$@
522 .ENDIF
# "$(TARGETTYPE)"=="GUI"
523 .ELSE
# "$(OS)"=="MACOSX"
524 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
525 @echo
$(APP3LINKER
) $(APP3LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
526 $(APP3OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_3.cmd
527 @cat $(mktmp /dev/null $(APP3LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_3.cmd
528 @echo
$(APP3LINKTYPEFLAG
) $(APP3LIBSALCPPRT
) $(APP3STDLIBS
) $(APP3STDLIB
) $(STDLIB3
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
529 .IF
"$(VERBOSE)" == "TRUE"
530 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
532 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
533 .IF
"$(VERBOSE)" == "TRUE"
535 .ENDIF
# "$(OS)"=="MACOSX"
537 .IF
"$(GUI)" == "WNT"
539 .IF
"$(APP3LINKRES)" != ""
540 @@
-$(RM
) $(MISC
)/$(APP3LINKRES
:b
).rc
541 .IF
"$(APP3ICON)" != ""
542 @
-echo
1 ICON
$(EMQ
)"$(APP3ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP3LINKRES
:b
).rc
543 .ENDIF
# "$(APP3ICON)" != ""
544 .IF
"$(APP3VERINFO)" != ""
545 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP3LINKRES:b).rc
546 @
-echo
$(EMQ
)#include $(EMQ)"$(APP3VERINFO)$(EMQ)" >> $(MISC)/$(APP3LINKRES:b).rc
547 .ENDIF
# "$(APP3VERINFO)" != ""
548 .IF
"$(COM)" == "GCC"
549 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP3PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP3LINKRES
:b
).res
$(MISC
)/$(APP3LINKRES
:b
).rc
551 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP3PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP3LINKRES
:b
).rc
553 .ENDIF
# "$(APP3LINKRES)" != ""
554 .IF
"$(COM)" == "GCC"
555 .IF
"$(APP3LINKRES)" != "" ||
"$(APP3RES)" != ""
556 @cat
$(APP3LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP3RES
)) > $(MISC
)/$(@
:b
)_all.res
557 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP3RESO
)
559 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
560 $(APP3BASEX
) $(APP3STACKN
) -o
$@
$(APP3OBJS
) \
561 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP3RESO
) \
562 `$(TYPE) /dev/null $(APP3LIBS) | sed s#$(ROUT)#$(OUT)#g` \
563 $(APP_LINKTYPE
) $(APP3LIBSALCPPRT
) \
564 -Wl
,--start-group
$(APP3STDLIBS
) -Wl
,--end-group
$(APP3STDLIB
) \
565 $(STDLIB3
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
566 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
567 .IF
"$(VERBOSE)" == "TRUE"
568 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
570 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_3.cmd
571 .ELSE
# "$(COM)" == "GCC"
572 .IF
"$(linkinc)" == ""
573 $(COMMAND_ECHO
)$(APP3LINKER
) @
$(mktmp \
575 $(LINKFLAGSAPP
) $(APP3BASEX
) \
578 -map
:$(MISC
)/{$(subst,/,_
$(APP3TARGET
)).map
} \
585 $(APP3STDLIB
) $(STDLIB3
) \
587 @
-echo linking
$@.manifest ...
588 .IF
"$(VISTA_MANIFEST)"!=""
589 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
590 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
592 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
593 .ENDIF
# "$(VISTA_MANIFEST)"!=""
594 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
595 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
597 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP3TARGET
).lnk
598 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP3TARGET
).lst
599 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
600 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
601 type
$(mktmp
,$(MISC
)\
$(APP3TARGET
).lst
603 $(LINKFLAGSAPP
) $(APP3BASEX
) \
612 $(APP3STDLIB
) $(STDLIB3
))
613 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP3TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP3TARGET
).lst
614 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP3TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP3TARGET
).lst
>> $(MISC
)/$(APP3TARGET
).lnk
$(FI
)
615 $(COMMAND_ECHO
)$(SED
)$(APP3LINKER
) @
$(MISC
)\
$(APP3TARGET
).lnk
616 .ENDIF
# "$(linkinc)" == ""
617 .ENDIF
# "$(COM)" == "GCC"
618 .IF
"$(APP3TARGET)" == "loader"
619 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
620 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
621 $(COMMAND_ECHO
)$(RM
) $@
622 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
623 .ENDIF
# "$(TARGET)" == "setup"
625 .ENDIF
# "$(GUI)" == "WNT"
627 .ENDIF
# "$(APP3TARGETN)"!=""
630 # Instruction for linking
633 .IF
"$(APP4LINKTYPE)" != ""
634 #must be either STATIC or SHARED
635 APP4LINKTYPEFLAG
=$(APPLINK
$(APP4LINKTYPE
))
639 .IF
"$(APP4CODETYPE)"=="C"
641 APP4STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
642 APP4LINKFLAGS
+=$(LINKCFLAGS
)
643 .ELSE
# "$(APP4CODETYPE)"=="C"
645 APP4STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
646 APP4LINKFLAGS
+=$(LINKFLAGS
)
647 .ENDIF
# "$(APP4CODETYPE)"=="C"
650 LINKFLAGSRUNPATH_
$(APP4RPATH
)*=/ERROR
:/Bad_APP4RPATH_value
651 .IF
"$(OS)" != "MACOSX"
652 APP4LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP4RPATH
))
655 .IF
"$(APP4STACK)" != ""
656 .IF
"$(LINKFLAGSTACK)" != ""
657 APP4STACKN
=$(LINKFLAGSTACK
)$(APP4STACK
)
663 .IF
"$(APP4NOSAL)"==""
664 .IF
"$(TARGETTYPE)" == "GUI"
665 APP4STDLIB
+= -lvclmain
669 .IF
"$(GUI)$(COM)" == "WNTGCC"
671 .IF
"$(APP4LINKRES)" != "" ||
"$(APP4RES)" != ""
672 APP4RESO
=$(MISC
)/$(APP4TARGET
:b
)_res.o
676 .IF
"$(GUI)" == "UNX"
677 APP4DEPN
+:=$(APP4DEPNU
)
681 .IF
"$(APP4TARGETN)"!=""
683 .IF
"$(APP4PRODUCTNAME)"!=""
684 APP4PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP4PRODUCTNAME
)\"
685 .ENDIF
# "$(APP4PRODUCTNAME)"!=""
689 .IF
"$(APP4LIBS)"!=""
690 $(MISC
)/$(APP4TARGET
)_linkinc.ls .PHONY
:
692 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP4LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
693 .ENDIF
#"$(APP4LIBS)"!=""
696 LINKINCTARGETS
+=$(MISC
)/$(APP4TARGETN
:b
)_linkinc.ls
697 $(APP4TARGETN
) : $(LINKINCTARGETS
)
698 .ENDIF
# "$(linkinc)"!=""
700 # Allow for target specific LIBSALCPPRT override
701 APP4LIBSALCPPRT
*=$(LIBSALCPPRT
)
703 $(APP4TARGETN
): $(APP4OBJS
) $(APP4LIBS
) \
705 $(APP4ICON
) $(APP4DEPN
) $(USE_APP4DEF
)
706 @echo
"Making: " $(@
:f
)
708 .IF
"$(OS)"=="MACOSX"
709 @
-$(RM
) $(MISC
)/$(@
:b
).list
710 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
711 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
712 @echo
$(STDSLO
) $(APP4OBJS
:s
/.obj
/.o
/) \
713 `cat /dev/null $(APP4LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
714 @
/bin
/echo
-n
$(APP4LINKER
) $(APP4LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
715 $(APP4LINKTYPEFLAG
) $(APP4STDLIBS
) $(APP4STDLIB
) $(STDLIB4
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
716 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
717 `cat $(MISC)/$(TARGET).$(@:b)_4.cmd` \
718 >> $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
719 .IF
"$(VERBOSE)" == "TRUE"
720 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
722 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
723 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
724 # libraries at runtime
725 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
726 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
727 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
729 .IF
"$(TARGETTYPE)"=="GUI"
730 @echo
"Making: " $(@
:f
).app
731 @macosx-create-bundle
$@
732 .ENDIF
# "$(TARGETTYPE)"=="GUI"
733 .ELSE
# "$(OS)"=="MACOSX"
734 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
735 @echo
$(APP4LINKER
) $(APP4LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
736 $(APP4OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_4.cmd
737 @cat $(mktmp /dev/null $(APP4LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_4.cmd
738 @echo
$(APP4LINKTYPEFLAG
) $(APP4LIBSALCPPRT
) $(APP4STDLIBS
) $(APP4STDLIB
) $(STDLIB4
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
739 .IF
"$(VERBOSE)" == "TRUE"
740 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
742 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
743 .IF
"$(VERBOSE)" == "TRUE"
745 .ENDIF
# "$(OS)"=="MACOSX"
747 .IF
"$(GUI)" == "WNT"
749 .IF
"$(APP4LINKRES)" != ""
750 @@
-$(RM
) $(MISC
)/$(APP4LINKRES
:b
).rc
751 .IF
"$(APP4ICON)" != ""
752 @
-echo
1 ICON
$(EMQ
)"$(APP4ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP4LINKRES
:b
).rc
753 .ENDIF
# "$(APP4ICON)" != ""
754 .IF
"$(APP4VERINFO)" != ""
755 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP4LINKRES:b).rc
756 @
-echo
$(EMQ
)#include $(EMQ)"$(APP4VERINFO)$(EMQ)" >> $(MISC)/$(APP4LINKRES:b).rc
757 .ENDIF
# "$(APP4VERINFO)" != ""
758 .IF
"$(COM)" == "GCC"
759 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP4PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP4LINKRES
:b
).res
$(MISC
)/$(APP4LINKRES
:b
).rc
761 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP4PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP4LINKRES
:b
).rc
763 .ENDIF
# "$(APP4LINKRES)" != ""
764 .IF
"$(COM)" == "GCC"
765 .IF
"$(APP4LINKRES)" != "" ||
"$(APP4RES)" != ""
766 @cat
$(APP4LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP4RES
)) > $(MISC
)/$(@
:b
)_all.res
767 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP4RESO
)
769 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
770 $(APP4BASEX
) $(APP4STACKN
) -o
$@
$(APP4OBJS
) \
771 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP4RESO
) \
772 `$(TYPE) /dev/null $(APP4LIBS) | sed s#$(ROUT)#$(OUT)#g` \
773 $(APP_LINKTYPE
) $(APP4LIBSALCPPRT
) \
774 -Wl
,--start-group
$(APP4STDLIBS
) -Wl
,--end-group
$(APP4STDLIB
) \
775 $(STDLIB4
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
776 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
777 .IF
"$(VERBOSE)" == "TRUE"
778 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
780 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_4.cmd
781 .ELSE
# "$(COM)" == "GCC"
782 .IF
"$(linkinc)" == ""
783 $(COMMAND_ECHO
)$(APP4LINKER
) @
$(mktmp \
785 $(LINKFLAGSAPP
) $(APP4BASEX
) \
788 -map
:$(MISC
)/{$(subst,/,_
$(APP4TARGET
)).map
} \
795 $(APP4STDLIB
) $(STDLIB4
) \
797 @
-echo linking
$@.manifest ...
798 .IF
"$(VISTA_MANIFEST)"!=""
799 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
800 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
802 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
803 .ENDIF
# "$(VISTA_MANIFEST)"!=""
804 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
805 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
807 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP4TARGET
).lnk
808 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP4TARGET
).lst
809 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
810 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
811 type
$(mktmp
,$(MISC
)\
$(APP4TARGET
).lst
813 $(LINKFLAGSAPP
) $(APP4BASEX
) \
822 $(APP4STDLIB
) $(STDLIB4
))
823 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP4TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP4TARGET
).lst
824 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP4TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP4TARGET
).lst
>> $(MISC
)/$(APP4TARGET
).lnk
$(FI
)
825 $(COMMAND_ECHO
)$(SED
)$(APP4LINKER
) @
$(MISC
)\
$(APP4TARGET
).lnk
826 .ENDIF
# "$(linkinc)" == ""
827 .ENDIF
# "$(COM)" == "GCC"
828 .IF
"$(APP4TARGET)" == "loader"
829 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
830 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
831 $(COMMAND_ECHO
)$(RM
) $@
832 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
833 .ENDIF
# "$(TARGET)" == "setup"
835 .ENDIF
# "$(GUI)" == "WNT"
837 .ENDIF
# "$(APP4TARGETN)"!=""
840 # Instruction for linking
843 .IF
"$(APP5LINKTYPE)" != ""
844 #must be either STATIC or SHARED
845 APP5LINKTYPEFLAG
=$(APPLINK
$(APP5LINKTYPE
))
849 .IF
"$(APP5CODETYPE)"=="C"
851 APP5STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
852 APP5LINKFLAGS
+=$(LINKCFLAGS
)
853 .ELSE
# "$(APP5CODETYPE)"=="C"
855 APP5STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
856 APP5LINKFLAGS
+=$(LINKFLAGS
)
857 .ENDIF
# "$(APP5CODETYPE)"=="C"
860 LINKFLAGSRUNPATH_
$(APP5RPATH
)*=/ERROR
:/Bad_APP5RPATH_value
861 .IF
"$(OS)" != "MACOSX"
862 APP5LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP5RPATH
))
865 .IF
"$(APP5STACK)" != ""
866 .IF
"$(LINKFLAGSTACK)" != ""
867 APP5STACKN
=$(LINKFLAGSTACK
)$(APP5STACK
)
873 .IF
"$(APP5NOSAL)"==""
874 .IF
"$(TARGETTYPE)" == "GUI"
875 APP5STDLIB
+= -lvclmain
879 .IF
"$(GUI)$(COM)" == "WNTGCC"
881 .IF
"$(APP5LINKRES)" != "" ||
"$(APP5RES)" != ""
882 APP5RESO
=$(MISC
)/$(APP5TARGET
:b
)_res.o
886 .IF
"$(GUI)" == "UNX"
887 APP5DEPN
+:=$(APP5DEPNU
)
891 .IF
"$(APP5TARGETN)"!=""
893 .IF
"$(APP5PRODUCTNAME)"!=""
894 APP5PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP5PRODUCTNAME
)\"
895 .ENDIF
# "$(APP5PRODUCTNAME)"!=""
899 .IF
"$(APP5LIBS)"!=""
900 $(MISC
)/$(APP5TARGET
)_linkinc.ls .PHONY
:
902 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP5LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
903 .ENDIF
#"$(APP5LIBS)"!=""
906 LINKINCTARGETS
+=$(MISC
)/$(APP5TARGETN
:b
)_linkinc.ls
907 $(APP5TARGETN
) : $(LINKINCTARGETS
)
908 .ENDIF
# "$(linkinc)"!=""
910 # Allow for target specific LIBSALCPPRT override
911 APP5LIBSALCPPRT
*=$(LIBSALCPPRT
)
913 $(APP5TARGETN
): $(APP5OBJS
) $(APP5LIBS
) \
915 $(APP5ICON
) $(APP5DEPN
) $(USE_APP5DEF
)
916 @echo
"Making: " $(@
:f
)
918 .IF
"$(OS)"=="MACOSX"
919 @
-$(RM
) $(MISC
)/$(@
:b
).list
920 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
921 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
922 @echo
$(STDSLO
) $(APP5OBJS
:s
/.obj
/.o
/) \
923 `cat /dev/null $(APP5LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
924 @
/bin
/echo
-n
$(APP5LINKER
) $(APP5LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
925 $(APP5LINKTYPEFLAG
) $(APP5STDLIBS
) $(APP5STDLIB
) $(STDLIB5
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
926 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
927 `cat $(MISC)/$(TARGET).$(@:b)_5.cmd` \
928 >> $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
929 .IF
"$(VERBOSE)" == "TRUE"
930 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
932 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
933 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
934 # libraries at runtime
935 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
936 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
937 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
939 .IF
"$(TARGETTYPE)"=="GUI"
940 @echo
"Making: " $(@
:f
).app
941 @macosx-create-bundle
$@
942 .ENDIF
# "$(TARGETTYPE)"=="GUI"
943 .ELSE
# "$(OS)"=="MACOSX"
944 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
945 @echo
$(APP5LINKER
) $(APP5LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
946 $(APP5OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_5.cmd
947 @cat $(mktmp /dev/null $(APP5LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_5.cmd
948 @echo
$(APP5LINKTYPEFLAG
) $(APP5LIBSALCPPRT
) $(APP5STDLIBS
) $(APP5STDLIB
) $(STDLIB5
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
949 .IF
"$(VERBOSE)" == "TRUE"
950 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
952 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
953 .IF
"$(VERBOSE)" == "TRUE"
955 .ENDIF
# "$(OS)"=="MACOSX"
957 .IF
"$(GUI)" == "WNT"
959 .IF
"$(APP5LINKRES)" != ""
960 @@
-$(RM
) $(MISC
)/$(APP5LINKRES
:b
).rc
961 .IF
"$(APP5ICON)" != ""
962 @
-echo
1 ICON
$(EMQ
)"$(APP5ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP5LINKRES
:b
).rc
963 .ENDIF
# "$(APP5ICON)" != ""
964 .IF
"$(APP5VERINFO)" != ""
965 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP5LINKRES:b).rc
966 @
-echo
$(EMQ
)#include $(EMQ)"$(APP5VERINFO)$(EMQ)" >> $(MISC)/$(APP5LINKRES:b).rc
967 .ENDIF
# "$(APP5VERINFO)" != ""
968 .IF
"$(COM)" == "GCC"
969 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP5PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP5LINKRES
:b
).res
$(MISC
)/$(APP5LINKRES
:b
).rc
971 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP5PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP5LINKRES
:b
).rc
973 .ENDIF
# "$(APP5LINKRES)" != ""
974 .IF
"$(COM)" == "GCC"
975 .IF
"$(APP5LINKRES)" != "" ||
"$(APP5RES)" != ""
976 @cat
$(APP5LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP5RES
)) > $(MISC
)/$(@
:b
)_all.res
977 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP5RESO
)
979 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
980 $(APP5BASEX
) $(APP5STACKN
) -o
$@
$(APP5OBJS
) \
981 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP5RESO
) \
982 `$(TYPE) /dev/null $(APP5LIBS) | sed s#$(ROUT)#$(OUT)#g` \
983 $(APP_LINKTYPE
) $(APP5LIBSALCPPRT
) \
984 -Wl
,--start-group
$(APP5STDLIBS
) -Wl
,--end-group
$(APP5STDLIB
) \
985 $(STDLIB5
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
986 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
987 .IF
"$(VERBOSE)" == "TRUE"
988 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
990 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_5.cmd
991 .ELSE
# "$(COM)" == "GCC"
992 .IF
"$(linkinc)" == ""
993 $(COMMAND_ECHO
)$(APP5LINKER
) @
$(mktmp \
995 $(LINKFLAGSAPP
) $(APP5BASEX
) \
998 -map
:$(MISC
)/{$(subst,/,_
$(APP5TARGET
)).map
} \
1005 $(APP5STDLIB
) $(STDLIB5
) \
1007 @
-echo linking
$@.manifest ...
1008 .IF
"$(VISTA_MANIFEST)"!=""
1009 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1010 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1012 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1013 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1014 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1015 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1017 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP5TARGET
).lnk
1018 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP5TARGET
).lst
1019 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1020 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1021 type
$(mktmp
,$(MISC
)\
$(APP5TARGET
).lst
1023 $(LINKFLAGSAPP
) $(APP5BASEX
) \
1032 $(APP5STDLIB
) $(STDLIB5
))
1033 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP5TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP5TARGET
).lst
1034 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP5TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP5TARGET
).lst
>> $(MISC
)/$(APP5TARGET
).lnk
$(FI
)
1035 $(COMMAND_ECHO
)$(SED
)$(APP5LINKER
) @
$(MISC
)\
$(APP5TARGET
).lnk
1036 .ENDIF
# "$(linkinc)" == ""
1037 .ENDIF
# "$(COM)" == "GCC"
1038 .IF
"$(APP5TARGET)" == "loader"
1039 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1040 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1041 $(COMMAND_ECHO
)$(RM
) $@
1042 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1043 .ENDIF
# "$(TARGET)" == "setup"
1045 .ENDIF
# "$(GUI)" == "WNT"
1047 .ENDIF
# "$(APP5TARGETN)"!=""
1050 # Instruction for linking
1053 .IF
"$(APP6LINKTYPE)" != ""
1054 #must be either STATIC or SHARED
1055 APP6LINKTYPEFLAG
=$(APPLINK
$(APP6LINKTYPE
))
1058 # decide how to link
1059 .IF
"$(APP6CODETYPE)"=="C"
1061 APP6STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
1062 APP6LINKFLAGS
+=$(LINKCFLAGS
)
1063 .ELSE
# "$(APP6CODETYPE)"=="C"
1065 APP6STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
1066 APP6LINKFLAGS
+=$(LINKFLAGS
)
1067 .ENDIF
# "$(APP6CODETYPE)"=="C"
1070 LINKFLAGSRUNPATH_
$(APP6RPATH
)*=/ERROR
:/Bad_APP6RPATH_value
1071 .IF
"$(OS)" != "MACOSX"
1072 APP6LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP6RPATH
))
1075 .IF
"$(APP6STACK)" != ""
1076 .IF
"$(LINKFLAGSTACK)" != ""
1077 APP6STACKN
=$(LINKFLAGSTACK
)$(APP6STACK
)
1083 .IF
"$(APP6NOSAL)"==""
1084 .IF
"$(TARGETTYPE)" == "GUI"
1085 APP6STDLIB
+= -lvclmain
1089 .IF
"$(GUI)$(COM)" == "WNTGCC"
1091 .IF
"$(APP6LINKRES)" != "" ||
"$(APP6RES)" != ""
1092 APP6RESO
=$(MISC
)/$(APP6TARGET
:b
)_res.o
1096 .IF
"$(GUI)" == "UNX"
1097 APP6DEPN
+:=$(APP6DEPNU
)
1101 .IF
"$(APP6TARGETN)"!=""
1103 .IF
"$(APP6PRODUCTNAME)"!=""
1104 APP6PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP6PRODUCTNAME
)\"
1105 .ENDIF
# "$(APP6PRODUCTNAME)"!=""
1107 .IF
"$(linkinc)"!=""
1109 .IF
"$(APP6LIBS)"!=""
1110 $(MISC
)/$(APP6TARGET
)_linkinc.ls .PHONY
:
1112 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP6LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
1113 .ENDIF
#"$(APP6LIBS)"!=""
1116 LINKINCTARGETS
+=$(MISC
)/$(APP6TARGETN
:b
)_linkinc.ls
1117 $(APP6TARGETN
) : $(LINKINCTARGETS
)
1118 .ENDIF
# "$(linkinc)"!=""
1120 # Allow for target specific LIBSALCPPRT override
1121 APP6LIBSALCPPRT
*=$(LIBSALCPPRT
)
1123 $(APP6TARGETN
): $(APP6OBJS
) $(APP6LIBS
) \
1125 $(APP6ICON
) $(APP6DEPN
) $(USE_APP6DEF
)
1126 @echo
"Making: " $(@
:f
)
1128 .IF
"$(OS)"=="MACOSX"
1129 @
-$(RM
) $(MISC
)/$(@
:b
).list
1130 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1131 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
1132 @echo
$(STDSLO
) $(APP6OBJS
:s
/.obj
/.o
/) \
1133 `cat /dev/null $(APP6LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
1134 @
/bin
/echo
-n
$(APP6LINKER
) $(APP6LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
1135 $(APP6LINKTYPEFLAG
) $(APP6STDLIBS
) $(APP6STDLIB
) $(STDLIB6
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1136 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
1137 `cat $(MISC)/$(TARGET).$(@:b)_6.cmd` \
1138 >> $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1139 .IF
"$(VERBOSE)" == "TRUE"
1140 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1142 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1143 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
1144 # libraries at runtime
1145 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
1146 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
1147 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
1149 .IF
"$(TARGETTYPE)"=="GUI"
1150 @echo
"Making: " $(@
:f
).app
1151 @macosx-create-bundle
$@
1152 .ENDIF
# "$(TARGETTYPE)"=="GUI"
1153 .ELSE
# "$(OS)"=="MACOSX"
1154 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1155 @echo
$(APP6LINKER
) $(APP6LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1156 $(APP6OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_6.cmd
1157 @cat $(mktmp /dev/null $(APP6LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_6.cmd
1158 @echo
$(APP6LINKTYPEFLAG
) $(APP6LIBSALCPPRT
) $(APP6STDLIBS
) $(APP6STDLIB
) $(STDLIB6
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1159 .IF
"$(VERBOSE)" == "TRUE"
1160 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1162 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1163 .IF
"$(VERBOSE)" == "TRUE"
1165 .ENDIF
# "$(OS)"=="MACOSX"
1167 .IF
"$(GUI)" == "WNT"
1168 @@
-$(MKDIR
) $(@
:d
:d
)
1169 .IF
"$(APP6LINKRES)" != ""
1170 @@
-$(RM
) $(MISC
)/$(APP6LINKRES
:b
).rc
1171 .IF
"$(APP6ICON)" != ""
1172 @
-echo
1 ICON
$(EMQ
)"$(APP6ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP6LINKRES
:b
).rc
1173 .ENDIF
# "$(APP6ICON)" != ""
1174 .IF
"$(APP6VERINFO)" != ""
1175 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP6LINKRES:b).rc
1176 @
-echo
$(EMQ
)#include $(EMQ)"$(APP6VERINFO)$(EMQ)" >> $(MISC)/$(APP6LINKRES:b).rc
1177 .ENDIF
# "$(APP6VERINFO)" != ""
1178 .IF
"$(COM)" == "GCC"
1179 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP6PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP6LINKRES
:b
).res
$(MISC
)/$(APP6LINKRES
:b
).rc
1181 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP6PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP6LINKRES
:b
).rc
1183 .ENDIF
# "$(APP6LINKRES)" != ""
1184 .IF
"$(COM)" == "GCC"
1185 .IF
"$(APP6LINKRES)" != "" ||
"$(APP6RES)" != ""
1186 @cat
$(APP6LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP6RES
)) > $(MISC
)/$(@
:b
)_all.res
1187 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP6RESO
)
1189 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1190 $(APP6BASEX
) $(APP6STACKN
) -o
$@
$(APP6OBJS
) \
1191 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP6RESO
) \
1192 `$(TYPE) /dev/null $(APP6LIBS) | sed s#$(ROUT)#$(OUT)#g` \
1193 $(APP_LINKTYPE
) $(APP6LIBSALCPPRT
) \
1194 -Wl
,--start-group
$(APP6STDLIBS
) -Wl
,--end-group
$(APP6STDLIB
) \
1195 $(STDLIB6
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1196 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
1197 .IF
"$(VERBOSE)" == "TRUE"
1198 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1200 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_6.cmd
1201 .ELSE
# "$(COM)" == "GCC"
1202 .IF
"$(linkinc)" == ""
1203 $(COMMAND_ECHO
)$(APP6LINKER
) @
$(mktmp \
1205 $(LINKFLAGSAPP
) $(APP6BASEX
) \
1208 -map
:$(MISC
)/{$(subst,/,_
$(APP6TARGET
)).map
} \
1215 $(APP6STDLIB
) $(STDLIB6
) \
1217 @
-echo linking
$@.manifest ...
1218 .IF
"$(VISTA_MANIFEST)"!=""
1219 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1220 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1222 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1223 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1224 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1225 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1227 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP6TARGET
).lnk
1228 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP6TARGET
).lst
1229 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1230 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1231 type
$(mktmp
,$(MISC
)\
$(APP6TARGET
).lst
1233 $(LINKFLAGSAPP
) $(APP6BASEX
) \
1242 $(APP6STDLIB
) $(STDLIB6
))
1243 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP6TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP6TARGET
).lst
1244 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP6TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP6TARGET
).lst
>> $(MISC
)/$(APP6TARGET
).lnk
$(FI
)
1245 $(COMMAND_ECHO
)$(SED
)$(APP6LINKER
) @
$(MISC
)\
$(APP6TARGET
).lnk
1246 .ENDIF
# "$(linkinc)" == ""
1247 .ENDIF
# "$(COM)" == "GCC"
1248 .IF
"$(APP6TARGET)" == "loader"
1249 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1250 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1251 $(COMMAND_ECHO
)$(RM
) $@
1252 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1253 .ENDIF
# "$(TARGET)" == "setup"
1255 .ENDIF
# "$(GUI)" == "WNT"
1257 .ENDIF
# "$(APP6TARGETN)"!=""
1260 # Instruction for linking
1263 .IF
"$(APP7LINKTYPE)" != ""
1264 #must be either STATIC or SHARED
1265 APP7LINKTYPEFLAG
=$(APPLINK
$(APP7LINKTYPE
))
1268 # decide how to link
1269 .IF
"$(APP7CODETYPE)"=="C"
1271 APP7STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
1272 APP7LINKFLAGS
+=$(LINKCFLAGS
)
1273 .ELSE
# "$(APP7CODETYPE)"=="C"
1275 APP7STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
1276 APP7LINKFLAGS
+=$(LINKFLAGS
)
1277 .ENDIF
# "$(APP7CODETYPE)"=="C"
1280 LINKFLAGSRUNPATH_
$(APP7RPATH
)*=/ERROR
:/Bad_APP7RPATH_value
1281 .IF
"$(OS)" != "MACOSX"
1282 APP7LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP7RPATH
))
1285 .IF
"$(APP7STACK)" != ""
1286 .IF
"$(LINKFLAGSTACK)" != ""
1287 APP7STACKN
=$(LINKFLAGSTACK
)$(APP7STACK
)
1293 .IF
"$(APP7NOSAL)"==""
1294 .IF
"$(TARGETTYPE)" == "GUI"
1295 APP7STDLIB
+= -lvclmain
1299 .IF
"$(GUI)$(COM)" == "WNTGCC"
1301 .IF
"$(APP7LINKRES)" != "" ||
"$(APP7RES)" != ""
1302 APP7RESO
=$(MISC
)/$(APP7TARGET
:b
)_res.o
1306 .IF
"$(GUI)" == "UNX"
1307 APP7DEPN
+:=$(APP7DEPNU
)
1311 .IF
"$(APP7TARGETN)"!=""
1313 .IF
"$(APP7PRODUCTNAME)"!=""
1314 APP7PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP7PRODUCTNAME
)\"
1315 .ENDIF
# "$(APP7PRODUCTNAME)"!=""
1317 .IF
"$(linkinc)"!=""
1319 .IF
"$(APP7LIBS)"!=""
1320 $(MISC
)/$(APP7TARGET
)_linkinc.ls .PHONY
:
1322 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP7LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
1323 .ENDIF
#"$(APP7LIBS)"!=""
1326 LINKINCTARGETS
+=$(MISC
)/$(APP7TARGETN
:b
)_linkinc.ls
1327 $(APP7TARGETN
) : $(LINKINCTARGETS
)
1328 .ENDIF
# "$(linkinc)"!=""
1330 # Allow for target specific LIBSALCPPRT override
1331 APP7LIBSALCPPRT
*=$(LIBSALCPPRT
)
1333 $(APP7TARGETN
): $(APP7OBJS
) $(APP7LIBS
) \
1335 $(APP7ICON
) $(APP7DEPN
) $(USE_APP7DEF
)
1336 @echo
"Making: " $(@
:f
)
1338 .IF
"$(OS)"=="MACOSX"
1339 @
-$(RM
) $(MISC
)/$(@
:b
).list
1340 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1341 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
1342 @echo
$(STDSLO
) $(APP7OBJS
:s
/.obj
/.o
/) \
1343 `cat /dev/null $(APP7LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
1344 @
/bin
/echo
-n
$(APP7LINKER
) $(APP7LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
1345 $(APP7LINKTYPEFLAG
) $(APP7STDLIBS
) $(APP7STDLIB
) $(STDLIB7
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1346 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
1347 `cat $(MISC)/$(TARGET).$(@:b)_7.cmd` \
1348 >> $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1349 .IF
"$(VERBOSE)" == "TRUE"
1350 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1352 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1353 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
1354 # libraries at runtime
1355 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
1356 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
1357 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
1359 .IF
"$(TARGETTYPE)"=="GUI"
1360 @echo
"Making: " $(@
:f
).app
1361 @macosx-create-bundle
$@
1362 .ENDIF
# "$(TARGETTYPE)"=="GUI"
1363 .ELSE
# "$(OS)"=="MACOSX"
1364 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1365 @echo
$(APP7LINKER
) $(APP7LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1366 $(APP7OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_7.cmd
1367 @cat $(mktmp /dev/null $(APP7LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_7.cmd
1368 @echo
$(APP7LINKTYPEFLAG
) $(APP7LIBSALCPPRT
) $(APP7STDLIBS
) $(APP7STDLIB
) $(STDLIB7
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1369 .IF
"$(VERBOSE)" == "TRUE"
1370 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1372 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1373 .IF
"$(VERBOSE)" == "TRUE"
1375 .ENDIF
# "$(OS)"=="MACOSX"
1377 .IF
"$(GUI)" == "WNT"
1378 @@
-$(MKDIR
) $(@
:d
:d
)
1379 .IF
"$(APP7LINKRES)" != ""
1380 @@
-$(RM
) $(MISC
)/$(APP7LINKRES
:b
).rc
1381 .IF
"$(APP7ICON)" != ""
1382 @
-echo
1 ICON
$(EMQ
)"$(APP7ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP7LINKRES
:b
).rc
1383 .ENDIF
# "$(APP7ICON)" != ""
1384 .IF
"$(APP7VERINFO)" != ""
1385 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP7LINKRES:b).rc
1386 @
-echo
$(EMQ
)#include $(EMQ)"$(APP7VERINFO)$(EMQ)" >> $(MISC)/$(APP7LINKRES:b).rc
1387 .ENDIF
# "$(APP7VERINFO)" != ""
1388 .IF
"$(COM)" == "GCC"
1389 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP7PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP7LINKRES
:b
).res
$(MISC
)/$(APP7LINKRES
:b
).rc
1391 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP7PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP7LINKRES
:b
).rc
1393 .ENDIF
# "$(APP7LINKRES)" != ""
1394 .IF
"$(COM)" == "GCC"
1395 .IF
"$(APP7LINKRES)" != "" ||
"$(APP7RES)" != ""
1396 @cat
$(APP7LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP7RES
)) > $(MISC
)/$(@
:b
)_all.res
1397 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP7RESO
)
1399 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1400 $(APP7BASEX
) $(APP7STACKN
) -o
$@
$(APP7OBJS
) \
1401 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP7RESO
) \
1402 `$(TYPE) /dev/null $(APP7LIBS) | sed s#$(ROUT)#$(OUT)#g` \
1403 $(APP_LINKTYPE
) $(APP7LIBSALCPPRT
) \
1404 -Wl
,--start-group
$(APP7STDLIBS
) -Wl
,--end-group
$(APP7STDLIB
) \
1405 $(STDLIB7
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1406 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
1407 .IF
"$(VERBOSE)" == "TRUE"
1408 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1410 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_7.cmd
1411 .ELSE
# "$(COM)" == "GCC"
1412 .IF
"$(linkinc)" == ""
1413 $(COMMAND_ECHO
)$(APP7LINKER
) @
$(mktmp \
1415 $(LINKFLAGSAPP
) $(APP7BASEX
) \
1418 -map
:$(MISC
)/{$(subst,/,_
$(APP7TARGET
)).map
} \
1425 $(APP7STDLIB
) $(STDLIB7
) \
1427 @
-echo linking
$@.manifest ...
1428 .IF
"$(VISTA_MANIFEST)"!=""
1429 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1430 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1432 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1433 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1434 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1435 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1437 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP7TARGET
).lnk
1438 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP7TARGET
).lst
1439 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1440 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1441 type
$(mktmp
,$(MISC
)\
$(APP7TARGET
).lst
1443 $(LINKFLAGSAPP
) $(APP7BASEX
) \
1452 $(APP7STDLIB
) $(STDLIB7
))
1453 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP7TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP7TARGET
).lst
1454 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP7TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP7TARGET
).lst
>> $(MISC
)/$(APP7TARGET
).lnk
$(FI
)
1455 $(COMMAND_ECHO
)$(SED
)$(APP7LINKER
) @
$(MISC
)\
$(APP7TARGET
).lnk
1456 .ENDIF
# "$(linkinc)" == ""
1457 .ENDIF
# "$(COM)" == "GCC"
1458 .IF
"$(APP7TARGET)" == "loader"
1459 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1460 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1461 $(COMMAND_ECHO
)$(RM
) $@
1462 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1463 .ENDIF
# "$(TARGET)" == "setup"
1465 .ENDIF
# "$(GUI)" == "WNT"
1467 .ENDIF
# "$(APP7TARGETN)"!=""
1470 # Instruction for linking
1473 .IF
"$(APP8LINKTYPE)" != ""
1474 #must be either STATIC or SHARED
1475 APP8LINKTYPEFLAG
=$(APPLINK
$(APP8LINKTYPE
))
1478 # decide how to link
1479 .IF
"$(APP8CODETYPE)"=="C"
1481 APP8STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
1482 APP8LINKFLAGS
+=$(LINKCFLAGS
)
1483 .ELSE
# "$(APP8CODETYPE)"=="C"
1485 APP8STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
1486 APP8LINKFLAGS
+=$(LINKFLAGS
)
1487 .ENDIF
# "$(APP8CODETYPE)"=="C"
1490 LINKFLAGSRUNPATH_
$(APP8RPATH
)*=/ERROR
:/Bad_APP8RPATH_value
1491 .IF
"$(OS)" != "MACOSX"
1492 APP8LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP8RPATH
))
1495 .IF
"$(APP8STACK)" != ""
1496 .IF
"$(LINKFLAGSTACK)" != ""
1497 APP8STACKN
=$(LINKFLAGSTACK
)$(APP8STACK
)
1503 .IF
"$(APP8NOSAL)"==""
1504 .IF
"$(TARGETTYPE)" == "GUI"
1505 APP8STDLIB
+= -lvclmain
1509 .IF
"$(GUI)$(COM)" == "WNTGCC"
1511 .IF
"$(APP8LINKRES)" != "" ||
"$(APP8RES)" != ""
1512 APP8RESO
=$(MISC
)/$(APP8TARGET
:b
)_res.o
1516 .IF
"$(GUI)" == "UNX"
1517 APP8DEPN
+:=$(APP8DEPNU
)
1521 .IF
"$(APP8TARGETN)"!=""
1523 .IF
"$(APP8PRODUCTNAME)"!=""
1524 APP8PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP8PRODUCTNAME
)\"
1525 .ENDIF
# "$(APP8PRODUCTNAME)"!=""
1527 .IF
"$(linkinc)"!=""
1529 .IF
"$(APP8LIBS)"!=""
1530 $(MISC
)/$(APP8TARGET
)_linkinc.ls .PHONY
:
1532 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP8LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
1533 .ENDIF
#"$(APP8LIBS)"!=""
1536 LINKINCTARGETS
+=$(MISC
)/$(APP8TARGETN
:b
)_linkinc.ls
1537 $(APP8TARGETN
) : $(LINKINCTARGETS
)
1538 .ENDIF
# "$(linkinc)"!=""
1540 # Allow for target specific LIBSALCPPRT override
1541 APP8LIBSALCPPRT
*=$(LIBSALCPPRT
)
1543 $(APP8TARGETN
): $(APP8OBJS
) $(APP8LIBS
) \
1545 $(APP8ICON
) $(APP8DEPN
) $(USE_APP8DEF
)
1546 @echo
"Making: " $(@
:f
)
1548 .IF
"$(OS)"=="MACOSX"
1549 @
-$(RM
) $(MISC
)/$(@
:b
).list
1550 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1551 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
1552 @echo
$(STDSLO
) $(APP8OBJS
:s
/.obj
/.o
/) \
1553 `cat /dev/null $(APP8LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
1554 @
/bin
/echo
-n
$(APP8LINKER
) $(APP8LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
1555 $(APP8LINKTYPEFLAG
) $(APP8STDLIBS
) $(APP8STDLIB
) $(STDLIB8
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1556 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
1557 `cat $(MISC)/$(TARGET).$(@:b)_8.cmd` \
1558 >> $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1559 .IF
"$(VERBOSE)" == "TRUE"
1560 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1562 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1563 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
1564 # libraries at runtime
1565 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
1566 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
1567 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
1569 .IF
"$(TARGETTYPE)"=="GUI"
1570 @echo
"Making: " $(@
:f
).app
1571 @macosx-create-bundle
$@
1572 .ENDIF
# "$(TARGETTYPE)"=="GUI"
1573 .ELSE
# "$(OS)"=="MACOSX"
1574 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1575 @echo
$(APP8LINKER
) $(APP8LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1576 $(APP8OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_8.cmd
1577 @cat $(mktmp /dev/null $(APP8LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_8.cmd
1578 @echo
$(APP8LINKTYPEFLAG
) $(APP8LIBSALCPPRT
) $(APP8STDLIBS
) $(APP8STDLIB
) $(STDLIB8
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1579 .IF
"$(VERBOSE)" == "TRUE"
1580 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1582 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1583 .IF
"$(VERBOSE)" == "TRUE"
1585 .ENDIF
# "$(OS)"=="MACOSX"
1587 .IF
"$(GUI)" == "WNT"
1588 @@
-$(MKDIR
) $(@
:d
:d
)
1589 .IF
"$(APP8LINKRES)" != ""
1590 @@
-$(RM
) $(MISC
)/$(APP8LINKRES
:b
).rc
1591 .IF
"$(APP8ICON)" != ""
1592 @
-echo
1 ICON
$(EMQ
)"$(APP8ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP8LINKRES
:b
).rc
1593 .ENDIF
# "$(APP8ICON)" != ""
1594 .IF
"$(APP8VERINFO)" != ""
1595 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP8LINKRES:b).rc
1596 @
-echo
$(EMQ
)#include $(EMQ)"$(APP8VERINFO)$(EMQ)" >> $(MISC)/$(APP8LINKRES:b).rc
1597 .ENDIF
# "$(APP8VERINFO)" != ""
1598 .IF
"$(COM)" == "GCC"
1599 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP8PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP8LINKRES
:b
).res
$(MISC
)/$(APP8LINKRES
:b
).rc
1601 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP8PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP8LINKRES
:b
).rc
1603 .ENDIF
# "$(APP8LINKRES)" != ""
1604 .IF
"$(COM)" == "GCC"
1605 .IF
"$(APP8LINKRES)" != "" ||
"$(APP8RES)" != ""
1606 @cat
$(APP8LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP8RES
)) > $(MISC
)/$(@
:b
)_all.res
1607 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP8RESO
)
1609 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1610 $(APP8BASEX
) $(APP8STACKN
) -o
$@
$(APP8OBJS
) \
1611 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP8RESO
) \
1612 `$(TYPE) /dev/null $(APP8LIBS) | sed s#$(ROUT)#$(OUT)#g` \
1613 $(APP_LINKTYPE
) $(APP8LIBSALCPPRT
) \
1614 -Wl
,--start-group
$(APP8STDLIBS
) -Wl
,--end-group
$(APP8STDLIB
) \
1615 $(STDLIB8
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1616 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
1617 .IF
"$(VERBOSE)" == "TRUE"
1618 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1620 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_8.cmd
1621 .ELSE
# "$(COM)" == "GCC"
1622 .IF
"$(linkinc)" == ""
1623 $(COMMAND_ECHO
)$(APP8LINKER
) @
$(mktmp \
1625 $(LINKFLAGSAPP
) $(APP8BASEX
) \
1628 -map
:$(MISC
)/{$(subst,/,_
$(APP8TARGET
)).map
} \
1635 $(APP8STDLIB
) $(STDLIB8
) \
1637 @
-echo linking
$@.manifest ...
1638 .IF
"$(VISTA_MANIFEST)"!=""
1639 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1640 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1642 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1643 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1644 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1645 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1647 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP8TARGET
).lnk
1648 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP8TARGET
).lst
1649 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1650 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1651 type
$(mktmp
,$(MISC
)\
$(APP8TARGET
).lst
1653 $(LINKFLAGSAPP
) $(APP8BASEX
) \
1662 $(APP8STDLIB
) $(STDLIB8
))
1663 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP8TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP8TARGET
).lst
1664 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP8TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP8TARGET
).lst
>> $(MISC
)/$(APP8TARGET
).lnk
$(FI
)
1665 $(COMMAND_ECHO
)$(SED
)$(APP8LINKER
) @
$(MISC
)\
$(APP8TARGET
).lnk
1666 .ENDIF
# "$(linkinc)" == ""
1667 .ENDIF
# "$(COM)" == "GCC"
1668 .IF
"$(APP8TARGET)" == "loader"
1669 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1670 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1671 $(COMMAND_ECHO
)$(RM
) $@
1672 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1673 .ENDIF
# "$(TARGET)" == "setup"
1675 .ENDIF
# "$(GUI)" == "WNT"
1677 .ENDIF
# "$(APP8TARGETN)"!=""
1680 # Instruction for linking
1683 .IF
"$(APP9LINKTYPE)" != ""
1684 #must be either STATIC or SHARED
1685 APP9LINKTYPEFLAG
=$(APPLINK
$(APP9LINKTYPE
))
1688 # decide how to link
1689 .IF
"$(APP9CODETYPE)"=="C"
1691 APP9STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
1692 APP9LINKFLAGS
+=$(LINKCFLAGS
)
1693 .ELSE
# "$(APP9CODETYPE)"=="C"
1695 APP9STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
1696 APP9LINKFLAGS
+=$(LINKFLAGS
)
1697 .ENDIF
# "$(APP9CODETYPE)"=="C"
1700 LINKFLAGSRUNPATH_
$(APP9RPATH
)*=/ERROR
:/Bad_APP9RPATH_value
1701 .IF
"$(OS)" != "MACOSX"
1702 APP9LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP9RPATH
))
1705 .IF
"$(APP9STACK)" != ""
1706 .IF
"$(LINKFLAGSTACK)" != ""
1707 APP9STACKN
=$(LINKFLAGSTACK
)$(APP9STACK
)
1713 .IF
"$(APP9NOSAL)"==""
1714 .IF
"$(TARGETTYPE)" == "GUI"
1715 APP9STDLIB
+= -lvclmain
1719 .IF
"$(GUI)$(COM)" == "WNTGCC"
1721 .IF
"$(APP9LINKRES)" != "" ||
"$(APP9RES)" != ""
1722 APP9RESO
=$(MISC
)/$(APP9TARGET
:b
)_res.o
1726 .IF
"$(GUI)" == "UNX"
1727 APP9DEPN
+:=$(APP9DEPNU
)
1731 .IF
"$(APP9TARGETN)"!=""
1733 .IF
"$(APP9PRODUCTNAME)"!=""
1734 APP9PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP9PRODUCTNAME
)\"
1735 .ENDIF
# "$(APP9PRODUCTNAME)"!=""
1737 .IF
"$(linkinc)"!=""
1739 .IF
"$(APP9LIBS)"!=""
1740 $(MISC
)/$(APP9TARGET
)_linkinc.ls .PHONY
:
1742 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP9LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
1743 .ENDIF
#"$(APP9LIBS)"!=""
1746 LINKINCTARGETS
+=$(MISC
)/$(APP9TARGETN
:b
)_linkinc.ls
1747 $(APP9TARGETN
) : $(LINKINCTARGETS
)
1748 .ENDIF
# "$(linkinc)"!=""
1750 # Allow for target specific LIBSALCPPRT override
1751 APP9LIBSALCPPRT
*=$(LIBSALCPPRT
)
1753 $(APP9TARGETN
): $(APP9OBJS
) $(APP9LIBS
) \
1755 $(APP9ICON
) $(APP9DEPN
) $(USE_APP9DEF
)
1756 @echo
"Making: " $(@
:f
)
1758 .IF
"$(OS)"=="MACOSX"
1759 @
-$(RM
) $(MISC
)/$(@
:b
).list
1760 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1761 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
1762 @echo
$(STDSLO
) $(APP9OBJS
:s
/.obj
/.o
/) \
1763 `cat /dev/null $(APP9LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
1764 @
/bin
/echo
-n
$(APP9LINKER
) $(APP9LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
1765 $(APP9LINKTYPEFLAG
) $(APP9STDLIBS
) $(APP9STDLIB
) $(STDLIB9
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1766 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
1767 `cat $(MISC)/$(TARGET).$(@:b)_9.cmd` \
1768 >> $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1769 .IF
"$(VERBOSE)" == "TRUE"
1770 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1772 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1773 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
1774 # libraries at runtime
1775 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
1776 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
1777 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
1779 .IF
"$(TARGETTYPE)"=="GUI"
1780 @echo
"Making: " $(@
:f
).app
1781 @macosx-create-bundle
$@
1782 .ENDIF
# "$(TARGETTYPE)"=="GUI"
1783 .ELSE
# "$(OS)"=="MACOSX"
1784 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1785 @echo
$(APP9LINKER
) $(APP9LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1786 $(APP9OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_9.cmd
1787 @cat $(mktmp /dev/null $(APP9LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_9.cmd
1788 @echo
$(APP9LINKTYPEFLAG
) $(APP9LIBSALCPPRT
) $(APP9STDLIBS
) $(APP9STDLIB
) $(STDLIB9
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1789 .IF
"$(VERBOSE)" == "TRUE"
1790 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1792 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1793 .IF
"$(VERBOSE)" == "TRUE"
1795 .ENDIF
# "$(OS)"=="MACOSX"
1797 .IF
"$(GUI)" == "WNT"
1798 @@
-$(MKDIR
) $(@
:d
:d
)
1799 .IF
"$(APP9LINKRES)" != ""
1800 @@
-$(RM
) $(MISC
)/$(APP9LINKRES
:b
).rc
1801 .IF
"$(APP9ICON)" != ""
1802 @
-echo
1 ICON
$(EMQ
)"$(APP9ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP9LINKRES
:b
).rc
1803 .ENDIF
# "$(APP9ICON)" != ""
1804 .IF
"$(APP9VERINFO)" != ""
1805 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP9LINKRES:b).rc
1806 @
-echo
$(EMQ
)#include $(EMQ)"$(APP9VERINFO)$(EMQ)" >> $(MISC)/$(APP9LINKRES:b).rc
1807 .ENDIF
# "$(APP9VERINFO)" != ""
1808 .IF
"$(COM)" == "GCC"
1809 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP9PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP9LINKRES
:b
).res
$(MISC
)/$(APP9LINKRES
:b
).rc
1811 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP9PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP9LINKRES
:b
).rc
1813 .ENDIF
# "$(APP9LINKRES)" != ""
1814 .IF
"$(COM)" == "GCC"
1815 .IF
"$(APP9LINKRES)" != "" ||
"$(APP9RES)" != ""
1816 @cat
$(APP9LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP9RES
)) > $(MISC
)/$(@
:b
)_all.res
1817 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP9RESO
)
1819 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1820 $(APP9BASEX
) $(APP9STACKN
) -o
$@
$(APP9OBJS
) \
1821 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP9RESO
) \
1822 `$(TYPE) /dev/null $(APP9LIBS) | sed s#$(ROUT)#$(OUT)#g` \
1823 $(APP_LINKTYPE
) $(APP9LIBSALCPPRT
) \
1824 -Wl
,--start-group
$(APP9STDLIBS
) -Wl
,--end-group
$(APP9STDLIB
) \
1825 $(STDLIB9
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1826 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
1827 .IF
"$(VERBOSE)" == "TRUE"
1828 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1830 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_9.cmd
1831 .ELSE
# "$(COM)" == "GCC"
1832 .IF
"$(linkinc)" == ""
1833 $(COMMAND_ECHO
)$(APP9LINKER
) @
$(mktmp \
1835 $(LINKFLAGSAPP
) $(APP9BASEX
) \
1838 -map
:$(MISC
)/{$(subst,/,_
$(APP9TARGET
)).map
} \
1845 $(APP9STDLIB
) $(STDLIB9
) \
1847 @
-echo linking
$@.manifest ...
1848 .IF
"$(VISTA_MANIFEST)"!=""
1849 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
1850 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1852 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
1853 .ENDIF
# "$(VISTA_MANIFEST)"!=""
1854 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
1855 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
1857 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP9TARGET
).lnk
1858 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP9TARGET
).lst
1859 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
1860 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
1861 type
$(mktmp
,$(MISC
)\
$(APP9TARGET
).lst
1863 $(LINKFLAGSAPP
) $(APP9BASEX
) \
1872 $(APP9STDLIB
) $(STDLIB9
))
1873 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP9TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP9TARGET
).lst
1874 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP9TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP9TARGET
).lst
>> $(MISC
)/$(APP9TARGET
).lnk
$(FI
)
1875 $(COMMAND_ECHO
)$(SED
)$(APP9LINKER
) @
$(MISC
)\
$(APP9TARGET
).lnk
1876 .ENDIF
# "$(linkinc)" == ""
1877 .ENDIF
# "$(COM)" == "GCC"
1878 .IF
"$(APP9TARGET)" == "loader"
1879 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
1880 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
1881 $(COMMAND_ECHO
)$(RM
) $@
1882 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
1883 .ENDIF
# "$(TARGET)" == "setup"
1885 .ENDIF
# "$(GUI)" == "WNT"
1887 .ENDIF
# "$(APP9TARGETN)"!=""
1890 # Instruction for linking
1893 .IF
"$(APP10LINKTYPE)" != ""
1894 #must be either STATIC or SHARED
1895 APP10LINKTYPEFLAG
=$(APPLINK
$(APP10LINKTYPE
))
1898 # decide how to link
1899 .IF
"$(APP10CODETYPE)"=="C"
1900 APP10LINKER
=$(LINKC
)
1901 APP10STDLIB
=$(subst,CPPRUNTIME
, $(STDLIB
))
1902 APP10LINKFLAGS
+=$(LINKCFLAGS
)
1903 .ELSE
# "$(APP10CODETYPE)"=="C"
1905 APP10STDLIB
=$(subst,CPPRUNTIME
,$(STDLIBCPP
) $(STDLIB
))
1906 APP10LINKFLAGS
+=$(LINKFLAGS
)
1907 .ENDIF
# "$(APP10CODETYPE)"=="C"
1910 LINKFLAGSRUNPATH_
$(APP10RPATH
)*=/ERROR
:/Bad_APP10RPATH_value
1911 .IF
"$(OS)" != "MACOSX"
1912 APP10LINKFLAGS
+=$(LINKFLAGSRUNPATH_
$(APP10RPATH
))
1915 .IF
"$(APP10STACK)" != ""
1916 .IF
"$(LINKFLAGSTACK)" != ""
1917 APP10STACKN
=$(LINKFLAGSTACK
)$(APP10STACK
)
1923 .IF
"$(APP10NOSAL)"==""
1924 .IF
"$(TARGETTYPE)" == "GUI"
1925 APP10STDLIB
+= -lvclmain
1929 .IF
"$(GUI)$(COM)" == "WNTGCC"
1931 .IF
"$(APP10LINKRES)" != "" ||
"$(APP10RES)" != ""
1932 APP10RESO
=$(MISC
)/$(APP10TARGET
:b
)_res.o
1936 .IF
"$(GUI)" == "UNX"
1937 APP10DEPN
+:=$(APP10DEPNU
)
1941 .IF
"$(APP10TARGETN)"!=""
1943 .IF
"$(APP10PRODUCTNAME)"!=""
1944 APP10PRODUCTDEF
+:=-DPRODUCT_NAME
=\"$(APP10PRODUCTNAME
)\"
1945 .ENDIF
# "$(APP10PRODUCTNAME)"!=""
1947 .IF
"$(linkinc)"!=""
1949 .IF
"$(APP10LIBS)"!=""
1950 $(MISC
)/$(APP10TARGET
)_linkinc.ls .PHONY
:
1952 sed
-f
$(SOLARENV
)/bin
/chrel.sed
$(foreach,i
,$(APP10LIBS
) $(i
:s
/.lib
/.lin
/)) >> $@
1953 .ENDIF
#"$(APP10LIBS)"!=""
1956 LINKINCTARGETS
+=$(MISC
)/$(APP10TARGETN
:b
)_linkinc.ls
1957 $(APP10TARGETN
) : $(LINKINCTARGETS
)
1958 .ENDIF
# "$(linkinc)"!=""
1960 # Allow for target specific LIBSALCPPRT override
1961 APP10LIBSALCPPRT
*=$(LIBSALCPPRT
)
1963 $(APP10TARGETN
): $(APP10OBJS
) $(APP10LIBS
) \
1965 $(APP10ICON
) $(APP10DEPN
) $(USE_APP10DEF
)
1966 @echo
"Making: " $(@
:f
)
1968 .IF
"$(OS)"=="MACOSX"
1969 @
-$(RM
) $(MISC
)/$(@
:b
).list
1970 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
1971 @
-$(RM
) $(MISC
)/$(@
:b
).
strip
1972 @echo
$(STDSLO
) $(APP10OBJS
:s
/.obj
/.o
/) \
1973 `cat /dev/null $(APP10LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr
-s
" " "\n" > $(MISC
)/$(@
:b
).list
1974 @
/bin
/echo
-n
$(APP10LINKER
) $(APP10LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) -o
$@ \
1975 $(APP10LINKTYPEFLAG
) $(APP10STDLIBS
) $(APP10STDLIB
) $(STDLIB10
) -filelist
$(MISC
)/$(@
:b
).list
> $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
1976 @
$(PERL
) $(SOLARENV
)/bin
/macosx-dylib-link-list.pl \
1977 `cat $(MISC)/$(TARGET).$(@:b)_10.cmd` \
1978 >> $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
1979 .IF
"$(VERBOSE)" == "TRUE"
1980 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
1982 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
1983 # Need to strip __objcInit symbol to avoid duplicate symbols when loading
1984 # libraries at runtime
1985 @
-nm
$@ | grep
-v
' U ' |
$(AWK
) '{ print $$NF }' | grep
-F
-x
'__objcInit' > $(MISC
)/$(@
:b
).
strip
1986 @
strip -i
-R
$(MISC
)/$(@
:b
).
strip -X
$@
1987 @
$(PERL
) $(SOLARENV
)/bin
/macosx-change-install-names.pl \
1988 app
$(APP10RPATH
) $@
1989 .IF
"$(TARGETTYPE)"=="GUI"
1990 @echo
"Making: " $(@
:f
).app
1991 @macosx-create-bundle
$@
1992 .ENDIF
# "$(TARGETTYPE)"=="GUI"
1993 .ELSE
# "$(OS)"=="MACOSX"
1994 @
-$(RM
) $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
1995 @echo
$(APP10LINKER
) $(APP10LINKFLAGS
) $(LINKFLAGSAPP
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
1996 $(APP10OBJS
:s
/.obj
/.o
/) '\' > $(MISC)/$(TARGET).$(@:b)_10.cmd
1997 @cat $(mktmp /dev/null $(APP10LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's
#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_10.cmd
1998 @echo
$(APP10LINKTYPEFLAG
) $(APP10LIBSALCPPRT
) $(APP10STDLIBS
) $(APP10STDLIB
) $(STDLIB10
) -o
$@
>> $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
1999 .IF
"$(VERBOSE)" == "TRUE"
2000 @cat
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2002 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2003 .IF
"$(VERBOSE)" == "TRUE"
2005 .ENDIF
# "$(OS)"=="MACOSX"
2007 .IF
"$(GUI)" == "WNT"
2008 @@
-$(MKDIR
) $(@
:d
:d
)
2009 .IF
"$(APP10LINKRES)" != ""
2010 @@
-$(RM
) $(MISC
)/$(APP10LINKRES
:b
).rc
2011 .IF
"$(APP10ICON)" != ""
2012 @
-echo
1 ICON
$(EMQ
)"$(APP10ICON:s/\/\\/)$(EMQ)" >> $(MISC
)/$(APP10LINKRES
:b
).rc
2013 .ENDIF
# "$(APP10ICON)" != ""
2014 .IF
"$(APP10VERINFO)" != ""
2015 @
-echo
$(EMQ
)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP10LINKRES:b).rc
2016 @
-echo
$(EMQ
)#include $(EMQ)"$(APP10VERINFO)$(EMQ)" >> $(MISC)/$(APP10LINKRES:b).rc
2017 .ENDIF
# "$(APP10VERINFO)" != ""
2018 .IF
"$(COM)" == "GCC"
2019 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP10PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) -o
$(MISC
)/$(APP10LINKRES
:b
).res
$(MISC
)/$(APP10LINKRES
:b
).rc
2021 $(COMMAND_ECHO
)$(RC
) -DWIN32
$(APP10PRODUCTDEF
) -I
$(SOLARRESDIR
) $(INCLUDE
) $(RCLINKFLAGS
) $(MISC
)/$(APP10LINKRES
:b
).rc
2023 .ENDIF
# "$(APP10LINKRES)" != ""
2024 .IF
"$(COM)" == "GCC"
2025 .IF
"$(APP10LINKRES)" != "" ||
"$(APP10RES)" != ""
2026 @cat
$(APP10LINKRES
) $(subst,/res
/,/res
{$(subst,$(BIN
), $(@
:d
))} $(APP10RES
)) > $(MISC
)/$(@
:b
)_all.res
2027 $(WINDRES
) $(MISC
)/$(@
:b
)_all.res
$(APP10RESO
)
2029 @echo
$(LINK
) $(LINKFLAGS
) $(LINKFLAGSAPP
) $(MINGWSSTDOBJ
) -L
$(PRJ
)/$(INPATH
)/lib
$(SOLARLIB
) $(STDSLO
) \
2030 $(APP10BASEX
) $(APP10STACKN
) -o
$@
$(APP10OBJS
) \
2031 -Wl
,-Map
,$(MISC
)/$(@
:b
).map
$(STDOBJ
) $(APP10RESO
) \
2032 `$(TYPE) /dev/null $(APP10LIBS) | sed s#$(ROUT)#$(OUT)#g` \
2033 $(APP_LINKTYPE
) $(APP10LIBSALCPPRT
) \
2034 -Wl
,--start-group
$(APP10STDLIBS
) -Wl
,--end-group
$(APP10STDLIB
) \
2035 $(STDLIB10
) $(MINGWSSTDENDOBJ
) > $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2036 # need this comment line, else dmake somehow gets confused by the .IFs and .ENDIFs
2037 .IF
"$(VERBOSE)" == "TRUE"
2038 @
$(TYPE
) $(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2040 @
+source
$(MISC
)/$(TARGET
).
$(@
:b
)_10.cmd
2041 .ELSE
# "$(COM)" == "GCC"
2042 .IF
"$(linkinc)" == ""
2043 $(COMMAND_ECHO
)$(APP10LINKER
) @
$(mktmp \
2045 $(LINKFLAGSAPP
) $(APP10BASEX
) \
2048 -map
:$(MISC
)/{$(subst,/,_
$(APP10TARGET
)).map
} \
2055 $(APP10STDLIB
) $(STDLIB10
) \
2057 @
-echo linking
$@.manifest ...
2058 .IF
"$(VISTA_MANIFEST)"!=""
2059 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-manifest
$(TRUSTED_MANIFEST_LOCATION
)/trustedinfo.manifest
-out
:$@.tmanifest
$(EMQ
) $(FI
)
2060 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.tmanifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
2062 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(MT
) $(MTFLAGS
) -manifest
$@.manifest
-outputresource
:$@
$(EMQ
);1 $(FI
)
2063 .ENDIF
# "$(VISTA_MANIFEST)"!=""
2064 $(COMMAND_ECHO
)$(IFEXIST
) $@.manifest
$(THEN
) $(RM
:s
/+//) $@.manifest
$(FI
)
2065 $(COMMAND_ECHO
)$(IFEXIST
) $@.tmanifest
$(THEN
) $(RM
:s
/+//) $@.tmanifest
$(FI
)
2067 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP10TARGET
).lnk
2068 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\
$(APP10TARGET
).lst
2069 $(COMMAND_ECHO
)-$(RM
) $(MISC
)\linkobj.lst
2070 for
%_i in
($(MISC
)\
*.obj
) do type
%_i
>> $(MISC
)\linkobj.lst
2071 type
$(mktmp
,$(MISC
)\
$(APP10TARGET
).lst
2073 $(LINKFLAGSAPP
) $(APP10BASEX
) \
2082 $(APP10STDLIB
) $(STDLIB10
))
2083 $(COMMAND_ECHO
)$(SED
)$(SED
) -e
's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC
)\
$(APP10TARGETN
:b
)_linkobj.lst
>> $(MISC
)\
$(APP10TARGET
).lst
2084 $(COMMAND_ECHO
)$(SED
)$(IFEXIST
) $(MISC
)/$(APP10TARGET
).lst
$(THEN
) type
$(MISC
)/$(APP10TARGET
).lst
>> $(MISC
)/$(APP10TARGET
).lnk
$(FI
)
2085 $(COMMAND_ECHO
)$(SED
)$(APP10LINKER
) @
$(MISC
)\
$(APP10TARGET
).lnk
2086 .ENDIF
# "$(linkinc)" == ""
2087 .ENDIF
# "$(COM)" == "GCC"
2088 .IF
"$(APP10TARGET)" == "loader"
2089 $(COMMAND_ECHO
)$(PERL
) loader.pl
$@
2090 $(COMMAND_ECHO
)$(TYPE
) $(@
) $(@
:d
)unloader.exe
> $(@
:d
)_new.exe
2091 $(COMMAND_ECHO
)$(RM
) $@
2092 $(COMMAND_ECHO
)$(RENAME
) $(@
:d
)_new.exe
$(@
:d
)loader.exe
2093 .ENDIF
# "$(TARGET)" == "setup"
2095 .ENDIF
# "$(GUI)" == "WNT"
2097 .ENDIF
# "$(APP10TARGETN)"!=""
2100 # Instruction for linking