17871dc3eSAndrew Rist#************************************************************** 27871dc3eSAndrew Rist# 37871dc3eSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 47871dc3eSAndrew Rist# or more contributor license agreements. See the NOTICE file 57871dc3eSAndrew Rist# distributed with this work for additional information 67871dc3eSAndrew Rist# regarding copyright ownership. The ASF licenses this file 77871dc3eSAndrew Rist# to you under the Apache License, Version 2.0 (the 87871dc3eSAndrew Rist# "License"); you may not use this file except in compliance 97871dc3eSAndrew Rist# with the License. You may obtain a copy of the License at 107871dc3eSAndrew Rist# 117871dc3eSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 127871dc3eSAndrew Rist# 137871dc3eSAndrew Rist# Unless required by applicable law or agreed to in writing, 147871dc3eSAndrew Rist# software distributed under the License is distributed on an 157871dc3eSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 167871dc3eSAndrew Rist# KIND, either express or implied. See the License for the 177871dc3eSAndrew Rist# specific language governing permissions and limitations 187871dc3eSAndrew Rist# under the License. 197871dc3eSAndrew Rist# 207871dc3eSAndrew Rist#************************************************************** 217871dc3eSAndrew Rist 22*1e1ac450SHerbert DürrCC_PATH*="$(CC_PATH)" 23cdf0e10cSrcweir 24cdf0e10cSrcweir####################################################### 25cdf0e10cSrcweir# instructions for linking 26cdf0e10cSrcweir# unroll begin 27cdf0e10cSrcweir 28cdf0e10cSrcweir.IF "$(GUI)" == "OS2" && "$(TARGETTYPE)" == "GUI" 29cdf0e10cSrcweirAPP$(TNR)DEF = $(MISC)/$(APP$(TNR)TARGET).def 30cdf0e10cSrcweir.ENDIF 31cdf0e10cSrcweir 32cdf0e10cSrcweir.IF "$(APP$(TNR)LINKTYPE)" != "" 33cdf0e10cSrcweir#must be either STATIC or SHARED 34cdf0e10cSrcweirAPP$(TNR)LINKTYPEFLAG=$(APPLINK$(APP$(TNR)LINKTYPE)) 35cdf0e10cSrcweir.ENDIF 36cdf0e10cSrcweir 37cdf0e10cSrcweir# decide how to link 38cdf0e10cSrcweir.IF "$(APP$(TNR)CODETYPE)"=="C" 39cdf0e10cSrcweirAPP$(TNR)LINKER=$(LINKC) 40cdf0e10cSrcweirAPP$(TNR)STDLIB=$(subst,CPPRUNTIME, $(STDLIB)) 41cdf0e10cSrcweirAPP$(TNR)LINKFLAGS+=$(LINKCFLAGS) 42cdf0e10cSrcweir.ELSE # "$(APP$(TNR)CODETYPE)"=="C" 43cdf0e10cSrcweirAPP$(TNR)LINKER=$(LINK) 44cdf0e10cSrcweirAPP$(TNR)STDLIB=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDLIB)) 45cdf0e10cSrcweirAPP$(TNR)LINKFLAGS+=$(LINKFLAGS) 46cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)CODETYPE)"=="C" 47cdf0e10cSrcweir 48cdf0e10cSrcweirAPP$(TNR)RPATH*=OOO 49cdf0e10cSrcweirLINKFLAGSRUNPATH_$(APP$(TNR)RPATH)*=/ERROR:/Bad_APP$(TNR)RPATH_value 50cdf0e10cSrcweir.IF "$(OS)" != "MACOSX" 51cdf0e10cSrcweirAPP$(TNR)LINKFLAGS+=$(LINKFLAGSRUNPATH_$(APP$(TNR)RPATH)) 52cdf0e10cSrcweir.ENDIF 53cdf0e10cSrcweir 54cdf0e10cSrcweir.IF "$(APP$(TNR)STACK)" != "" 55cdf0e10cSrcweir.IF "$(LINKFLAGSTACK)" != "" 56cdf0e10cSrcweirAPP$(TNR)STACKN=$(LINKFLAGSTACK)$(APP$(TNR)STACK) 57cdf0e10cSrcweir.ENDIF 58cdf0e10cSrcweir.ELSE 59cdf0e10cSrcweirAPP$(TNR)STACKN= 60cdf0e10cSrcweir.ENDIF 61cdf0e10cSrcweir 62cdf0e10cSrcweir.IF "$(APP$(TNR)NOSAL)"=="" 63cdf0e10cSrcweir.IF "$(TARGETTYPE)" == "GUI" 64cdf0e10cSrcweirAPP$(TNR)OBJS+= $(STDOBJVCL) 65cdf0e10cSrcweir.ENDIF 66cdf0e10cSrcweir.ENDIF 67cdf0e10cSrcweir 68cdf0e10cSrcweir.IF "$(GUI)$(COM)" == "WNTGCC" 69cdf0e10cSrcweirAPP$(TNR)RESO= 70cdf0e10cSrcweir.IF "$(APP$(TNR)LINKRES)" != "" || "$(APP$(TNR)RES)" != "" 71cdf0e10cSrcweirAPP$(TNR)RESO=$(MISC)/$(APP$(TNR)TARGET:b)_res.o 72cdf0e10cSrcweir.ENDIF 73cdf0e10cSrcweir.ENDIF 74cdf0e10cSrcweir 75cdf0e10cSrcweir.IF "$(GUI)" == "UNX" 76cdf0e10cSrcweirAPP$(TNR)DEPN+:=$(APP$(TNR)DEPNU) 77cdf0e10cSrcweirUSE_APP$(TNR)DEF= 78cdf0e10cSrcweir.ENDIF 79cdf0e10cSrcweir 80cdf0e10cSrcweir.IF "$(APP$(TNR)TARGETN)"!="" 81cdf0e10cSrcweir 82cdf0e10cSrcweir.IF "$(APP$(TNR)PRODUCTNAME)"!="" 83cdf0e10cSrcweirAPP$(TNR)PRODUCTDEF+:=-DPRODUCT_NAME=\"$(APP$(TNR)PRODUCTNAME)\" 84cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)PRODUCTNAME)"!="" 85cdf0e10cSrcweir 86cdf0e10cSrcweir.IF "$(linkinc)"!="" 87cdf0e10cSrcweir.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" 88cdf0e10cSrcweir.IF "$(APP$(TNR)LIBS)"!="" 89cdf0e10cSrcweir$(MISC)/$(APP$(TNR)TARGET)_linkinc.ls .PHONY: 90cdf0e10cSrcweir @@-$(RM) $@ 91cdf0e10cSrcweir sed -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(APP$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@ 92cdf0e10cSrcweir.ENDIF #"$(APP$(TNR)LIBS)"!="" 93cdf0e10cSrcweir.ENDIF 94cdf0e10cSrcweir 95cdf0e10cSrcweirLINKINCTARGETS+=$(MISC)/$(APP$(TNR)TARGETN:b)_linkinc.ls 96cdf0e10cSrcweir$(APP$(TNR)TARGETN) : $(LINKINCTARGETS) 97cdf0e10cSrcweir.ENDIF # "$(linkinc)"!="" 98cdf0e10cSrcweir 99cdf0e10cSrcweir# Allow for target specific LIBSALCPPRT override 100cdf0e10cSrcweirAPP$(TNR)LIBSALCPPRT*=$(LIBSALCPPRT) 101cdf0e10cSrcweir 102cdf0e10cSrcweir$(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $(APP$(TNR)LIBS) \ 103cdf0e10cSrcweir $(APP$(TNR)RES) \ 104cdf0e10cSrcweir $(APP$(TNR)ICON) $(APP$(TNR)DEPN) $(USE_APP$(TNR)DEF) 105cdf0e10cSrcweir @echo "Making: " $(@:f) 106cdf0e10cSrcweir.IF "$(GUI)"=="UNX" 107cdf0e10cSrcweir.IF "$(OS)"=="MACOSX" 108cdf0e10cSrcweir @echo unx 109cdf0e10cSrcweir @-$(RM) $(MISC)/$(@:b).list 110cdf0e10cSrcweir @-$(RM) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 111cdf0e10cSrcweir @-$(RM) $(MISC)/$(@:b).strip 112cdf0e10cSrcweir @echo $(STDSLO) $(APP$(TNR)OBJS:s/.obj/.o/) \ 113cdf0e10cSrcweir `cat /dev/null $(APP$(TNR)LIBS) | sed s\#$(ROUT)\#$(OUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list 114cdf0e10cSrcweir @echo -n $(APP$(TNR)LINKER) $(APP$(TNR)LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)/$(INPATH)/lib $(SOLARLIB) -o $@ \ 115cdf0e10cSrcweir $(APP$(TNR)LINKTYPEFLAG) $(APP$(TNR)STDLIBS) $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) -filelist $(MISC)/$(@:b).list > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 116cdf0e10cSrcweir @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \ 117cdf0e10cSrcweir `cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd` \ 118cdf0e10cSrcweir >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 119cdf0e10cSrcweir .IF "$(VERBOSE)" == "TRUE" 120cdf0e10cSrcweir @cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 121cdf0e10cSrcweir .ENDIF 122cdf0e10cSrcweir @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 123cdf0e10cSrcweir# Need to strip __objcInit symbol to avoid duplicate symbols when loading 124cdf0e10cSrcweir# libraries at runtime 1258badc1b4SHerbert Dürr @-$(CC_PATH)nm $@ | grep -v ' U ' | $(AWK) '{ print $$NF }' | grep -F -x '__objcInit' > $(MISC)/$(@:b).strip 1268badc1b4SHerbert Dürr @$(CC_PATH)strip -i -R $(MISC)/$(@:b).strip -X $@ 127cdf0e10cSrcweir @ls -l $@ 128cdf0e10cSrcweir @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \ 129cdf0e10cSrcweir app $(APP$(TNR)RPATH) $@ 130cdf0e10cSrcweir.IF "$(TARGETTYPE)"=="GUI" 131cdf0e10cSrcweir @echo "Making: " $(@:f).app 132cdf0e10cSrcweir @macosx-create-bundle $@ 133cdf0e10cSrcweir.ENDIF # "$(TARGETTYPE)"=="GUI" 134cdf0e10cSrcweir.ELSE # "$(OS)"=="MACOSX" 135cdf0e10cSrcweir @echo unx 136cdf0e10cSrcweir @-$(RM) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 137cdf0e10cSrcweir @echo $(APP$(TNR)LINKER) $(APP$(TNR)LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)/$(INPATH)/lib $(SOLARLIB) $(STDSLO) \ 138cdf0e10cSrcweir $(APP$(TNR)OBJS:s/.obj/.o/) '\' > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 139cdf0e10cSrcweir @cat $(mktmp /dev/null $(APP$(TNR)LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 140cdf0e10cSrcweir @echo $(APP$(TNR)LINKTYPEFLAG) $(APP$(TNR)LIBSALCPPRT) $(APP$(TNR)STDLIBS) $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) -o $@ >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 141cdf0e10cSrcweir .IF "$(VERBOSE)" == "TRUE" 142cdf0e10cSrcweir @cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 143cdf0e10cSrcweir .ENDIF 144cdf0e10cSrcweir @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 145cdf0e10cSrcweir .IF "$(VERBOSE)" == "TRUE" 146cdf0e10cSrcweir @ls -l $@ 147cdf0e10cSrcweir .ENDIF 148cdf0e10cSrcweir.ENDIF # "$(OS)"=="MACOSX" 149cdf0e10cSrcweir.ENDIF 150cdf0e10cSrcweir.IF "$(GUI)" == "WNT" 151cdf0e10cSrcweir @@-$(MKDIR) $(@:d:d) 152cdf0e10cSrcweir.IF "$(APP$(TNR)LINKRES)" != "" 153cdf0e10cSrcweir @@-$(RM) $(MISC)/$(APP$(TNR)LINKRES:b).rc 154cdf0e10cSrcweir.IF "$(APP$(TNR)ICON)" != "" 155cdf0e10cSrcweir @-echo 1 ICON $(EMQ)"$(APP$(TNR)ICON:s/\/\\/)$(EMQ)" >> $(MISC)/$(APP$(TNR)LINKRES:b).rc 156cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)ICON)" != "" 157cdf0e10cSrcweir.IF "$(APP$(TNR)VERINFO)" != "" 158cdf0e10cSrcweir @-echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP$(TNR)LINKRES:b).rc 159cdf0e10cSrcweir @-echo $(EMQ)#include $(EMQ)"$(APP$(TNR)VERINFO)$(EMQ)" >> $(MISC)/$(APP$(TNR)LINKRES:b).rc 160cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)VERINFO)" != "" 161cdf0e10cSrcweir $(COMMAND_ECHO)$(RC) -DWIN32 $(APP$(TNR)PRODUCTDEF) -I$(SOLARRESDIR) $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(APP$(TNR)LINKRES:b).rc 162cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)LINKRES)" != "" 163cdf0e10cSrcweir.IF "$(COM)" == "GCC" 164cdf0e10cSrcweir @echo mingw 165cdf0e10cSrcweir.IF "$(APP$(TNR)LINKRES)" != "" || "$(APP$(TNR)RES)" != "" 166cdf0e10cSrcweir @cat $(APP$(TNR)LINKRES) $(subst,/res/,/res{$(subst,$(BIN), $(@:d))} $(APP$(TNR)RES)) > $(MISC)/$(@:b)_all.res 167cdf0e10cSrcweir windres $(MISC)/$(@:b)_all.res $(APP$(TNR)RESO) 168cdf0e10cSrcweir.ENDIF 169cdf0e10cSrcweir @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) $(MINGWSSTDOBJ) -L$(PRJ)/$(INPATH)/lib $(SOLARLIB) $(STDSLO) \ 170cdf0e10cSrcweir $(APP$(TNR)BASEX) $(APP$(TNR)STACKN) -o $@ $(APP$(TNR)OBJS) \ 171cdf0e10cSrcweir -Wl,-Map,$(MISC)/$(@:b).map $(STDOBJ) $(APP$(TNR)RESO) \ 172cdf0e10cSrcweir `$(TYPE) /dev/null $(APP$(TNR)LIBS) | sed s#$(ROUT)#$(OUT)#g` \ 173cdf0e10cSrcweir $(APP_LINKTYPE) $(APP$(TNR)LIBSALCPPRT) \ 174cdf0e10cSrcweir -Wl,--start-group $(APP$(TNR)STDLIBS) -Wl,--end-group $(APP$(TNR)STDLIB) \ 175cdf0e10cSrcweir $(STDLIB$(TNR)) $(MINGWSSTDENDOBJ) > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 176cdf0e10cSrcweir # need this empty line, else dmake somehow gets confused by the .IFs and .ENDIFs 177cdf0e10cSrcweir .IF "$(VERBOSE)" == "TRUE" 178cdf0e10cSrcweir @$(TYPE) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 179cdf0e10cSrcweir .ENDIF 180cdf0e10cSrcweir @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 181cdf0e10cSrcweir @ls -l $@ 182cdf0e10cSrcweir.ELSE # "$(COM)" == "GCC" 183cdf0e10cSrcweir.IF "$(linkinc)" == "" 184cdf0e10cSrcweir $(COMMAND_ECHO)$(APP$(TNR)LINKER) @$(mktmp \ 185cdf0e10cSrcweir $(APP$(TNR)LINKFLAGS) \ 186cdf0e10cSrcweir $(LINKFLAGSAPP) $(APP$(TNR)BASEX) \ 187cdf0e10cSrcweir $(APP$(TNR)STACKN) \ 188cdf0e10cSrcweir -out:$@ \ 189cdf0e10cSrcweir -map:$(MISC)/{$(subst,/,_ $(APP$(TNR)TARGET)).map} \ 190cdf0e10cSrcweir $(STDOBJ) \ 191cdf0e10cSrcweir $(APP$(TNR)LINKRES) \ 192cdf0e10cSrcweir $(APP$(TNR)RES) \ 193cdf0e10cSrcweir $(APP$(TNR)OBJS) \ 194cdf0e10cSrcweir $(APP$(TNR)LIBS) \ 195cdf0e10cSrcweir $(APP$(TNR)STDLIBS) \ 196cdf0e10cSrcweir $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) \ 197cdf0e10cSrcweir ) 198cdf0e10cSrcweir @-echo linking $@.manifest ... 199cdf0e10cSrcweir.IF "$(VISTA_MANIFEST)"!="" 200cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI) 201cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.tmanifest -outputresource:$@$(EMQ);1 $(FI) 202cdf0e10cSrcweir.ELSE 203cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -outputresource:$@$(EMQ);1 $(FI) 204cdf0e10cSrcweir.ENDIF # "$(VISTA_MANIFEST)"!="" 205cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI) 206cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI) 207cdf0e10cSrcweir.ELSE 208cdf0e10cSrcweir $(COMMAND_ECHO)-$(RM) $(MISC)\$(APP$(TNR)TARGET).lnk 209cdf0e10cSrcweir $(COMMAND_ECHO)-$(RM) $(MISC)\$(APP$(TNR)TARGET).lst 210cdf0e10cSrcweir $(COMMAND_ECHO)-$(RM) $(MISC)\linkobj.lst 211cdf0e10cSrcweir for %_i in ($(MISC)\*.obj) do type %_i >> $(MISC)\linkobj.lst 212cdf0e10cSrcweir type $(mktmp,$(MISC)\$(APP$(TNR)TARGET).lst 213cdf0e10cSrcweir $(APP$(TNR)LINKFLAGS) \ 214cdf0e10cSrcweir $(LINKFLAGSAPP) $(APP$(TNR)BASEX) \ 215cdf0e10cSrcweir $(APP$(TNR)STACKN) \ 216cdf0e10cSrcweir -out:$@ \ 217cdf0e10cSrcweir $(STDOBJ) \ 218cdf0e10cSrcweir $(APP$(TNR)LINKRES) \ 219cdf0e10cSrcweir $(APP$(TNR)RES) \ 220cdf0e10cSrcweir $(APP$(TNR)OBJS) \ 221cdf0e10cSrcweir $(APP$(TNR)LIBS) \ 222cdf0e10cSrcweir $(APP$(TNR)STDLIBS) \ 223cdf0e10cSrcweir $(APP$(TNR)STDLIB) $(STDLIB$(TNR))) 224cdf0e10cSrcweir $(COMMAND_ECHO)$(SED)$(SED) -e 's/\(\.\.\\\)\{2,4\}/..\\/g' $(MISC)\$(APP$(TNR)TARGETN:b)_linkobj.lst >> $(MISC)\$(APP$(TNR)TARGET).lst 225cdf0e10cSrcweir $(COMMAND_ECHO)$(SED)$(IFEXIST) $(MISC)/$(APP$(TNR)TARGET).lst $(THEN) type $(MISC)/$(APP$(TNR)TARGET).lst >> $(MISC)/$(APP$(TNR)TARGET).lnk $(FI) 226cdf0e10cSrcweir $(COMMAND_ECHO)$(SED)$(APP$(TNR)LINKER) @$(MISC)\$(APP$(TNR)TARGET).lnk 227cdf0e10cSrcweir.ENDIF # "$(linkinc)" == "" 228cdf0e10cSrcweir.ENDIF # "$(COM)" == "GCC" 229cdf0e10cSrcweir.IF "$(APP$(TNR)TARGET)" == "loader" 230cdf0e10cSrcweir $(COMMAND_ECHO)$(PERL) loader.pl $@ 231cdf0e10cSrcweir $(COMMAND_ECHO)$(TYPE) $(@) $(@:d)unloader.exe > $(@:d)_new.exe 232cdf0e10cSrcweir $(COMMAND_ECHO)$(RM) $@ 233cdf0e10cSrcweir $(COMMAND_ECHO)$(RENAME) $(@:d)_new.exe $(@:d)loader.exe 234cdf0e10cSrcweir.ENDIF # "$(TARGET)" == "setup" 235cdf0e10cSrcweir 236cdf0e10cSrcweir.ENDIF # "$(GUI)" == "WNT" 237cdf0e10cSrcweir 238cdf0e10cSrcweir.IF "$(GUI)" == "OS2" 239534c536dSYuri Dario @+-$(MKDIR) $(@:d:d) > $(NULLDEV) 240cdf0e10cSrcweir.IF "$(APP$(TNR)LINKRES)" != "" 241534c536dSYuri Dario @+-$(RM) $(MISC)/$(APP$(TNR)LINKRES:b).rc > $(NULLDEV) 242cdf0e10cSrcweir.IF "$(APP$(TNR)ICON)" != "" 243534c536dSYuri Dario @-+echo ICON 1 $(EMQ)"$(APP$(TNR)ICON:s#/#\\\\#)$(EMQ)" >> $(MISC)$/$(APP$(TNR)LINKRES:b).rc 244cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)ICON)" != "" 245cdf0e10cSrcweir.IF "$(APP$(TNR)VERINFO)" != "" 246cdf0e10cSrcweir @-+echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(APP$(TNR)LINKRES:b).rc 247cdf0e10cSrcweir @-+echo $(EMQ)#include $(EMQ)"$(APP$(TNR)VERINFO)$(EMQ)" >> $(MISC)/$(APP$(TNR)LINKRES:b).rc 248cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)VERINFO)" != "" 249cdf0e10cSrcweir $(COMMAND_ECHO)$(RC) -r -DOS2 $(APP$(TNR)PRODUCTDEF) -I$(SOLARRESDIR) $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(APP$(TNR)LINKRES:b).rc 250cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)LINKRES)" != "" 251cdf0e10cSrcweir 252cdf0e10cSrcweir.IF "$(TARGETTYPE)" == "GUI" 253cdf0e10cSrcweir @echo NAME $(APP$(TNR)TARGET) WINDOWAPI > $(MISC)/$(APP$(TNR)TARGET).def 254cdf0e10cSrcweir.ENDIF 255cdf0e10cSrcweir 256cdf0e10cSrcweir $(COMMAND_ECHO)$(APP$(TNR)LINKER) -v \ 257cdf0e10cSrcweir $(APP$(TNR)LINKFLAGS) \ 258cdf0e10cSrcweir $(LINKFLAGSAPP) $(APP$(TNR)BASEX) \ 259cdf0e10cSrcweir $(APP$(TNR)STACKN) \ 260cdf0e10cSrcweir -o $@ \ 261cdf0e10cSrcweir -Zmap -L$(LB) \ 262cdf0e10cSrcweir -L$(SOLARVERSION)/$(INPATH)/lib \ 263cdf0e10cSrcweir $(STDOBJ) \ 264cdf0e10cSrcweir $(APP$(TNR)LINKRES) \ 265cdf0e10cSrcweir $(APP$(TNR)RES) \ 266cdf0e10cSrcweir $(APP$(TNR)DEF) \ 267cdf0e10cSrcweir $(APP$(TNR)OBJS) \ 268cdf0e10cSrcweir $(APP$(TNR)LIBS) \ 269534c536dSYuri Dario $(APP$(TNR)STDLIBS) \ 270534c536dSYuri Dario $(APP$(TNR)STDLIB) $(STDLIB$(TNR)) 271cdf0e10cSrcweir 272cdf0e10cSrcweir 273cdf0e10cSrcweir.IF "$(APP$(TNR)TARGET)" == "loader" 274cdf0e10cSrcweir $(COMMAND_ECHO)+$(PERL) loader.pl $@ 275cdf0e10cSrcweir $(COMMAND_ECHO)+$(TYPE) $(@) $(@:d)unloader.exe > $(@:d)_new.exe 276cdf0e10cSrcweir $(COMMAND_ECHO)+$(RM) $@ 277cdf0e10cSrcweir $(COMMAND_ECHO)+$(RENAME) $(@:d)_new.exe $(@:d)loader.exe 278cdf0e10cSrcweir.ENDIF # "$(TARGET)" == "setup" 279cdf0e10cSrcweir 280cdf0e10cSrcweir.ENDIF # "$(GUI)" == "OS2" 281cdf0e10cSrcweir 282cdf0e10cSrcweir.ENDIF # "$(APP$(TNR)TARGETN)"!="" 283cdf0e10cSrcweir 284cdf0e10cSrcweir 285cdf0e10cSrcweir# Instruction for linking 286cdf0e10cSrcweir# unroll end 287cdf0e10cSrcweir####################################################### 288cdf0e10cSrcweir 289