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 227871dc3eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir####################################################### 25cdf0e10cSrcweir# targets for linking 26cdf0e10cSrcweir# unroll begin 27cdf0e10cSrcweir 28cdf0e10cSrcweir.IF "$(SHL$(TNR)TARGETN)"!="" 29cdf0e10cSrcweir 30cdf0e10cSrcweir.IF "$(OS)"=="AIX" 31cdf0e10cSrcweirSHL$(TNR)STDLIBS= 32cdf0e10cSrcweir.ENDIF 33cdf0e10cSrcweir 34cdf0e10cSrcweir.IF "$(SHLLINKARCONLY)" != "" 35cdf0e10cSrcweirSHL$(TNR)STDLIBS= 36cdf0e10cSrcweirSTDSHL= 37cdf0e10cSrcweir.ELSE 38cdf0e10cSrcweirSHL$(TNR)ARCHIVES= 39cdf0e10cSrcweir.ENDIF 40cdf0e10cSrcweir 41cdf0e10cSrcweir# decide how to link 42cdf0e10cSrcweir.IF "$(SHL$(TNR)CODETYPE)"=="C" 43cdf0e10cSrcweirSHL$(TNR)LINKER=$(LINKC) 44cdf0e10cSrcweirSHL$(TNR)STDSHL=$(subst,CPPRUNTIME, $(STDSHL)) 45cdf0e10cSrcweirSHL$(TNR)LINKFLAGS+=$(LINKCFLAGS) 46cdf0e10cSrcweir.ELSE # "$(SHL$(TNR)CODETYPE)"=="C" 47cdf0e10cSrcweirSHL$(TNR)LINKER=$(LINK) 48cdf0e10cSrcweirSHL$(TNR)STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL)) 49cdf0e10cSrcweirSHL$(TNR)LINKFLAGS+=$(LINKFLAGS) 50cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)CODETYPE)"=="C" 51cdf0e10cSrcweir 52cdf0e10cSrcweirSHL$(TNR)RPATH*=OOO 53cdf0e10cSrcweirLINKFLAGSRUNPATH_$(SHL$(TNR)RPATH)*=/ERROR:/Bad_SHL$(TNR)RPATH_value 54cdf0e10cSrcweirSHL$(TNR)LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL$(TNR)RPATH)) 55cdf0e10cSrcweir 56cdf0e10cSrcweir.IF "$(SHL$(TNR)USE_EXPORTS)"=="" 57cdf0e10cSrcweirSHL$(TNR)DEF*=$(MISC)/$(SHL$(TNR)TARGET).def 58cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"=="" 59cdf0e10cSrcweir 60cdf0e10cSrcweirEXTRALIBPATHS$(TNR)=$(EXTRALIBPATHS) 61cdf0e10cSrcweir.IF "$(UPDATER)"=="YES" 62cdf0e10cSrcweir.IF "$(SHL$(TNR)NOCHECK)"=="" 63cdf0e10cSrcweir.IF "$(SOLAR_STLLIBPATH)"!="" 64cdf0e10cSrcweirEXTRALIBPATHS$(TNR)+=-L$(SOLAR_STLLIBPATH) 65cdf0e10cSrcweir.ENDIF 66cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)NOCHECK)"!="" 67cdf0e10cSrcweir.ENDIF 68cdf0e10cSrcweir#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 69cdf0e10cSrcweir#+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++ 70cdf0e10cSrcweir#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 71cdf0e10cSrcweir 72cdf0e10cSrcweir.IF "$(L10N_framework)"=="" 73cdf0e10cSrcweir.IF "$(VERSIONOBJ)"!="" 74cdf0e10cSrcweirSHL$(TNR)VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f) 75cdf0e10cSrcweirUSE_VERSIONH:=$(INCCOM)/$(SHL$(TNR)VERSIONOBJ:b).h 76cdf0e10cSrcweir.IF "$(GUI)" == "UNX" 77cdf0e10cSrcweirSHL$(TNR)VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f:s/.o/.obj/) 78cdf0e10cSrcweir.ELSE # "$(GUI)" == "UNX" 79cdf0e10cSrcweirSHL$(TNR)VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f) 80cdf0e10cSrcweir.ENDIF # "$(GUI)" == "UNX" 81cdf0e10cSrcweir$(MISC)/$(SHL$(TNR)VERSIONOBJ:b).c : $(SOLARENV)/src/version.c $(INCCOM)/$(SHL$(TNR)VERSIONOBJ:b).h 82cdf0e10cSrcweir# $(COPY) $(SOLARENV)/src/version.c $@ 83cdf0e10cSrcweir $(COMMAND_ECHO)$(TYPE) $(SOLARENV)/src/version.c | $(SED) s/_version.h/$(SHL$(TNR)VERSIONOBJ:b).h/ > $@ 84cdf0e10cSrcweir 85cdf0e10cSrcweir.INIT : $(SHL$(TNR)VERSIONOBJDEP) 86cdf0e10cSrcweir.ENDIF # "$(VERSIONOBJ)"!="" 87cdf0e10cSrcweir.ENDIF 88cdf0e10cSrcweir 89cdf0e10cSrcweir.IF "$(GUI)" != "UNX" 90cdf0e10cSrcweir.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" 91cdf0e10cSrcweir.IF "$(SHL$(TNR)IMPLIB)" == "" 92cdf0e10cSrcweirSHL$(TNR)IMPLIB=i$(TARGET)_t$(TNR) 93cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)IMPLIB)" == "" 94cdf0e10cSrcweir.IF "$(COM)" != "GCC" 95cdf0e10cSrcweirUSE_$(TNR)IMPLIB=-implib:$(LB)/$(SHL$(TNR)IMPLIB).lib 96cdf0e10cSrcweir.ENDIF # "$(COM)" != "GCC" 97cdf0e10cSrcweirSHL$(TNR)IMPLIBN=$(LB)/$(SHL$(TNR)IMPLIB).lib 98cdf0e10cSrcweirALLTAR : $(SHL$(TNR)IMPLIBN) 99cdf0e10cSrcweir 100cdf0e10cSrcweir.IF "$(USE_DEFFILE)"=="" 101cdf0e10cSrcweirUSE_$(TNR)IMPLIB_DEPS=$(LB)/$(SHL$(TNR)IMPLIB).lib 102cdf0e10cSrcweir.ENDIF # "$(USE_DEFFILE)"=="" 103cdf0e10cSrcweir.ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2" 104cdf0e10cSrcweirUSE_SHL$(TNR)DEF=$(SHL$(TNR)DEF) 105cdf0e10cSrcweir.ELSE # "$(GUI)" != "UNX" 106cdf0e10cSrcweirUSE_SHL$(TNR)DEF= 107cdf0e10cSrcweirSHL$(TNR)DEPN+:=$(SHL$(TNR)DEPNU) 108cdf0e10cSrcweir 109cdf0e10cSrcweir.IF "$(SHL$(TNR)VERSIONMAP)"=="" 110cdf0e10cSrcweir# to activate vmaps remove "#" 111cdf0e10cSrcweirUSE_SHL$(TNR)VERSIONMAP=$(MISC)/$(SHL$(TNR)TARGET).vmap 112cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)VERSIONMAP)"=="" 113cdf0e10cSrcweir 114cdf0e10cSrcweir.IF "$(USE_SHL$(TNR)VERSIONMAP)"!="" 115cdf0e10cSrcweir 116cdf0e10cSrcweir.IF "$(SHL$(TNR)FILTERFILE)"!="" 117cdf0e10cSrcweir.IF "$(SHL$(TNR)VERSIONMAP)"!="" 118cdf0e10cSrcweir#eine von beiden ist zuviel 119cdf0e10cSrcweirUSE_SHL$(TNR)VERSIONMAP=$(MISC)/$(SHL$(TNR)TARGET).vmap 120cdf0e10cSrcweir$(USE_SHL$(TNR)VERSIONMAP) .PHONY: 121cdf0e10cSrcweir @echo ----------------------------- 122cdf0e10cSrcweir @echo you should only use versionmap OR exportfile 123cdf0e10cSrcweir @echo ----------------------------- 124cdf0e10cSrcweir# force_dmake_to_error 125cdf0e10cSrcweir 126cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)VERSIONMAP)"!="" 127cdf0e10cSrcweir 128cdf0e10cSrcweirSHL$(TNR)VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL$(TNR)VERSIONMAP) 129cdf0e10cSrcweir 130cdf0e10cSrcweir$(USE_SHL$(TNR)VERSIONMAP): \ 131cdf0e10cSrcweir $(SHL$(TNR)OBJS)\ 132cdf0e10cSrcweir $(SHL$(TNR)LIBS)\ 133cdf0e10cSrcweir $(SHL$(TNR)FILTERFILE) 134cdf0e10cSrcweir @$(RM) $@.dump 135cdf0e10cSrcweir.IF "$(SHL$(TNR)OBJS)"!="" 136cdf0e10cSrcweir# dump remaining objects on the fly 137cdf0e10cSrcweir.IF "$(OS)"=="MACOSX" 138cdf0e10cSrcweir @-nm $(SHL$(TNR)OBJS:s/.obj/.o/) > $@.dump 139cdf0e10cSrcweir.ELSE 140cdf0e10cSrcweir @nm $(SHL$(TNR)OBJS:s/.obj/.o/) > $@.dump 141cdf0e10cSrcweir.ENDIF 142cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)OBJS)!"="" 143cdf0e10cSrcweir @$(TYPE) /dev/null $(SHL$(TNR)LIBS:s/.lib/.dump/) >> $@.dump 144cdf0e10cSrcweir $(COMMAND_ECHO) $(PERL) $(SOLARENV)/bin/mapgen.pl -d $@.dump -s $(SHL$(TNR)INTERFACE) -f $(SHL$(TNR)FILTERFILE) -m $@ 145cdf0e10cSrcweir 146cdf0e10cSrcweir.ELSE # "$(SHL$(TNR)FILTERFILE)"!="" 147cdf0e10cSrcweirUSE_SHL$(TNR)VERSIONMAP=$(MISC)/$(SHL$(TNR)TARGET).vmap 148cdf0e10cSrcweir$(USE_SHL$(TNR)VERSIONMAP) : 149cdf0e10cSrcweir.IF "$(VERBOSE)" == "TRUE" 150cdf0e10cSrcweir @echo ----------------------------- 151cdf0e10cSrcweir @echo SHL$(TNR)FILTERFILE not set! 152cdf0e10cSrcweir @echo ----------------------------- 153cdf0e10cSrcweir @$(TOUCH) $@ 154cdf0e10cSrcweir @echo dummy file to keep the dependencies for later use. 155cdf0e10cSrcweir.ELSE 156cdf0e10cSrcweir @$(TOUCH) $@ 157cdf0e10cSrcweir.ENDIF 158cdf0e10cSrcweir# force_dmake_to_error 159cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)FILTERFILE)"!="" 160cdf0e10cSrcweir.ELSE # "$(USE_SHL$(TNR)VERSIONMAP)"!="" 161cdf0e10cSrcweir 162cdf0e10cSrcweir#and now for the plain non-generic way... 163cdf0e10cSrcweir.IF "$(SHL$(TNR)VERSIONMAP)"!="" 164cdf0e10cSrcweirUSE_SHL$(TNR)VERSIONMAP=$(MISC)/$(SHL$(TNR)VERSIONMAP:b)_$(SHL$(TNR)TARGET)$(SHL$(TNR)VERSIONMAP:e) 165cdf0e10cSrcweirSHL$(TNR)VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL$(TNR)VERSIONMAP) 166cdf0e10cSrcweir 167cdf0e10cSrcweir.IF "$(OS)"=="MACOSX" 168cdf0e10cSrcweir$(USE_SHL$(TNR)VERSIONMAP): $(SHL$(TNR)OBJS) $(SHL$(TNR)LIBS) 169cdf0e10cSrcweir.ENDIF 170cdf0e10cSrcweir 171cdf0e10cSrcweir# .ERRREMOVE is needed as a recipe line like "$(AWK) ... > $@" would create $@ 172cdf0e10cSrcweir# even if the $(AWK) part fails: 173cdf0e10cSrcweir$(USE_SHL$(TNR)VERSIONMAP) .ERRREMOVE: $(SHL$(TNR)VERSIONMAP) 174cdf0e10cSrcweir @@-$(RM) -f $@ 175cdf0e10cSrcweir# The following files will only be generated and needed on Mac OS X as temporary files 176cdf0e10cSrcweir# in order to generate exported symbols list out of Linux/Solaris map files 177cdf0e10cSrcweir.IF "$(OS)"=="MACOSX" 178cdf0e10cSrcweir @-$(RM) -f $@.symregexp >& $(NULLDEV) 179cdf0e10cSrcweir @-$(RM) -f $@.expsymlist >& $(NULLDEV) 180cdf0e10cSrcweir.ENDIF 181cdf0e10cSrcweir# Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what 182cdf0e10cSrcweir# happens if somebody will change it in the future 183cdf0e10cSrcweir.IF "$(COMID)"=="gcc3" 184cdf0e10cSrcweir $(COMMAND_ECHO) tr -d "\015" < $(SHL$(TNR)VERSIONMAP) | $(AWK) -f $(SOLARENV)/bin/addsym.awk > $@ 185cdf0e10cSrcweir.ELIF "$(COMNAME)"=="sunpro5" 186cdf0e10cSrcweir $(COMMAND_ECHO) tr -d "\015" < $(SHL$(TNR)VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@ 187cdf0e10cSrcweir.ELSE # "$(COMID)"=="gcc3" 188cdf0e10cSrcweir $(COMMAND_ECHO) tr -d "\015" < $(SHL$(TNR)VERSIONMAP) > $@ 189cdf0e10cSrcweir.ENDIF # "$(COMID)"=="gcc3" 190cdf0e10cSrcweir @chmod a+w $@ 191cdf0e10cSrcweir# Mac OS X post-processing generate an exported symbols list from the generated map file 192cdf0e10cSrcweir# for details on exported symbols list see man ld on Mac OS X 193cdf0e10cSrcweir.IF "$(OS)"=="MACOSX" 194cdf0e10cSrcweir @-cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols 195cdf0e10cSrcweir @-cat $@ | $(AWK) -f $(SOLARENV)/bin/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp 196cdf0e10cSrcweir# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS 197cdf0e10cSrcweir# Extract RTTI symbols from all the objects that will be used to build a shared library 198cdf0e10cSrcweir.IF "$(SHL$(TNR)OBJS)"!="" 199cdf0e10cSrcweir -echo $(foreach,i,$(SHL$(TNR)OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols 200cdf0e10cSrcweir.ENDIF 201cdf0e10cSrcweir.IF "$(SHL$(TNR)LIBS)"!="" 202cdf0e10cSrcweir $(COMMAND_ECHO)-$(TYPE) $(foreach,j,$(SHL$(TNR)LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)/bin/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols 203cdf0e10cSrcweir.ENDIF 204cdf0e10cSrcweir# overwrite the map file generate into the local output tree with the generated 205cdf0e10cSrcweir# exported symbols list 206cdf0e10cSrcweir cp $@.exported-symbols $@ 207cdf0e10cSrcweir.ENDIF # .IF "$(OS)"=="MACOSX" 208cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)VERSIONMAP)"!="" 209cdf0e10cSrcweir.ENDIF # "$(USE_SHL$(TNR)VERSIONMAP)"!="" 210cdf0e10cSrcweir.ENDIF # "$(GUI)" != "UNX" 211cdf0e10cSrcweir 212cdf0e10cSrcweir.IF "$(UNIXVERSIONNAMES)"!="" 213cdf0e10cSrcweir.IF "$(OS)"!="MACOSX" 214cdf0e10cSrcweir.IF "$(GUI)"=="UNX" 215cdf0e10cSrcweirSHL$(TNR)SONAME=\"$(SONAME_SWITCH)$(SHL$(TNR)TARGETN:f)\" 216cdf0e10cSrcweir.ENDIF # "$(GUI)"!="UNX" 217cdf0e10cSrcweir.ENDIF # "$(OS)"!="MACOSX" 218cdf0e10cSrcweir.ENDIF # "$(UNIXVERSIONNAMES)"!="" 219cdf0e10cSrcweir 220cdf0e10cSrcweir.IF "$(SHL$(TNR)RES)"!="" 221cdf0e10cSrcweirSHL$(TNR)ALLRES+=$(SHL$(TNR)RES) 222cdf0e10cSrcweirSHL$(TNR)LINKRES*=$(MISC)/$(SHL$(TNR)TARGET).res 223cdf0e10cSrcweirSHL$(TNR)LINKRESO*=$(MISC)/$(SHL$(TNR)TARGET)_res.o 224cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)RES)"!="" 225cdf0e10cSrcweir 226cdf0e10cSrcweir.IF "$(SHL$(TNR)DEFAULTRES)$(use_shl_versions)"!="" 227cdf0e10cSrcweirSHL$(TNR)DEFAULTRES*=$(MISC)/$(SHL$(TNR)TARGET)_def.res 228cdf0e10cSrcweirSHL$(TNR)ALLRES+=$(SHL$(TNR)DEFAULTRES) 229cdf0e10cSrcweirSHL$(TNR)LINKRES*=$(MISC)/$(SHL$(TNR)TARGET).res 230cdf0e10cSrcweirSHL$(TNR)LINKRESO*=$(MISC)/$(SHL$(TNR)TARGET)_res.o 231cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)DEFAULTRES)$(use_shl_versions)"!="" 232cdf0e10cSrcweir 233cdf0e10cSrcweir#.IF "$(SHL$(TNR)TARGETN)"!="" 234cdf0e10cSrcweir 235cdf0e10cSrcweir.IF "$(linkinc)"!="" 236cdf0e10cSrcweir.IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2" 237cdf0e10cSrcweir.IF "$(SHL$(TNR)LIBS)"!="" 238cdf0e10cSrcweir$(MISC)/$(SHL$(TNR)TARGET)_linkinc.ls .PHONY: 239cdf0e10cSrcweir @@-$(RM) $@ 240cdf0e10cSrcweir $(COMMAND_ECHO)$(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@ 241cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)LIBS)"!="" 242cdf0e10cSrcweir.ENDIF 243cdf0e10cSrcweir 244cdf0e10cSrcweirLINKINCTARGETS+=$(MISC)/$(SHL$(TNR)TARGETN:b)_linkinc.ls 245cdf0e10cSrcweir$(SHL$(TNR)TARGETN) : $(LINKINCTARGETS) 246cdf0e10cSrcweir 247cdf0e10cSrcweir.ELSE 248cdf0e10cSrcweir.IF "$(SHL$(TNR)USE_EXPORTS)"=="name" 249cdf0e10cSrcweir.IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2" 250cdf0e10cSrcweir.IF "$(COM)"!="GCC" 251cdf0e10cSrcweir.IF "$(SHL$(TNR)LIBS)"!="" 252cdf0e10cSrcweirSHL$(TNR)LINKLIST=$(MISC)/$(SHL$(TNR)TARGET)_link.lst 253cdf0e10cSrcweirSHL$(TNR)LINKLISTPARAM=@$(SHL$(TNR)LINKLIST) 254cdf0e10cSrcweir$(SHL$(TNR)LINKLIST) : $(SHL$(TNR)LIBS) 255cdf0e10cSrcweir @@-$(RM) $@ 256cdf0e10cSrcweir $(COMMAND_ECHO)$(SED) -f $(SOLARENV)/bin/chrel.sed $(foreach,i,$(SHL$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@ 257cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)LIBS)"!="" 258cdf0e10cSrcweir.ENDIF # "$(COM)"!="GCC" 259cdf0e10cSrcweir.ENDIF 260cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"=="name" 261cdf0e10cSrcweir 262cdf0e10cSrcweir$(MISC)/%linkinc.ls: 263cdf0e10cSrcweir @echo . > $@ 264cdf0e10cSrcweir.ENDIF # "$(linkinc)"!="" 265cdf0e10cSrcweir 266cdf0e10cSrcweir.IF "$(GUI)" == "OS2" 267cdf0e10cSrcweir#21/02/2006 YD dll names must be 8.3, invoke fix script 268cdf0e10cSrcweir#check osl/os2/module.c/osl_loadModule() 269534c536dSYuri DarioSHL$(TNR)TARGET8=$(shell @fix_shl.cmd $(SHL$(TNR)TARGET)) 270cdf0e10cSrcweir.ENDIF 271cdf0e10cSrcweir 272cdf0e10cSrcweir 273cdf0e10cSrcweir$(SHL$(TNR)TARGETN) : \ 274cdf0e10cSrcweir $(SHL$(TNR)OBJS)\ 275cdf0e10cSrcweir $(SHL$(TNR)LIBS)\ 276cdf0e10cSrcweir $(USE_$(TNR)IMPLIB_DEPS)\ 277cdf0e10cSrcweir $(USE_SHL$(TNR)DEF)\ 278cdf0e10cSrcweir $(USE_SHL$(TNR)VERSIONMAP)\ 279cdf0e10cSrcweir $(SHL$(TNR)RES)\ 280cdf0e10cSrcweir $(SHL$(TNR)DEPN) \ 281cdf0e10cSrcweir $(SHL$(TNR)LINKLIST) 282cdf0e10cSrcweir @echo "Making: " $(@:f) 283cdf0e10cSrcweir.IF "$(GUI)" == "WNT" 284cdf0e10cSrcweir.IF "$(SHL$(TNR)DEFAULTRES)"!="" 285cdf0e10cSrcweir @@-$(RM) $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 286cdf0e10cSrcweir.IF "$(SHL$(TNR)ICON)" != "" 287cdf0e10cSrcweir @echo 1 ICON $(SHL$(TNR)ICON) >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 288cdf0e10cSrcweir.ENDIF 289cdf0e10cSrcweir.IF "$(use_shl_versions)" != "" 290cdf0e10cSrcweir.IF "$(SHL$(TNR)ADD_VERINFO)"!="" 291cdf0e10cSrcweir @echo $(EMQ)#include $(EMQ)"$(SHL$(TNR)ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 292cdf0e10cSrcweir.ELSE # "$(SHL$(TNR)ADD_VERINFO)"!="" 293cdf0e10cSrcweir @echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 294cdf0e10cSrcweir @echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 295cdf0e10cSrcweir @echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 296cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)ADD_VERINFO)"!="" 297cdf0e10cSrcweir @echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 298cdf0e10cSrcweir @echo $(EMQ)#define ORG_NAME $(SHL$(TNR)TARGET)$(DLLPOST) >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 299cdf0e10cSrcweir @echo $(EMQ)#define INTERNAL_NAME $(SHL$(TNR)TARGET:b) >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 300cdf0e10cSrcweir @echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 301cdf0e10cSrcweir.ENDIF # "$(use_shl_versions)" != "" 302cdf0e10cSrcweir $(COMMAND_ECHO)$(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 303cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)DEFAULTRES)"!="" 304cdf0e10cSrcweir.IF "$(SHL$(TNR)ALLRES)"!="" 305cdf0e10cSrcweir $(COMMAND_ECHO)$(TYPE) $(SHL$(TNR)ALLRES) > $(SHL$(TNR)LINKRES) 306cdf0e10cSrcweir.IF "$(COM)"=="GCC" 307cdf0e10cSrcweir windres $(SHL$(TNR)LINKRES) $(SHL$(TNR)LINKRESO) 308cdf0e10cSrcweir.ENDIF # "$(COM)"=="GCC" 309cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)ALLRES)"!="" 310cdf0e10cSrcweir.IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def 311cdf0e10cSrcweir @echo dlltool --dllname $(SHL$(TNR)TARGET)$(DLLPOST) \ 312cdf0e10cSrcweir --kill-at \\ > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 313cdf0e10cSrcweir @noop $(assign ALL$(TNR)OBJLIST:=$(STDOBJ) $(SHL$(TNR)OBJS) $(SHL$(TNR)LINKRESO) $(shell $(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s?$(ROUT)?$(PRJ)/$(ROUT)?g)) 314cdf0e10cSrcweir.IF "$(DEFLIB$(TNR)NAME)"!="" # do not have to include objs 315cdf0e10cSrcweir @noop $(assign DEF$(TNR)OBJLIST:=$(shell $(TYPE) $(foreach,i,$(DEFLIB$(TNR)NAME) $(SLB)/$(i).lib) | sed s?$(ROUT)?$(PRJ)/$(ROUT)?g)) 316cdf0e10cSrcweir @noop $(foreach,i,$(DEF$(TNR)OBJLIST) $(assign ALL$(TNR)OBJLIST:=$(ALL$(TNR)OBJLIST:s?$i??))) 317cdf0e10cSrcweir.ENDIF # "$(DEFLIB$(TNR)NAME)"!="" 318cdf0e10cSrcweir @echo --output-exp $(MISC)/$(@:b)_exp.o \\ >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 319cdf0e10cSrcweir.IF "$(SHL$(TNR)DEF)"!="" 320cdf0e10cSrcweir @echo --input-def $(SHL$(TNR)DEF) \\ >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 321cdf0e10cSrcweir.ELSE 322cdf0e10cSrcweir @echo $(SHL$(TNR)VERSIONOBJ) $(SHL$(TNR)DESCRIPTIONOBJ) \\ >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 323cdf0e10cSrcweir.ENDIF 324cdf0e10cSrcweir @echo $(ALL$(TNR)OBJLIST) >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 325cdf0e10cSrcweir @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \ 326cdf0e10cSrcweir $(STDOBJ) $(SHL$(TNR)VERSIONOBJ) $(SHL$(TNR)DESCRIPTIONOBJ) $(SHL$(TNR)OBJS) $(SHL$(TNR)LINKRESO) \ 327cdf0e10cSrcweir `$(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \ 328cdf0e10cSrcweir -Wl,--exclude-libs,ALL,--start-group $(SHL$(TNR)STDLIBS) -Wl,--end-group \ 329cdf0e10cSrcweir $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) $(MISC)/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \ 330cdf0e10cSrcweir -Wl,-Map,$(MISC)/$(@:b).map >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 331cdf0e10cSrcweir .IF "$(VERBOSE)" == "TRUE" 332cdf0e10cSrcweir @$(TYPE) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 333cdf0e10cSrcweir .ENDIF 334cdf0e10cSrcweir @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 335cdf0e10cSrcweir.ELSE 336cdf0e10cSrcweir.IF "$(linkinc)"=="" 337cdf0e10cSrcweir.IF "$(SHL$(TNR)USE_EXPORTS)"!="name" 338cdf0e10cSrcweir.IF "$(USE_DEFFILE)"!="" 339cdf0e10cSrcweir $(COMMAND_ECHO)$(SHL$(TNR)LINKER) @$(mktmp \ 340cdf0e10cSrcweir $(SHL$(TNR)LINKFLAGS) \ 341cdf0e10cSrcweir $(LINKFLAGSSHL) \ 342cdf0e10cSrcweir $(SHL$(TNR)STACK) $(SHL$(TNR)BASEX) \ 343cdf0e10cSrcweir -out:$@ \ 344cdf0e10cSrcweir -map:$(MISC)/$(@:b).map \ 345cdf0e10cSrcweir -def:$(SHL$(TNR)DEF) \ 346cdf0e10cSrcweir $(USE_$(TNR)IMPLIB) \ 347cdf0e10cSrcweir $(STDOBJ) \ 348cdf0e10cSrcweir $(SHL$(TNR)VERSIONOBJ) $(SHL$(TNR)OBJS) \ 349cdf0e10cSrcweir $(SHL$(TNR)LIBS) \ 350cdf0e10cSrcweir $(SHL$(TNR)STDLIBS) \ 351cdf0e10cSrcweir $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \ 352cdf0e10cSrcweir $(SHL$(TNR)LINKRES) \ 353cdf0e10cSrcweir ) 354cdf0e10cSrcweir# double check if target was really written... still making sense? 355cdf0e10cSrcweir @@$(LS) $@ 356cdf0e10cSrcweir @echo linking $@.manifest ... 357cdf0e10cSrcweir.IF "$(VISTA_MANIFEST)"!="" 358cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI) 359cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI) 360cdf0e10cSrcweir.ELSE 361cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI) 362cdf0e10cSrcweir.ENDIF # "$(VISTA_MANIFEST)"!="" 363cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI) 364cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI) 365cdf0e10cSrcweir.ELSE # "$(USE_DEFFILE)"!="" 366cdf0e10cSrcweir $(COMMAND_ECHO)$(SHL$(TNR)LINKER) @$(mktmp $(SHL$(TNR)LINKFLAGS) \ 367cdf0e10cSrcweir $(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \ 368cdf0e10cSrcweir $(SHL$(TNR)STACK) -out:$(SHL$(TNR)TARGETN) \ 369cdf0e10cSrcweir -map:$(MISC)/$(@:B).map \ 370cdf0e10cSrcweir $(LB)/$(SHL$(TNR)IMPLIB).exp \ 371cdf0e10cSrcweir $(STDOBJ) \ 372cdf0e10cSrcweir $(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ) \ 373cdf0e10cSrcweir $(SHL$(TNR)LIBS) \ 374cdf0e10cSrcweir $(SHL$(TNR)STDLIBS) \ 375cdf0e10cSrcweir $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \ 376cdf0e10cSrcweir $(SHL$(TNR)LINKRES) \ 377cdf0e10cSrcweir ) 378cdf0e10cSrcweir# double check if target was really written... still making sense? 379cdf0e10cSrcweir @@$(LS) $@ 380cdf0e10cSrcweir @echo linking $@.manifest ... 381cdf0e10cSrcweir.IF "$(VISTA_MANIFEST)"!="" 382cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI) 383cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI) 384cdf0e10cSrcweir.ELSE 385cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI) 386cdf0e10cSrcweir.ENDIF # "$(VISTA_MANIFEST)"!="" 387cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI) 388cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI) 389cdf0e10cSrcweir.ENDIF # "$(USE_DEFFILE)"!="" 390cdf0e10cSrcweir.ELSE # "$(SHL$(TNR)USE_EXPORTS)"!="name" 391cdf0e10cSrcweir $(COMMAND_ECHO)$(SHL$(TNR)LINKER) @$(mktmp $(SHL$(TNR)LINKFLAGS) \ 392cdf0e10cSrcweir $(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \ 393cdf0e10cSrcweir $(SHL$(TNR)STACK) -out:$(SHL$(TNR)TARGETN) \ 394cdf0e10cSrcweir -map:$(MISC)/$(@:B).map \ 395cdf0e10cSrcweir $(USE_$(TNR)IMPLIB) \ 396cdf0e10cSrcweir $(STDOBJ) \ 397cdf0e10cSrcweir $(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ)) \ 398cdf0e10cSrcweir $(SHL$(TNR)LINKLISTPARAM) \ 399cdf0e10cSrcweir @$(mktmp $(SHL$(TNR)STDLIBS) \ 400cdf0e10cSrcweir $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \ 401cdf0e10cSrcweir $(SHL$(TNR)LINKRES) \ 402cdf0e10cSrcweir ) 403cdf0e10cSrcweir @echo linking $@.manifest ... 404cdf0e10cSrcweir.IF "$(VISTA_MANIFEST)"!="" 405cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI) 406cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI) 407cdf0e10cSrcweir.ELSE 408cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI) 409cdf0e10cSrcweir.ENDIF # "$(VISTA_MANIFEST)"!="" 410cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI) 411cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI) 412cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"!="name" 413cdf0e10cSrcweir.ELSE # "$(linkinc)"=="" 414cdf0e10cSrcweir $(COMMAND_ECHO)-$(RM) del $(MISC)/$(SHL$(TNR)TARGET).lnk 415cdf0e10cSrcweir $(COMMAND_ECHO)-$(RM) $(MISC)/$(SHL$(TNR)TARGET).lst 416cdf0e10cSrcweir $(COMMAND_ECHO)$(TYPE) $(mktmp \ 417cdf0e10cSrcweir $(SHL$(TNR)LINKFLAGS) \ 418cdf0e10cSrcweir $(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \ 419cdf0e10cSrcweir $(SHL$(TNR)STACK) $(MAPFILE) \ 420cdf0e10cSrcweir -out:$@ \ 421cdf0e10cSrcweir $(LB)/$(SHL$(TNR)IMPLIB).exp \ 422cdf0e10cSrcweir $(STDOBJ) \ 423cdf0e10cSrcweir $(SHL$(TNR)OBJS) \ 424cdf0e10cSrcweir $(SHL$(TNR)STDLIBS) \ 425cdf0e10cSrcweir $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \ 426cdf0e10cSrcweir $(SHL$(TNR)LINKRES) \ 427cdf0e10cSrcweir ) >> $(MISC)/$(SHL$(TNR)TARGET).lnk 428cdf0e10cSrcweir $(COMMAND_ECHO)$(TYPE) $(MISC)/$(SHL$(TNR)TARGETN:b)_linkinc.ls >> $(MISC)/$(SHL$(TNR)TARGET).lnk 429cdf0e10cSrcweir $(COMMAND_ECHO)$(SHL$(TNR)LINKER) @$(MISC)/$(SHL$(TNR)TARGET).lnk 430cdf0e10cSrcweir @echo linking $@.manifest ... 431cdf0e10cSrcweir.IF "$(VISTA_MANIFEST)"!="" 432cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI) 433cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI) 434cdf0e10cSrcweir.ELSE 435cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(MT) $(MTFLAGS) -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI) 436cdf0e10cSrcweir.ENDIF # "$(VISTA_MANIFEST)"!="" 437cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI) 438cdf0e10cSrcweir $(COMMAND_ECHO)$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI) 439cdf0e10cSrcweir.ENDIF # "$(linkinc)"=="" 440cdf0e10cSrcweir.ENDIF # "$(COM)"=="GCC" 441cdf0e10cSrcweir.ENDIF # "$(GUI)" == "WNT" 442cdf0e10cSrcweir.IF "$(GUI)"=="UNX" 443cdf0e10cSrcweir.IF "$(OS)"=="MACOSX" 444cdf0e10cSrcweir @-$(RM) $(MISC)/$(@:b).list 445cdf0e10cSrcweir @-$(RM) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 446cdf0e10cSrcweir @echo $(STDSLO) $(SHL$(TNR)OBJS:s/.obj/.o/) \ 447cdf0e10cSrcweir $(SHL$(TNR)VERSIONOBJ) \ 448cdf0e10cSrcweir `cat /dev/null $(SHL$(TNR)LIBS) | sed s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)/$(@:b).list 449cdf0e10cSrcweir @echo -n $(SHL$(TNR)LINKER) $(SHL$(TNR)LINKFLAGS) $(SHL$(TNR)VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) -o $@ \ 450cdf0e10cSrcweir $(SHL$(TNR)STDLIBS) $(SHL$(TNR)ARCHIVES) $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) -filelist $(MISC)/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 451cdf0e10cSrcweir @$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \ 452cdf0e10cSrcweir `cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd` \ 453cdf0e10cSrcweir >> $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 454cdf0e10cSrcweir .IF "$(VERBOSE)" == "TRUE" 455cdf0e10cSrcweir @cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 456cdf0e10cSrcweir .ENDIF 457cdf0e10cSrcweir @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 458cdf0e10cSrcweir @$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl \ 459cdf0e10cSrcweir shl $(SHL$(TNR)RPATH) $@ 460cdf0e10cSrcweir.IF "$(SHL$(TNR)CREATEJNILIB)"!="" 461cdf0e10cSrcweir @echo "Making: " $(@:f).jnilib 462cdf0e10cSrcweir @macosx-create-bundle $@ 463cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)CREATEJNILIB)"!="" 464cdf0e10cSrcweir.IF "$(UPDATER)"=="YES" 465cdf0e10cSrcweir.IF "$(SHL$(TNR)NOCHECK)"=="" 466cdf0e10cSrcweir $(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS$(TNR)) $(SHL$(TNR)TARGETN) 467cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)NOCHECK)"!="" 468cdf0e10cSrcweir.ENDIF 469cdf0e10cSrcweir.ELSE # "$(OS)"=="MACOSX" 470cdf0e10cSrcweir @-$(RM) $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 471cdf0e10cSrcweir @echo $(SHL$(TNR)LINKER) $(SHL$(TNR)LINKFLAGS) $(SHL$(TNR)SONAME) $(LINKFLAGSSHL) $(SHL$(TNR)VERSIONMAPPARA) -L$(PRJ)/$(ROUT)/lib $(SOLARLIB) $(STDSLO) $(SHL$(TNR)OBJS:s/.obj/.o/) \ 472cdf0e10cSrcweir $(SHL$(TNR)VERSIONOBJ) -o $@ \ 473cdf0e10cSrcweir `cat /dev/null $(SHL$(TNR)LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)/$(ROUT)\#g` \ 474cdf0e10cSrcweir $(SHL$(TNR)STDLIBS) $(SHL$(TNR)ARCHIVES) $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) $(LINKOUTPUT_FILTER) > $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 475cdf0e10cSrcweir .IF "$(VERBOSE)" == "TRUE" 476cdf0e10cSrcweir @cat $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 477cdf0e10cSrcweir .ENDIF 478cdf0e10cSrcweir @+source $(MISC)/$(TARGET).$(@:b)_$(TNR).cmd 479cdf0e10cSrcweir.IF "$(UPDATER)"=="YES" 480cdf0e10cSrcweir.IF "$(SHL$(TNR)NOCHECK)"=="" 481cdf0e10cSrcweir $(COMMAND_ECHO)-$(RM) $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f) 482cdf0e10cSrcweir $(COMMAND_ECHO)$(RENAME) $(SHL$(TNR)TARGETN) $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f) 483cdf0e10cSrcweir.IF "$(VERBOSE)"=="TRUE" 484cdf0e10cSrcweir $(COMMAND_ECHO)$(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS$(TNR)) $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f) 485cdf0e10cSrcweir.ELSE 486cdf0e10cSrcweir $(COMMAND_ECHO)$(SOLARENV)/bin/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS$(TNR)) -- -s $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f) 487cdf0e10cSrcweir.ENDIF 488cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)NOCHECK)"!="" 489cdf0e10cSrcweir.ENDIF # "$(UPDATER)"=="YES" 490cdf0e10cSrcweir.ENDIF # "$(OS)"=="MACOSX" 491cdf0e10cSrcweir.IF "$(UNIXVERSIONNAMES)"!="" 492cdf0e10cSrcweir $(COMMAND_ECHO)$(RM) $(LB)/$(SHL$(TNR)TARGETN:b) 493cdf0e10cSrcweir $(COMMAND_ECHO)cd $(LB) && ln -s $(SHL$(TNR)TARGETN:f) $(SHL$(TNR)TARGETN:b) 494cdf0e10cSrcweir.ENDIF # "$(UNIXVERSIONNAMES)"!="" 495cdf0e10cSrcweir.IF "$(VERBOSE)" == "TRUE" 496cdf0e10cSrcweir @ls -l $@ 497cdf0e10cSrcweir.ENDIF 498cdf0e10cSrcweir.ENDIF # "$(GUI)" == "UNX" 499cdf0e10cSrcweir 500cdf0e10cSrcweir.IF "$(GUI)" == "OS2" 501cdf0e10cSrcweir 502cdf0e10cSrcweir.IF "$(SHL$(TNR)DEFAULTRES)"!="" 503534c536dSYuri Dario @+-$(RM) $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc > $(NULLDEV) 504cdf0e10cSrcweir.IF "$(SHL$(TNR)ICON)" != "" 505cdf0e10cSrcweir @-+echo 1 ICON $(SHL$(TNR)ICON) >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 506cdf0e10cSrcweir.ENDIF 507cdf0e10cSrcweir.IF "$(use_shl_versions)" != "" 508cdf0e10cSrcweir.IF "$(SHL$(TNR)ADD_VERINFO)"!="" 509cdf0e10cSrcweir @-+echo $(EMQ)#include $(EMQ)"$(SHL$(TNR)ADD_VERINFO)$(EMQ)" >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 510cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)ADD_VERINFO)"!="" 511cdf0e10cSrcweir @-+echo MENU 1 BEGIN END >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 512cdf0e10cSrcweir# @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 513cdf0e10cSrcweir.ENDIF # "$(use_shl_versions)" != "" 514cdf0e10cSrcweir# YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR) 515cdf0e10cSrcweir $(COMMAND_ECHO)$(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)/$(SHL$(TNR)DEFAULTRES:b).rc 516cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)DEFAULTRES)"!="" 517cdf0e10cSrcweir 518cdf0e10cSrcweir.IF "$(SHL$(TNR)ALLRES)"!="" 519cdf0e10cSrcweir $(COMMAND_ECHO)+$(TYPE) $(SHL$(TNR)ALLRES) > $(SHL$(TNR)LINKRES) 520cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)ALLRES)"!="" 521cdf0e10cSrcweir 522cdf0e10cSrcweir.IF "$(USE_DEFFILE)"!="" 523cdf0e10cSrcweir 524cdf0e10cSrcweir $(COMMAND_ECHO)$(SHL$(TNR)LINKER) $(SHL$(TNR)LINKFLAGS) $(LINKFLAGSSHL) -o $@ \ 525cdf0e10cSrcweir $(SHL$(TNR)DEF) \ 526cdf0e10cSrcweir $(STDOBJ) \ 527cdf0e10cSrcweir -L$(LB) \ 528cdf0e10cSrcweir -L$(SOLARVERSION)/$(INPATH)/lib \ 529cdf0e10cSrcweir $(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ) \ 530cdf0e10cSrcweir $(SHL$(TNR)LIBS) \ 531cdf0e10cSrcweir $(SHL$(TNR)LINKRES) \ 532534c536dSYuri Dario $(SHL$(TNR)STDLIBS) \ 533534c536dSYuri Dario $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) 534cdf0e10cSrcweir 535cdf0e10cSrcweir.ELSE # "$(USE_DEFFILE)"!="" 536cdf0e10cSrcweir 537*4d2a3edfSYuri Dario $(COMMAND_ECHO)$(SHL$(TNR)LINKER) $(SHL$(TNR)LINKFLAGS) \ 538cdf0e10cSrcweir $(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \ 539cdf0e10cSrcweir $(SHL$(TNR)STACK) -o $(SHL$(TNR)TARGETN) \ 540cdf0e10cSrcweir $(SHL$(TNR)DEF) \ 541cdf0e10cSrcweir $(STDOBJ) \ 542cdf0e10cSrcweir -L$(LB) \ 543cdf0e10cSrcweir -L$(SOLARVERSION)/$(INPATH)/lib \ 544cdf0e10cSrcweir $(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ) \ 545cdf0e10cSrcweir $(SHL$(TNR)LIBS) \ 546cdf0e10cSrcweir $(SHL$(TNR)LINKRES) \ 547534c536dSYuri Dario $(SHL$(TNR)STDLIBS) \ 548534c536dSYuri Dario $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) 549cdf0e10cSrcweir 550cdf0e10cSrcweir.ENDIF # "$(USE_DEFFILE)"!="" 551cdf0e10cSrcweir 552534c536dSYuri Dario $(COMMAND_ECHO)+$(IMPLIB) -p256 $(IMPLIBFLAGS) $(SHL$(TNR)IMPLIBN) $@ 553534c536dSYuri Dario $(COMMAND_ECHO)+$(IMPLIB) -p256 $(IMPLIBFLAGS) $(LB)/$(SHL$(TNR)TARGET).lib $@ 554534c536dSYuri Dario 555cdf0e10cSrcweir.IF "$(SHL$(TNR)TARGET8)" != "$(SHL$(TNR)TARGET)" 556cdf0e10cSrcweir $(COMMAND_ECHO)+$(COPY) $@ $(@:d)$(SHL$(TNR)TARGET8).dll 557cdf0e10cSrcweir.ENDIF 558cdf0e10cSrcweir 559cdf0e10cSrcweir.ENDIF # "$(GUI)" == "OS2" 560cdf0e10cSrcweir 561cdf0e10cSrcweir.ENDIF # "$(SHL$(TNR)TARGETN)"!="" 562cdf0e10cSrcweir 563cdf0e10cSrcweir# unroll end 564cdf0e10cSrcweir####################################################### 565cdf0e10cSrcweir 566cdf0e10cSrcweir#------------------------------------------------------------------------- 567cdf0e10cSrcweir 568cdf0e10cSrcweir####################################################### 569cdf0e10cSrcweir# Anweisungen fuer das Linken 570cdf0e10cSrcweir# unroll begin 571cdf0e10cSrcweir 572cdf0e10cSrcweir.IF "$(SHL$(TNR)IMPLIBN)" != "" 573cdf0e10cSrcweir 574cdf0e10cSrcweir.IF "$(UPDATER)"=="YES" 575cdf0e10cSrcweirUSELIB$(TNR)DEPN+=$(SHL$(TNR)LIBS) 576cdf0e10cSrcweir.ELSE 577cdf0e10cSrcweir.ENDIF 578cdf0e10cSrcweir 579cdf0e10cSrcweir.IF "$(USE_DEFFILE)"!="" 580cdf0e10cSrcweirUSE_SHL$(TNR)TARGET=$(SHL$(TNR)TARGETN) 581cdf0e10cSrcweir.ENDIF 582cdf0e10cSrcweir 583cdf0e10cSrcweir.IF "$(GUI)" != "UNX" 584cdf0e10cSrcweir$(SHL$(TNR)IMPLIBN): \ 585cdf0e10cSrcweir $(SHL$(TNR)DEF) \ 586cdf0e10cSrcweir $(USE_SHL$(TNR)TARGET) \ 587cdf0e10cSrcweir $(USELIB$(TNR)DEPN) \ 588cdf0e10cSrcweir $(USELIBDEPN) 589cdf0e10cSrcweir.ELSE 590cdf0e10cSrcweir$(SHL$(TNR)IMPLIBN): \ 591cdf0e10cSrcweir $(SHL$(TNR)LIBS) 592cdf0e10cSrcweir.ENDIF 593cdf0e10cSrcweir @echo "Making: " $(@:f) 594cdf0e10cSrcweir.IF "$(GUI)" == "WNT" 595cdf0e10cSrcweir.IF "$(COM)"=="GCC" 596cdf0e10cSrcweir @echo no ImportLibs on mingw 597cdf0e10cSrcweir @-$(RM) $@ 598cdf0e10cSrcweir @$(TOUCH) $@ 599cdf0e10cSrcweir.ELSE # "$(COM)=="GCC" 600cdf0e10cSrcweir# bei use_deffile implib von linker erstellt 601cdf0e10cSrcweir.IF "$(USE_DEFFILE)"=="" 602cdf0e10cSrcweir $(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL$(TNR)IMPLIBN) \ 603cdf0e10cSrcweir -def:$(SHL$(TNR)DEF) ) 604cdf0e10cSrcweir.ELSE # "$(USE_DEFFILE)=="" 605cdf0e10cSrcweir @echo build of $(SHL$(TNR)TARGETN) creates $@ 606cdf0e10cSrcweir @$(TOUCH) $@ 607cdf0e10cSrcweir.ENDIF # "$(USE_DEFFILE)=="" 608cdf0e10cSrcweir.ENDIF # "$(COM)"=="GCC" 609cdf0e10cSrcweir 610cdf0e10cSrcweir.ELIF "$(GUI)" == "OS2" 611cdf0e10cSrcweir 612cdf0e10cSrcweir# touch creates an empty file, but this is not good for emxomfar, so 613cdf0e10cSrcweir# create a dummy lib here 614cdf0e10cSrcweir $(COMMAND_ECHO)-$(LIBMGR) $(LIBFLAGS) $@ $(SHL$(TNR)VERSIONOBJ) 615cdf0e10cSrcweir +@echo build of $(SHL$(TNR)TARGETN) creates $@ 616cdf0e10cSrcweir 617cdf0e10cSrcweir.ELSE 618cdf0e10cSrcweir @echo no ImportLibs on Mac and *ix 619cdf0e10cSrcweir @-$(RM) $@ 620cdf0e10cSrcweir @$(TOUCH) $@ 621cdf0e10cSrcweir.ENDIF 622cdf0e10cSrcweir.ENDIF 623cdf0e10cSrcweir 624cdf0e10cSrcweir# unroll end 625cdf0e10cSrcweir####################################################### 626cdf0e10cSrcweir 627