2000-09-20 08:43:26 -05:00
|
|
|
#*************************************************************************
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2008-04-10 11:43:07 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# Copyright 2008 by Sun Microsystems, Inc.
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2008-04-10 11:43:07 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2008-04-10 11:43:07 -05:00
|
|
|
# $RCSfile: tg_shl.mk,v $
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2008-07-22 10:51:45 -05:00
|
|
|
# $Revision: 1.127 $
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2008-04-10 11:43:07 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2008-04-10 11:43:07 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2008-04-10 11:43:07 -05:00
|
|
|
# OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2008-04-10 11:43:07 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2000-10-30 06:14:55 -06:00
|
|
|
#
|
2000-09-20 08:43:26 -05:00
|
|
|
#*************************************************************************
|
|
|
|
|
|
|
|
#######################################################
|
2006-07-05 15:59:27 -05:00
|
|
|
# targets for linking
|
2000-09-20 08:43:26 -05:00
|
|
|
# unroll begin
|
|
|
|
|
2001-10-30 06:08:27 -06:00
|
|
|
.IF "$(SHL$(TNR)TARGETN)"!=""
|
|
|
|
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(OS)"=="AIX"
|
|
|
|
SHL$(TNR)STDLIBS=
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
.IF "$(SHLLINKARCONLY)" != ""
|
|
|
|
SHL$(TNR)STDLIBS=
|
|
|
|
STDSHL=
|
|
|
|
.ELSE
|
|
|
|
SHL$(TNR)ARCHIVES=
|
|
|
|
.ENDIF
|
|
|
|
|
2005-03-15 02:56:48 -06:00
|
|
|
# decide how to link
|
|
|
|
.IF "$(SHL$(TNR)CODETYPE)"=="C"
|
|
|
|
SHL$(TNR)LINKER=$(LINKC)
|
|
|
|
SHL$(TNR)STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
|
2005-07-11 09:28:12 -05:00
|
|
|
SHL$(TNR)LINKFLAGS+=$(LINKCFLAGS)
|
2005-03-15 02:56:48 -06:00
|
|
|
.ELSE # "$(SHL$(TNR)CODETYPE)"=="C"
|
|
|
|
SHL$(TNR)LINKER=$(LINK)
|
|
|
|
SHL$(TNR)STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
|
2005-07-11 09:28:12 -05:00
|
|
|
SHL$(TNR)LINKFLAGS+=$(LINKFLAGS)
|
2005-03-15 02:56:48 -06:00
|
|
|
.ENDIF # "$(SHL$(TNR)CODETYPE)"=="C"
|
|
|
|
|
2007-10-15 06:39:51 -05:00
|
|
|
SHL$(TNR)RPATH*=OOO
|
|
|
|
LINKFLAGSRUNPATH_$(SHL$(TNR)RPATH)*=/ERROR:/Bad_SHL$(TNR)RPATH_value
|
|
|
|
SHL$(TNR)LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL$(TNR)RPATH))
|
|
|
|
|
2004-08-23 03:18:27 -05:00
|
|
|
.IF "$(SHL$(TNR)USE_EXPORTS)"==""
|
2000-09-20 08:43:26 -05:00
|
|
|
SHL$(TNR)DEF*=$(MISC)$/$(SHL$(TNR)TARGET).def
|
2004-08-23 03:18:27 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"==""
|
2000-09-20 08:43:26 -05:00
|
|
|
|
2009-04-23 10:52:08 -05:00
|
|
|
EXTRALIBPATHS$(TNR)=$(EXTRALIBPATHS)
|
|
|
|
.IF "$(UPDATER)"=="YES"
|
|
|
|
.IF "$(SHL$(TNR)NOCHECK)"==""
|
|
|
|
.IF "$(SOLAR_STLLIBPATH)"!=""
|
|
|
|
EXTRALIBPATHS$(TNR)+=-L$(SOLAR_STLLIBPATH)
|
|
|
|
.ENDIF
|
|
|
|
.ENDIF # "$(SHL$(TNR)NOCHECK)"!=""
|
|
|
|
.ENDIF
|
2001-08-14 08:14:33 -05:00
|
|
|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
#+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
|
|
|
|
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
|
2000-12-21 13:06:32 -06:00
|
|
|
.IF "$(VERSIONOBJ)"!=""
|
2008-02-25 09:42:56 -06:00
|
|
|
SHL$(TNR)VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f)
|
2006-03-07 10:09:10 -06:00
|
|
|
USE_VERSIONH:=$(INCCOM)$/$(SHL$(TNR)VERSIONOBJ:b).h
|
2001-11-01 11:21:52 -06:00
|
|
|
.IF "$(GUI)" == "UNX"
|
2008-02-25 09:42:56 -06:00
|
|
|
SHL$(TNR)VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
|
2001-11-02 04:37:13 -06:00
|
|
|
.ELSE # "$(GUI)" == "UNX"
|
2008-02-25 09:42:56 -06:00
|
|
|
SHL$(TNR)VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f)
|
2001-11-01 11:21:52 -06:00
|
|
|
.ENDIF # "$(GUI)" == "UNX"
|
2006-03-07 10:09:10 -06:00
|
|
|
$(MISC)$/$(SHL$(TNR)VERSIONOBJ:b).c : $(SOLARENV)$/src$/version.c $(INCCOM)$/$(SHL$(TNR)VERSIONOBJ:b).h
|
2007-01-25 05:57:00 -06:00
|
|
|
# $(COPY) $(SOLARENV)$/src$/version.c $@
|
|
|
|
$(TYPE) $(SOLARENV)$/src$/version.c | $(SED) s/_version.h/$(SHL$(TNR)VERSIONOBJ:b).h/ > $@
|
2001-10-30 06:08:27 -06:00
|
|
|
|
2005-12-14 08:37:49 -06:00
|
|
|
.INIT : $(SHL$(TNR)VERSIONOBJDEP)
|
2001-01-17 11:56:16 -06:00
|
|
|
.ENDIF # "$(VERSIONOBJ)"!=""
|
2000-12-21 13:06:32 -06:00
|
|
|
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(GUI)" != "UNX"
|
2008-07-22 10:51:45 -05:00
|
|
|
.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
|
2006-06-29 05:21:03 -05:00
|
|
|
.IF "$(SHL$(TNR)IMPLIB)" == ""
|
|
|
|
SHL$(TNR)IMPLIB=i$(TARGET)_t$(TNR)
|
|
|
|
.ENDIF # "$(SHL$(TNR)IMPLIB)" == ""
|
2007-03-26 09:27:57 -05:00
|
|
|
.IF "$(COM)" != "GCC"
|
2000-09-20 08:43:26 -05:00
|
|
|
USE_$(TNR)IMPLIB=-implib:$(LB)$/$(SHL$(TNR)IMPLIB).lib
|
2007-03-26 09:27:57 -05:00
|
|
|
.ENDIF # "$(COM)" != "GCC"
|
2006-06-29 05:21:03 -05:00
|
|
|
SHL$(TNR)IMPLIBN=$(LB)$/$(SHL$(TNR)IMPLIB).lib
|
2006-10-05 06:38:56 -05:00
|
|
|
ALLTAR : $(SHL$(TNR)IMPLIBN)
|
2000-09-20 08:43:26 -05:00
|
|
|
|
|
|
|
.IF "$(USE_DEFFILE)"==""
|
|
|
|
USE_$(TNR)IMPLIB_DEPS=$(LB)$/$(SHL$(TNR)IMPLIB).lib
|
|
|
|
.ENDIF # "$(USE_DEFFILE)"==""
|
2008-07-22 10:51:45 -05:00
|
|
|
.ENDIF # "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
|
2000-09-20 08:43:26 -05:00
|
|
|
USE_SHL$(TNR)DEF=$(SHL$(TNR)DEF)
|
|
|
|
.ELSE # "$(GUI)" != "UNX"
|
|
|
|
USE_SHL$(TNR)DEF=
|
|
|
|
SHL$(TNR)DEPN+:=$(SHL$(TNR)DEPNU)
|
|
|
|
|
2002-01-16 07:56:35 -06:00
|
|
|
.IF "$(SHL$(TNR)VERSIONMAP)"==""
|
2000-09-20 08:43:26 -05:00
|
|
|
# to activate vmaps remove "#"
|
2002-01-08 07:12:09 -06:00
|
|
|
USE_SHL$(TNR)VERSIONMAP=$(MISC)$/$(SHL$(TNR)TARGET).vmap
|
2002-01-16 07:56:35 -06:00
|
|
|
.ENDIF # "$(SHL$(TNR)VERSIONMAP)"==""
|
2000-09-20 08:43:26 -05:00
|
|
|
|
|
|
|
.IF "$(USE_SHL$(TNR)VERSIONMAP)"!=""
|
|
|
|
|
2002-01-08 07:12:09 -06:00
|
|
|
.IF "$(SHL$(TNR)FILTERFILE)"!=""
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(SHL$(TNR)VERSIONMAP)"!=""
|
|
|
|
#eine von beiden ist zuviel
|
|
|
|
USE_SHL$(TNR)VERSIONMAP=$(MISC)$/$(SHL$(TNR)TARGET).vmap
|
2007-06-27 08:02:59 -05:00
|
|
|
$(USE_SHL$(TNR)VERSIONMAP) .PHONY:
|
2006-10-05 06:38:56 -05:00
|
|
|
@echo -----------------------------
|
|
|
|
@echo you should only use versionmap OR exportfile
|
|
|
|
@echo -----------------------------
|
2000-09-20 08:43:26 -05:00
|
|
|
# force_dmake_to_error
|
|
|
|
|
|
|
|
.ENDIF # "$(SHL$(TNR)VERSIONMAP)"!=""
|
|
|
|
|
2001-07-13 12:30:26 -05:00
|
|
|
.IF "$(OS)"!="IRIX"
|
2000-09-20 08:43:26 -05:00
|
|
|
SHL$(TNR)VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL$(TNR)VERSIONMAP)
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
$(USE_SHL$(TNR)VERSIONMAP): \
|
|
|
|
$(SHL$(TNR)OBJS)\
|
|
|
|
$(SHL$(TNR)LIBS)\
|
2002-01-08 07:12:09 -06:00
|
|
|
$(SHL$(TNR)FILTERFILE)
|
2007-01-25 05:57:00 -06:00
|
|
|
@$(RM) $@.dump
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(SHL$(TNR)OBJS)"!=""
|
|
|
|
# dump remaining objects on the fly
|
2000-10-11 14:40:12 -05:00
|
|
|
.IF "$(OS)"=="MACOSX"
|
2007-01-25 05:57:00 -06:00
|
|
|
@-nm $(SHL$(TNR)OBJS:s/.obj/.o/) > $@.dump
|
2000-10-11 14:40:12 -05:00
|
|
|
.ELSE
|
2007-01-25 05:57:00 -06:00
|
|
|
@nm $(SHL$(TNR)OBJS:s/.obj/.o/) > $@.dump
|
2000-10-11 14:40:12 -05:00
|
|
|
.ENDIF
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)OBJS)!"=""
|
2007-01-25 05:57:00 -06:00
|
|
|
@$(TYPE) /dev/null $(SHL$(TNR)LIBS:s/.lib/.dump/) >> $@.dump
|
|
|
|
$(PERL) $(SOLARENV)$/bin$/mapgen.pl -d $@.dump -s $(SHL$(TNR)INTERFACE) -f $(SHL$(TNR)FILTERFILE) -m $@
|
2000-09-20 08:43:26 -05:00
|
|
|
|
2002-01-08 07:12:09 -06:00
|
|
|
.ELSE # "$(SHL$(TNR)FILTERFILE)"!=""
|
2000-09-20 08:43:26 -05:00
|
|
|
USE_SHL$(TNR)VERSIONMAP=$(MISC)$/$(SHL$(TNR)TARGET).vmap
|
2007-06-27 08:02:59 -05:00
|
|
|
$(USE_SHL$(TNR)VERSIONMAP) :
|
2006-10-05 06:38:56 -05:00
|
|
|
@echo -----------------------------
|
|
|
|
@echo SHL$(TNR)FILTERFILE not set!
|
|
|
|
@echo -----------------------------
|
2002-01-24 05:30:25 -06:00
|
|
|
@$(TOUCH) $@
|
2006-10-05 06:38:56 -05:00
|
|
|
@echo dummy file to keep the dependencies for later use.
|
2000-09-20 08:43:26 -05:00
|
|
|
# force_dmake_to_error
|
2002-01-08 07:12:09 -06:00
|
|
|
.ENDIF # "$(SHL$(TNR)FILTERFILE)"!=""
|
2001-01-22 09:54:05 -06:00
|
|
|
.ELSE # "$(USE_SHL$(TNR)VERSIONMAP)"!=""
|
|
|
|
|
|
|
|
#and now for the plain non-generic way...
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(SHL$(TNR)VERSIONMAP)"!=""
|
2001-10-25 10:17:43 -05:00
|
|
|
USE_SHL$(TNR)VERSIONMAP=$(MISC)$/$(SHL$(TNR)VERSIONMAP:b)_$(SHL$(TNR)TARGET)$(SHL$(TNR)VERSIONMAP:e)
|
2001-07-13 12:30:26 -05:00
|
|
|
.IF "$(OS)"!="IRIX"
|
2000-09-20 08:43:26 -05:00
|
|
|
SHL$(TNR)VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL$(TNR)VERSIONMAP)
|
|
|
|
.ENDIF
|
|
|
|
|
2007-04-26 07:57:33 -05:00
|
|
|
.IF "$(OS)"=="MACOSX"
|
|
|
|
$(USE_SHL$(TNR)VERSIONMAP): $(SHL$(TNR)OBJS) $(SHL$(TNR)LIBS)
|
|
|
|
.ENDIF
|
|
|
|
|
2000-09-20 08:43:26 -05:00
|
|
|
$(USE_SHL$(TNR)VERSIONMAP): $(SHL$(TNR)VERSIONMAP)
|
2007-02-06 07:01:28 -06:00
|
|
|
@@-$(RM) -f $@
|
2007-01-31 01:59:13 -06:00
|
|
|
# The following files will only be generated and needed on Mac OS X as temporary files
|
|
|
|
# in order to generate exported symbols list out of Linux/Solaris map files
|
|
|
|
.IF "$(OS)"=="MACOSX"
|
2007-03-09 02:06:22 -06:00
|
|
|
@-$(RM) -f $@.symregexp >& $(NULLDEV)
|
|
|
|
@-$(RM) -f $@.expsymlist >& $(NULLDEV)
|
2007-01-31 01:59:13 -06:00
|
|
|
.ENDIF
|
2007-06-27 08:02:59 -05:00
|
|
|
# Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
|
2007-01-31 01:59:13 -06:00
|
|
|
# happens if somebody will change it in the future
|
2001-10-31 06:10:14 -06:00
|
|
|
.IF "$(COMID)"=="gcc3"
|
2007-01-25 05:57:00 -06:00
|
|
|
tr -d "\015" < $(SHL$(TNR)VERSIONMAP) | $(AWK) -f $(SOLARENV)$/bin$/addsym.awk > $@
|
2008-06-16 08:18:13 -05:00
|
|
|
.ELIF "$(COMNAME)"=="sunpro5"
|
|
|
|
tr -d "\015" < $(SHL$(TNR)VERSIONMAP) | $(GREP) -v $(IGNORE_SYMBOLS) > $@
|
2001-10-31 06:10:14 -06:00
|
|
|
.ELSE # "$(COMID)"=="gcc3"
|
2007-01-25 05:57:00 -06:00
|
|
|
tr -d "\015" < $(SHL$(TNR)VERSIONMAP) > $@
|
2001-10-31 06:10:14 -06:00
|
|
|
.ENDIF # "$(COMID)"=="gcc3"
|
2007-01-25 05:57:00 -06:00
|
|
|
@chmod a+w $@
|
2007-01-31 01:59:13 -06:00
|
|
|
# Mac OS X post-processing generate an exported symbols list from the generated map file
|
|
|
|
# for details on exported symbols list see man ld on Mac OS X
|
|
|
|
.IF "$(OS)"=="MACOSX"
|
2007-03-09 02:06:22 -06:00
|
|
|
-cat $@ | $(AWK) -f $(SOLARENV)$/bin$/unxmap-to-macosx-explist.awk | grep -v "\*\|?" > $@.exported-symbols
|
|
|
|
-cat $@ | $(AWK) -f $(SOLARENV)$/bin$/unxmap-to-macosx-explist.awk | grep "\*\|?" > $@.symbols-regexp
|
2007-01-31 01:59:13 -06:00
|
|
|
# Shared libraries will be build out of the *.obj files specified in SHL?OBJS and SHL?LIBS
|
|
|
|
# Extract RTTI symbols from all the objects that will be used to build a shared library
|
|
|
|
.IF "$(SHL$(TNR)OBJS)"!=""
|
2008-03-18 07:09:26 -05:00
|
|
|
-echo $(foreach,i,$(SHL$(TNR)OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)$/bin$/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
|
2007-01-31 01:59:13 -06:00
|
|
|
.ENDIF
|
2007-06-27 08:02:59 -05:00
|
|
|
.IF "$(SHL$(TNR)LIBS)"!=""
|
2008-03-18 07:09:26 -05:00
|
|
|
-$(TYPE) $(foreach,j,$(SHL$(TNR)LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)$/bin$/addsym-macosx.sh $@.symbols-regexp $@.symbols-regexp.tmp >> $@.exported-symbols
|
2007-01-31 01:59:13 -06:00
|
|
|
.ENDIF
|
2007-06-27 08:02:59 -05:00
|
|
|
# overwrite the map file generate into the local output tree with the generated
|
2007-01-31 01:59:13 -06:00
|
|
|
# exported symbols list
|
2007-06-27 08:02:59 -05:00
|
|
|
cp $@.exported-symbols $@
|
2007-01-31 01:59:13 -06:00
|
|
|
.ENDIF # .IF "$(OS)"=="MACOSX"
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)VERSIONMAP)"!=""
|
2001-01-22 09:54:05 -06:00
|
|
|
.ENDIF # "$(USE_SHL$(TNR)VERSIONMAP)"!=""
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(GUI)" != "UNX"
|
|
|
|
|
2001-04-26 05:18:43 -05:00
|
|
|
.IF "$(UNIXVERSIONNAMES)"!=""
|
|
|
|
.IF "$(OS)"!="MACOSX"
|
|
|
|
.IF "$(GUI)"=="UNX"
|
2002-01-02 04:23:22 -06:00
|
|
|
.IF "$(OS)"=="IRIX"
|
2004-11-03 01:58:14 -06:00
|
|
|
SHL$(TNR)SONAME=$(SONAME_SWITCH)$(SHL$(TNR)TARGETN:f)
|
2002-01-02 04:23:22 -06:00
|
|
|
.ELSE
|
2004-11-03 01:58:14 -06:00
|
|
|
SHL$(TNR)SONAME=\"$(SONAME_SWITCH)$(SHL$(TNR)TARGETN:f)\"
|
2002-01-02 04:23:22 -06:00
|
|
|
.ENDIF
|
2001-04-26 05:18:43 -05:00
|
|
|
.ENDIF # "$(GUI)"!="UNX"
|
|
|
|
.ENDIF # "$(OS)"!="MACOSX"
|
|
|
|
.ENDIF # "$(UNIXVERSIONNAMES)"!=""
|
|
|
|
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(SHL$(TNR)RES)"!=""
|
|
|
|
SHL$(TNR)ALLRES+=$(SHL$(TNR)RES)
|
2004-04-08 09:09:55 -05:00
|
|
|
SHL$(TNR)LINKRES*=$(MISC)$/$(SHL$(TNR)TARGET).res
|
2007-03-26 09:27:57 -05:00
|
|
|
SHL$(TNR)LINKRESO*=$(MISC)$/$(SHL$(TNR)TARGET)_res.o
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)RES)"!=""
|
|
|
|
|
|
|
|
.IF "$(SHL$(TNR)DEFAULTRES)$(use_shl_versions)"!=""
|
|
|
|
SHL$(TNR)DEFAULTRES*=$(MISC)$/$(SHL$(TNR)TARGET)_def.res
|
|
|
|
SHL$(TNR)ALLRES+=$(SHL$(TNR)DEFAULTRES)
|
2004-04-08 09:09:55 -05:00
|
|
|
SHL$(TNR)LINKRES*=$(MISC)$/$(SHL$(TNR)TARGET).res
|
2007-03-26 09:27:57 -05:00
|
|
|
SHL$(TNR)LINKRESO*=$(MISC)$/$(SHL$(TNR)TARGET)_res.o
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)DEFAULTRES)$(use_shl_versions)"!=""
|
|
|
|
|
2001-10-30 06:08:27 -06:00
|
|
|
#.IF "$(SHL$(TNR)TARGETN)"!=""
|
2001-09-28 11:11:33 -05:00
|
|
|
|
|
|
|
.IF "$(linkinc)"!=""
|
2008-07-22 10:51:45 -05:00
|
|
|
.IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
|
2008-03-25 08:22:06 -05:00
|
|
|
.IF "$(SHL$(TNR)LIBS)"!=""
|
2001-10-23 09:15:43 -05:00
|
|
|
$(MISC)$/$(SHL$(TNR)TARGET)_linkinc.ls .PHONY:
|
2007-02-06 07:01:28 -06:00
|
|
|
@@-$(RM) $@
|
2008-04-02 08:22:19 -05:00
|
|
|
$(SED) -f $(SOLARENV)$/bin$/chrel.sed $(foreach,i,$(SHL$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@
|
2008-03-25 08:22:06 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)LIBS)"!=""
|
2001-10-23 09:15:43 -05:00
|
|
|
.ENDIF
|
|
|
|
|
2001-09-28 11:11:33 -05:00
|
|
|
LINKINCTARGETS+=$(MISC)$/$(SHL$(TNR)TARGETN:b)_linkinc.ls
|
|
|
|
$(SHL$(TNR)TARGETN) : $(LINKINCTARGETS)
|
2001-10-23 09:15:43 -05:00
|
|
|
|
|
|
|
.ELSE
|
2004-08-23 03:18:27 -05:00
|
|
|
.IF "$(SHL$(TNR)USE_EXPORTS)"=="name"
|
2008-07-22 10:51:45 -05:00
|
|
|
.IF "$(GUI)"=="WNT" || "$(GUI)" == "OS2"
|
2008-06-06 10:55:56 -05:00
|
|
|
.IF "$(COM)"!="GCC"
|
2008-03-25 08:22:06 -05:00
|
|
|
.IF "$(SHL$(TNR)LIBS)"!=""
|
2004-08-23 03:18:27 -05:00
|
|
|
SHL$(TNR)LINKLIST=$(MISC)$/$(SHL$(TNR)TARGET)_link.lst
|
2008-03-25 08:22:06 -05:00
|
|
|
SHL$(TNR)LINKLISTPARAM=@$(SHL$(TNR)LINKLIST)
|
|
|
|
$(SHL$(TNR)LINKLIST) : $(SHL$(TNR)LIBS)
|
2007-02-06 07:01:28 -06:00
|
|
|
@@-$(RM) $@
|
2008-04-02 08:22:19 -05:00
|
|
|
$(SED) -f $(SOLARENV)$/bin$/chrel.sed $(foreach,i,$(SHL$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@
|
2008-03-25 08:22:06 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)LIBS)"!=""
|
2008-06-06 10:55:56 -05:00
|
|
|
.ENDIF # "$(COM)"!="GCC"
|
2004-08-23 03:18:27 -05:00
|
|
|
.ENDIF
|
|
|
|
.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"=="name"
|
|
|
|
|
2001-10-23 09:15:43 -05:00
|
|
|
$(MISC)$/%linkinc.ls:
|
|
|
|
echo . > $@
|
2001-09-28 11:11:33 -05:00
|
|
|
.ENDIF # "$(linkinc)"!=""
|
|
|
|
|
2008-07-22 10:51:45 -05:00
|
|
|
.IF "$(GUI)" == "OS2"
|
|
|
|
#21/02/2006 YD dll names must be 8.3, invoke fix script
|
|
|
|
#check osl/os2/module.c/osl_loadModule()
|
|
|
|
SHL$(TNR)TARGET8=$(shell @fix_shl $(SHL$(TNR)TARGET))
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
.IF "$(GUI)" == "OS2"
|
|
|
|
_SHL$(TNR)IMP_ORD = $(SHL$(TNR)STDLIBS:^"$(SOLARVERSION)$/$(INPATH)$/lib$/") $(SHL$(TNR)STDLIBS:^"$(LB)$/")
|
|
|
|
SHL$(TNR)IMP_ORD = $(foreach,i,$(_SHL$(TNR)IMP_ORD) $(shell @-ls $i))
|
|
|
|
.ELSE
|
|
|
|
SHL$(TNR)IMP_ORD =
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
|
2000-09-20 08:43:26 -05:00
|
|
|
$(SHL$(TNR)TARGETN) : \
|
|
|
|
$(SHL$(TNR)OBJS)\
|
|
|
|
$(SHL$(TNR)LIBS)\
|
|
|
|
$(USE_$(TNR)IMPLIB_DEPS)\
|
|
|
|
$(USE_SHL$(TNR)DEF)\
|
|
|
|
$(USE_SHL$(TNR)VERSIONMAP)\
|
|
|
|
$(SHL$(TNR)RES)\
|
2004-08-23 03:18:27 -05:00
|
|
|
$(SHL$(TNR)DEPN) \
|
2008-07-22 10:51:45 -05:00
|
|
|
$(SHL$(TNR)IMP_ORD) \
|
2006-09-25 07:09:50 -05:00
|
|
|
$(SHL$(TNR)LINKLIST)
|
2000-09-20 08:43:26 -05:00
|
|
|
@echo ------------------------------
|
|
|
|
@echo Making: $(SHL$(TNR)TARGETN)
|
|
|
|
.IF "$(GUI)" == "WNT"
|
|
|
|
.IF "$(SHL$(TNR)DEFAULTRES)"!=""
|
2007-02-06 07:01:28 -06:00
|
|
|
@@-$(RM) $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(SHL$(TNR)ICON)" != ""
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo 1 ICON $(SHL$(TNR)ICON) >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF
|
|
|
|
.IF "$(use_shl_versions)" != ""
|
2004-08-20 04:09:53 -05:00
|
|
|
.IF "$(SHL$(TNR)ADD_VERINFO)"!=""
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo $(EMQ)#include $(EMQ)"$(SHL$(TNR)ADD_VERINFO)$(EMQ)" >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
2004-08-20 04:09:53 -05:00
|
|
|
.ELSE # "$(SHL$(TNR)ADD_VERINFO)"!=""
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
@echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
2007-06-27 08:02:59 -05:00
|
|
|
@echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
2004-08-20 04:09:53 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)ADD_VERINFO)"!=""
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo $(EMQ)#define VERVARIANT $(BUILD) >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
@echo $(EMQ)#define ORG_NAME $(SHL$(TNR)TARGET)$(DLLPOST) >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
@echo $(EMQ)#define INTERNAL_NAME $(SHL$(TNR)TARGET:b) >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
@echo $(EMQ)#include $(EMQ)"shlinfo.rc$(EMQ)" >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(use_shl_versions)" != ""
|
2007-02-06 07:01:28 -06:00
|
|
|
$(RC) -DWIN32 $(INCLUDE) $(RCLINKFLAGS) $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)DEFAULTRES)"!=""
|
|
|
|
.IF "$(SHL$(TNR)ALLRES)"!=""
|
2002-04-03 10:10:37 -06:00
|
|
|
.IF "$(USE_SHELL)"=="4nt"
|
2007-01-25 05:57:00 -06:00
|
|
|
$(COPY) /b $(SHL$(TNR)ALLRES:s/res /res+/) $(SHL$(TNR)LINKRES)
|
2002-04-03 10:10:37 -06:00
|
|
|
.ELSE # "$(USE_SHELL)"=="4nt"
|
2007-01-25 05:57:00 -06:00
|
|
|
$(TYPE) $(SHL$(TNR)ALLRES) > $(SHL$(TNR)LINKRES)
|
2007-03-26 09:27:57 -05:00
|
|
|
.IF "$(COM)"=="GCC"
|
|
|
|
windres $(SHL$(TNR)LINKRES) $(SHL$(TNR)LINKRESO)
|
|
|
|
.ENDIF # "$(COM)"=="GCC"
|
2002-04-03 10:10:37 -06:00
|
|
|
.ENDIF # "$(USE_SHELL)"=="4nt"
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)ALLRES)"!=""
|
2007-09-06 07:40:25 -05:00
|
|
|
.IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
|
|
|
|
@echo dlltool --input-def $(SHL$(TNR)DEF) \
|
|
|
|
--dllname $(SHL$(TNR)TARGET)$(DLLPOST) \
|
2009-08-26 01:36:38 -05:00
|
|
|
--kill-at \\ > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
|
|
|
.IF "$(DEFLIB$(TNR)NAME)"!="" # do not have to include objs
|
|
|
|
@echo --output-exp $(MISC)$/$(@:b)_exp.o >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2007-09-06 07:40:25 -05:00
|
|
|
.ELSE # "$(DEFLIB$(TNR)NAME)"!="" # do not have to include objs
|
2009-08-26 01:36:38 -05:00
|
|
|
@echo --output-exp $(MISC)$/$(@:b)_exp.o \
|
2007-09-06 07:40:25 -05:00
|
|
|
$(STDOBJ) $(SHL$(TNR)OBJS) $(SHL$(TNR)LINKRESO) \
|
2009-08-26 01:36:38 -05:00
|
|
|
`$(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2007-09-06 07:40:25 -05:00
|
|
|
.ENDIF # "$(DEFLIB$(TNR)NAME)"!=""
|
2009-08-26 01:36:38 -05:00
|
|
|
@echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) $(MINGWSSTDOBJ) -o $@ \
|
2007-09-06 07:40:25 -05:00
|
|
|
$(STDOBJ) $(SHL$(TNR)VERSIONOBJ) $(SHL$(TNR)DESCRIPTIONOBJ) $(SHL$(TNR)OBJS) $(SHL$(TNR)LINKRESO) \
|
2007-06-28 05:31:51 -05:00
|
|
|
`$(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
|
2009-08-26 01:36:38 -05:00
|
|
|
-Wl,--exclude-libs,ALL,--start-group $(SHL$(TNR)STDLIBS) -Wl,--end-group \
|
|
|
|
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) $(MISC)$/$(@:b)_exp.o $(MINGWSSTDENDOBJ) \
|
2007-09-06 07:40:25 -05:00
|
|
|
-Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
|
|
|
@$(TYPE) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
|
|
|
@+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2007-03-26 09:27:57 -05:00
|
|
|
.ELSE
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(linkinc)"==""
|
2004-08-23 03:18:27 -05:00
|
|
|
.IF "$(SHL$(TNR)USE_EXPORTS)"!="name"
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(USE_DEFFILE)"!=""
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)LINKER) @$(mktmp \
|
|
|
|
$(SHL$(TNR)LINKFLAGS) \
|
2000-09-20 08:43:26 -05:00
|
|
|
$(LINKFLAGSSHL) \
|
|
|
|
$(SHL$(TNR)STACK) $(SHL$(TNR)BASEX) \
|
|
|
|
-out:$@ \
|
|
|
|
-map:$(MISC)$/$(@:b).map \
|
|
|
|
-def:$(SHL$(TNR)DEF) \
|
|
|
|
$(USE_$(TNR)IMPLIB) \
|
|
|
|
$(STDOBJ) \
|
2007-06-26 11:34:20 -05:00
|
|
|
$(SHL$(TNR)VERSIONOBJ) $(SHL$(TNR)OBJS) \
|
2000-09-20 08:43:26 -05:00
|
|
|
$(SHL$(TNR)LIBS) \
|
|
|
|
$(SHL$(TNR)STDLIBS) \
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
|
2004-04-08 09:09:55 -05:00
|
|
|
$(SHL$(TNR)LINKRES) \
|
2004-08-23 03:18:27 -05:00
|
|
|
) $(LINKOUTPUTFILTER)
|
2007-02-06 07:01:28 -06:00
|
|
|
# double check if target was really written... still making sense?
|
|
|
|
@@$(LS) $@
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo linking $@.manifest ...
|
2007-06-27 08:02:59 -05:00
|
|
|
.IF "$(VISTA_MANIFEST)"!=""
|
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)$/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
|
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
|
|
|
|
.ELSE
|
2007-01-25 05:57:00 -06:00
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
|
2007-06-27 08:02:59 -05:00
|
|
|
.ENDIF # "$(VISTA_MANIFEST)"!=""
|
2007-01-26 03:59:05 -06:00
|
|
|
$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
|
2007-06-27 08:02:59 -05:00
|
|
|
$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
|
2000-09-20 08:43:26 -05:00
|
|
|
.ELSE # "$(USE_DEFFILE)"!=""
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)LINKER) @$(mktmp $(SHL$(TNR)LINKFLAGS) \
|
2000-09-20 08:43:26 -05:00
|
|
|
$(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \
|
|
|
|
$(SHL$(TNR)STACK) -out:$(SHL$(TNR)TARGETN) \
|
|
|
|
-map:$(MISC)$/$(@:B).map \
|
|
|
|
$(LB)$/$(SHL$(TNR)IMPLIB).exp \
|
|
|
|
$(STDOBJ) \
|
2007-06-26 11:34:20 -05:00
|
|
|
$(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ) \
|
2000-09-20 08:43:26 -05:00
|
|
|
$(SHL$(TNR)LIBS) \
|
|
|
|
$(SHL$(TNR)STDLIBS) \
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
|
2004-04-08 09:09:55 -05:00
|
|
|
$(SHL$(TNR)LINKRES) \
|
2004-08-23 03:18:27 -05:00
|
|
|
) $(LINKOUTPUTFILTER)
|
2007-02-06 07:01:28 -06:00
|
|
|
# double check if target was really written... still making sense?
|
|
|
|
@@$(LS) $@
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo linking $@.manifest ...
|
2007-06-27 08:02:59 -05:00
|
|
|
.IF "$(VISTA_MANIFEST)"!=""
|
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)$/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
|
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
|
|
|
|
.ELSE
|
2007-01-25 05:57:00 -06:00
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
|
2007-06-27 08:02:59 -05:00
|
|
|
.ENDIF # "$(VISTA_MANIFEST)"!=""
|
2007-01-26 03:59:05 -06:00
|
|
|
$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
|
2007-06-27 08:02:59 -05:00
|
|
|
$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(USE_DEFFILE)"!=""
|
2004-08-23 03:18:27 -05:00
|
|
|
.ELSE # "$(SHL$(TNR)USE_EXPORTS)"!="name"
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)LINKER) @$(mktmp $(SHL$(TNR)LINKFLAGS) \
|
2004-08-23 03:18:27 -05:00
|
|
|
$(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \
|
|
|
|
$(SHL$(TNR)STACK) -out:$(SHL$(TNR)TARGETN) \
|
|
|
|
-map:$(MISC)$/$(@:B).map \
|
|
|
|
$(USE_$(TNR)IMPLIB) \
|
|
|
|
$(STDOBJ) \
|
2007-06-26 11:34:20 -05:00
|
|
|
$(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ)) \
|
2008-03-25 08:22:06 -05:00
|
|
|
$(SHL$(TNR)LINKLISTPARAM) \
|
2004-08-23 03:18:27 -05:00
|
|
|
@$(mktmp $(SHL$(TNR)STDLIBS) \
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
|
2004-08-23 03:18:27 -05:00
|
|
|
$(SHL$(TNR)LINKRES) \
|
|
|
|
)
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo linking $@.manifest ...
|
2007-06-27 08:02:59 -05:00
|
|
|
.IF "$(VISTA_MANIFEST)"!=""
|
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)$/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
|
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
|
|
|
|
.ELSE
|
2007-01-25 05:57:00 -06:00
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
|
2007-06-27 08:02:59 -05:00
|
|
|
.ENDIF # "$(VISTA_MANIFEST)"!=""
|
2007-01-26 03:59:05 -06:00
|
|
|
$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
|
2007-06-27 08:02:59 -05:00
|
|
|
$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
|
2004-08-23 03:18:27 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"!="name"
|
2000-09-20 08:43:26 -05:00
|
|
|
.ELSE # "$(linkinc)"==""
|
2007-01-25 05:57:00 -06:00
|
|
|
-$(RM) del $(MISC)$/$(SHL$(TNR)TARGET).lnk
|
|
|
|
-$(RM) $(MISC)$/$(SHL$(TNR)TARGET).lst
|
|
|
|
$(TYPE) $(mktmp \
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)LINKFLAGS) \
|
2000-09-20 08:43:26 -05:00
|
|
|
$(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \
|
|
|
|
$(SHL$(TNR)STACK) $(MAPFILE) \
|
|
|
|
-out:$@ \
|
|
|
|
$(LB)$/$(SHL$(TNR)IMPLIB).exp \
|
|
|
|
$(STDOBJ) \
|
|
|
|
$(SHL$(TNR)OBJS) \
|
|
|
|
$(SHL$(TNR)STDLIBS) \
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
|
2004-04-08 09:09:55 -05:00
|
|
|
$(SHL$(TNR)LINKRES) \
|
2000-09-20 08:43:26 -05:00
|
|
|
) >> $(MISC)$/$(SHL$(TNR)TARGET).lnk
|
2007-01-25 05:57:00 -06:00
|
|
|
$(TYPE) $(MISC)$/$(SHL$(TNR)TARGETN:b)_linkinc.ls >> $(MISC)$/$(SHL$(TNR)TARGET).lnk
|
2005-03-15 02:56:48 -06:00
|
|
|
$(SHL$(TNR)LINKER) @$(MISC)$/$(SHL$(TNR)TARGET).lnk
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo linking $@.manifest ...
|
2007-06-27 08:02:59 -05:00
|
|
|
.IF "$(VISTA_MANIFEST)"!=""
|
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -manifest $(TRUSTED_MANIFEST_LOCATION)$/trustedinfo.manifest -out:$@.tmanifest$(EMQ) $(FI)
|
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.tmanifest -outputresource:$@$(EMQ);2 $(FI)
|
|
|
|
.ELSE
|
2007-01-25 05:57:00 -06:00
|
|
|
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
|
2007-06-27 08:02:59 -05:00
|
|
|
.ENDIF # "$(VISTA_MANIFEST)"!=""
|
2007-01-26 03:59:05 -06:00
|
|
|
$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
|
2007-06-27 08:02:59 -05:00
|
|
|
$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(linkinc)"==""
|
2007-03-26 09:27:57 -05:00
|
|
|
.ENDIF # "$(COM)"=="GCC"
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(GUI)" == "WNT"
|
|
|
|
.IF "$(GUI)"=="UNX"
|
2001-03-06 12:20:33 -06:00
|
|
|
.IF "$(OS)"=="MACOSX"
|
2007-01-25 05:57:00 -06:00
|
|
|
@-$(RM) $(MISC)$/$(@:b).list
|
|
|
|
@-$(RM) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2006-10-05 06:38:56 -05:00
|
|
|
@echo $(STDSLO) $(SHL$(TNR)OBJS:s/.obj/.o/) \
|
2007-06-26 11:34:20 -05:00
|
|
|
$(SHL$(TNR)VERSIONOBJ) \
|
2001-03-06 12:20:33 -06:00
|
|
|
`cat /dev/null $(SHL$(TNR)LIBS) | sed s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)$/$(@:b).list
|
2008-03-18 07:09:26 -05:00
|
|
|
@echo -n $(SHL$(TNR)LINKER) $(SHL$(TNR)LINKFLAGS) $(SHL$(TNR)VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)$/$(ROUT)$/lib $(SOLARLIB) -o $@ \
|
2007-01-22 23:34:35 -06:00
|
|
|
$(SHL$(TNR)STDLIBS) $(SHL$(TNR)ARCHIVES) $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) -filelist $(MISC)$/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2008-03-18 07:09:26 -05:00
|
|
|
@$(PERL) $(SOLARENV)$/bin$/macosx-dylib-link-list.pl \
|
|
|
|
`cat $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd` \
|
|
|
|
>> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2007-01-22 23:34:35 -06:00
|
|
|
@cat $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
|
|
|
@+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2008-03-18 07:09:26 -05:00
|
|
|
@$(PERL) $(SOLARENV)$/bin$/macosx-change-install-names.pl \
|
|
|
|
shl $(SHL$(TNR)RPATH) $@
|
2002-08-16 05:27:02 -05:00
|
|
|
@echo "Making: $@.jnilib"
|
2006-04-20 08:14:24 -05:00
|
|
|
@macosx-create-bundle $@
|
2000-09-20 08:43:26 -05:00
|
|
|
.IF "$(UPDATER)"=="YES"
|
2001-06-19 08:41:53 -05:00
|
|
|
.IF "$(SHL$(TNR)NOCHECK)"==""
|
2009-04-23 10:52:08 -05:00
|
|
|
$(SOLARENV)$/bin$/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS$(TNR)) $(SHL$(TNR)TARGETN)
|
2001-06-19 08:41:53 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)NOCHECK)"!=""
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF
|
2001-03-06 12:20:33 -06:00
|
|
|
.ELSE # "$(OS)"=="MACOSX"
|
2007-01-25 05:57:00 -06:00
|
|
|
@-$(RM) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2006-10-05 06:38:56 -05:00
|
|
|
@echo $(SHL$(TNR)LINKER) $(SHL$(TNR)LINKFLAGS) $(SHL$(TNR)SONAME) $(LINKFLAGSSHL) $(SHL$(TNR)VERSIONMAPPARA) -L$(PRJ)$/$(ROUT)$/lib $(SOLARLIB) $(STDSLO) $(SHL$(TNR)OBJS:s/.obj/.o/) \
|
2007-06-26 11:34:20 -05:00
|
|
|
$(SHL$(TNR)VERSIONOBJ) -o $@ \
|
2005-03-18 03:21:38 -06:00
|
|
|
`cat /dev/null $(SHL$(TNR)LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
|
2007-01-22 23:34:35 -06:00
|
|
|
$(SHL$(TNR)STDLIBS) $(SHL$(TNR)ARCHIVES) $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) $(LINKOUTPUT_FILTER) > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
|
|
|
@cat $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
|
|
|
@+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
|
2001-03-06 12:20:33 -06:00
|
|
|
.IF "$(UPDATER)"=="YES"
|
2001-06-19 08:41:53 -05:00
|
|
|
.IF "$(SHL$(TNR)NOCHECK)"==""
|
2007-01-25 05:57:00 -06:00
|
|
|
-$(RM) $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f)
|
|
|
|
$(RENAME) $(SHL$(TNR)TARGETN) $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f)
|
2009-04-23 10:52:08 -05:00
|
|
|
$(SOLARENV)$/bin$/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS$(TNR)) $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f)
|
2001-06-19 08:41:53 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)NOCHECK)"!=""
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(UPDATER)"=="YES"
|
2002-08-16 05:27:02 -05:00
|
|
|
.ENDIF # "$(OS)"=="MACOSX"
|
2001-04-26 05:18:43 -05:00
|
|
|
.IF "$(UNIXVERSIONNAMES)"!=""
|
2007-01-25 05:57:00 -06:00
|
|
|
$(RM) $(LB)$/$(SHL$(TNR)TARGETN:b)
|
|
|
|
cd $(LB) && ln -s $(SHL$(TNR)TARGETN:f) $(SHL$(TNR)TARGETN:b)
|
2001-04-26 05:18:43 -05:00
|
|
|
.ENDIF # "$(UNIXVERSIONNAMES)"!=""
|
2001-05-09 04:48:28 -05:00
|
|
|
@ls -l $@
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(GUI)" == "UNX"
|
2002-02-08 08:18:05 -06:00
|
|
|
|
2008-07-22 10:51:45 -05:00
|
|
|
.IF "$(GUI)" == "OS2"
|
|
|
|
|
|
|
|
.IF "$(SHL$(TNR)DEFAULTRES)"!=""
|
|
|
|
@+-$(RM) $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc >& $(NULLDEV)
|
|
|
|
.IF "$(SHL$(TNR)ICON)" != ""
|
|
|
|
@-+echo 1 ICON $(SHL$(TNR)ICON) >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
.ENDIF
|
|
|
|
.IF "$(use_shl_versions)" != ""
|
|
|
|
.IF "$(SHL$(TNR)ADD_VERINFO)"!=""
|
|
|
|
@-+echo $(EMQ)#include $(EMQ)"$(SHL$(TNR)ADD_VERINFO)$(EMQ)" >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
.ENDIF # "$(SHL$(TNR)ADD_VERINFO)"!=""
|
|
|
|
@-+echo MENU 1 BEGIN END >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
# @-+echo $(EMQ)RCDATA 1 { "Build string here" }$(EMQ) >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
.ENDIF # "$(use_shl_versions)" != ""
|
|
|
|
# YD 04/07/06 seems null, confuses rc cli: -i $(SOLARTESDIR)
|
|
|
|
$(RC) -r -DOS2 $(INCLUDE) $(RCLINKFLAGS) $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
|
|
|
|
.ENDIF # "$(SHL$(TNR)DEFAULTRES)"!=""
|
|
|
|
|
|
|
|
.IF "$(SHL$(TNR)ALLRES)"!=""
|
|
|
|
.IF "$(USE_SHELL)"=="4nt"
|
|
|
|
+$(COPY) $(SHL$(TNR)ALLRES:s/res /res+/) $(SHL$(TNR)LINKRES)
|
|
|
|
.ELSE # "$(USE_SHELL)"=="4nt"
|
|
|
|
+$(TYPE) $(SHL$(TNR)ALLRES) > $(SHL$(TNR)LINKRES)
|
|
|
|
.ENDIF # "$(USE_SHELL)"=="4nt"
|
|
|
|
.ENDIF # "$(SHL$(TNR)ALLRES)"!=""
|
|
|
|
|
|
|
|
.IF "$(USE_DEFFILE)"!=""
|
|
|
|
|
|
|
|
$(SHL$(TNR)LINKER) $(SHL$(TNR)LINKFLAGS) $(LINKFLAGSSHL) -o $@ \
|
|
|
|
$(SHL$(TNR)DEF) \
|
|
|
|
$(STDOBJ) \
|
|
|
|
-L$(LB) \
|
|
|
|
-L$(SOLARVERSION)$/$(INPATH)$/lib \
|
|
|
|
$(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ) \
|
|
|
|
$(SHL$(TNR)LIBS) \
|
|
|
|
$(SHL$(TNR)STDLIBS:^"-l") \
|
|
|
|
$(SHL$(TNR)LINKRES) \
|
|
|
|
$(SHL$(TNR)STDSHL:^"-l") $(STDSHL$(TNR):^"-l")
|
|
|
|
|
|
|
|
.ELSE # "$(USE_DEFFILE)"!=""
|
|
|
|
|
|
|
|
$(SHL$(TNR)LINKER) -v $(SHL$(TNR)LINKFLAGS) \
|
|
|
|
$(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \
|
|
|
|
$(SHL$(TNR)STACK) -o $(SHL$(TNR)TARGETN) \
|
|
|
|
$(SHL$(TNR)DEF) \
|
|
|
|
$(STDOBJ) \
|
|
|
|
-L$(LB) \
|
|
|
|
-L$(SOLARVERSION)$/$(INPATH)$/lib \
|
|
|
|
$(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ) \
|
|
|
|
$(SHL$(TNR)LIBS) \
|
|
|
|
$(SHL$(TNR)STDLIBS:^"-l") \
|
|
|
|
$(SHL$(TNR)LINKRES) \
|
|
|
|
$(SHL$(TNR)STDSHL:^"-l") $(STDSHL$(TNR):^"-l") \
|
|
|
|
$(LINKOUTPUTFILTER)
|
|
|
|
@$(LS) $@ >& $(NULLDEV)
|
|
|
|
|
|
|
|
.ENDIF # "$(USE_DEFFILE)"!=""
|
|
|
|
|
|
|
|
.IF "$(SHL$(TNR)TARGET8)" != "$(SHL$(TNR)TARGET)"
|
|
|
|
+$(COPY) $@ $(@:d)$(SHL$(TNR)TARGET8).dll
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
.ENDIF # "$(GUI)" == "OS2"
|
|
|
|
|
|
|
|
|
2002-02-08 08:18:05 -06:00
|
|
|
.IF "$(TESTDIR)"!=""
|
|
|
|
.IF "$(NO_TESTS)"==""
|
|
|
|
|
|
|
|
ALLTAR : runtest_$(SHL$(TNR)TARGET)
|
|
|
|
|
|
|
|
runtest_$(SHL$(TNR)TARGET) : $(SHL$(TNR)TARGETN)
|
2002-09-30 05:04:46 -05:00
|
|
|
testshl $(SHL$(TNR)TARGETN) sce$/$(SHL$(TNR)TARGET).sce -msg -skip
|
2002-02-08 08:18:05 -06:00
|
|
|
.ENDIF # "$(NO_TESTS)"==""
|
|
|
|
.ENDIF # "$(TESTDIR)"!=""
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF # "$(SHL$(TNR)TARGETN)"!=""
|
|
|
|
|
|
|
|
# unroll end
|
|
|
|
#######################################################
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#######################################################
|
|
|
|
# Anweisungen fuer das Linken
|
|
|
|
# unroll begin
|
|
|
|
|
|
|
|
.IF "$(SHL$(TNR)IMPLIBN)" != ""
|
|
|
|
|
|
|
|
.IF "$(UPDATER)"=="YES"
|
2002-01-08 07:12:09 -06:00
|
|
|
USELIB$(TNR)DEPN+=$(SHL$(TNR)LIBS)
|
2000-09-20 08:43:26 -05:00
|
|
|
.ELSE
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
.IF "$(USE_DEFFILE)"!=""
|
2002-01-08 07:12:09 -06:00
|
|
|
USE_SHL$(TNR)TARGET=$(SHL$(TNR)TARGETN)
|
2000-09-20 08:43:26 -05:00
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
.IF "$(GUI)" != "UNX"
|
|
|
|
$(SHL$(TNR)IMPLIBN): \
|
|
|
|
$(SHL$(TNR)DEF) \
|
2002-01-08 07:12:09 -06:00
|
|
|
$(USE_SHL$(TNR)TARGET) \
|
|
|
|
$(USELIB$(TNR)DEPN) \
|
2000-09-20 08:43:26 -05:00
|
|
|
$(USELIBDEPN)
|
|
|
|
.ELSE
|
|
|
|
$(SHL$(TNR)IMPLIBN): \
|
|
|
|
$(SHL$(TNR)LIBS)
|
|
|
|
.ENDIF
|
2008-07-22 10:51:45 -05:00
|
|
|
@echo ------------------------------1
|
2000-09-20 08:43:26 -05:00
|
|
|
@echo Making: $(SHL$(TNR)IMPLIBN)
|
|
|
|
.IF "$(GUI)" == "WNT"
|
2007-03-26 09:27:57 -05:00
|
|
|
.IF "$(COM)"=="GCC"
|
|
|
|
@echo no ImportLibs on mingw
|
2007-09-06 07:40:25 -05:00
|
|
|
@-$(RM) $@
|
2007-03-26 09:27:57 -05:00
|
|
|
@$(TOUCH) $@
|
|
|
|
.ELSE # "$(COM)=="GCC"
|
2000-09-20 08:43:26 -05:00
|
|
|
# bei use_deffile implib von linker erstellt
|
|
|
|
.IF "$(USE_DEFFILE)"==""
|
|
|
|
$(IMPLIB) $(IMPLIBFLAGS) @$(mktmp -out:$(SHL$(TNR)IMPLIBN) \
|
|
|
|
-def:$(SHL$(TNR)DEF) )
|
2007-03-26 09:27:57 -05:00
|
|
|
.ELSE # "$(USE_DEFFILE)==""
|
2007-01-25 05:57:00 -06:00
|
|
|
@echo build of $(SHL$(TNR)TARGETN) creates $@
|
2008-06-06 03:29:25 -05:00
|
|
|
@$(TOUCH) $@
|
2007-03-26 09:27:57 -05:00
|
|
|
.ENDIF # "$(USE_DEFFILE)==""
|
|
|
|
.ENDIF # "$(COM)"=="GCC"
|
2008-07-22 10:51:45 -05:00
|
|
|
|
|
|
|
.ELIF "$(GUI)" == "OS2"
|
|
|
|
|
|
|
|
# touch creates an empty file, but this is not good for emxomfar, so
|
|
|
|
# create a dummy lib here
|
|
|
|
-$(LIBMGR) $(LIBFLAGS) $@ $(SHL$(TNR)VERSIONOBJ)
|
|
|
|
+@echo build of $(SHL$(TNR)TARGETN) creates $@
|
|
|
|
|
2000-09-20 08:43:26 -05:00
|
|
|
.ELSE
|
2003-04-28 10:45:42 -05:00
|
|
|
@echo no ImportLibs on Mac and *ix
|
2007-01-25 05:57:00 -06:00
|
|
|
@-$(RM) $@
|
2000-09-20 08:43:26 -05:00
|
|
|
@$(TOUCH) $@
|
|
|
|
.ENDIF
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
# unroll end
|
|
|
|
#######################################################
|
2007-06-27 08:02:59 -05:00
|
|
|
|