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