office-gobmx/solenv/inc/tg_shl.mk

541 lines
22 KiB
Makefile
Raw Normal View History

2000-09-20 08:43:26 -05:00
#*************************************************************************
2000-10-30 06:14:55 -06:00
#
# OpenOffice.org - a multi-platform office productivity suite
2000-10-30 06:14:55 -06:00
#
# $RCSfile: tg_shl.mk,v $
2000-10-30 06:14:55 -06:00
#
# $Revision: 1.118 $
2000-10-30 06:14:55 -06:00
#
# last change: $Author: hjs $ $Date: 2007-12-07 17:06:25 $
2000-10-30 06:14:55 -06:00
#
# The Contents of this file are made available subject to
# the terms of GNU Lesser General Public License Version 2.1.
2000-10-30 06:14:55 -06:00
#
#
# GNU Lesser General Public License Version 2.1
# =============================================
# Copyright 2005 by Sun Microsystems, Inc.
# 901 San Antonio Road, Palo Alto, CA 94303, USA
2000-10-30 06:14:55 -06:00
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1, as published by the Free Software Foundation.
2000-10-30 06:14:55 -06:00
#
# This library 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 for more details.
2000-10-30 06:14:55 -06:00
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
2000-10-30 06:14:55 -06:00
#
2000-09-20 08:43:26 -05:00
#*************************************************************************
#######################################################
# targets for linking
2000-09-20 08:43:26 -05:00
# unroll begin
.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
# decide how to link
.IF "$(SHL$(TNR)CODETYPE)"=="C"
SHL$(TNR)LINKER=$(LINKC)
SHL$(TNR)STDSHL=$(subst,CPPRUNTIME, $(STDSHL))
SHL$(TNR)LINKFLAGS+=$(LINKCFLAGS)
.ELSE # "$(SHL$(TNR)CODETYPE)"=="C"
SHL$(TNR)LINKER=$(LINK)
SHL$(TNR)STDSHL=$(subst,CPPRUNTIME,$(STDLIBCPP) $(STDSHL))
SHL$(TNR)LINKFLAGS+=$(LINKFLAGS)
.ENDIF # "$(SHL$(TNR)CODETYPE)"=="C"
SHL$(TNR)RPATH*=OOO
LINKFLAGSRUNPATH_$(SHL$(TNR)RPATH)*=/ERROR:/Bad_SHL$(TNR)RPATH_value
SHL$(TNR)LINKFLAGS+=$(LINKFLAGSRUNPATH_$(SHL$(TNR)RPATH))
.IF "$(SHL$(TNR)USE_EXPORTS)"==""
2000-09-20 08:43:26 -05:00
SHL$(TNR)DEF*=$(MISC)$/$(SHL$(TNR)TARGET).def
.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"==""
2000-09-20 08:43:26 -05:00
2001-08-14 08:14:33 -05:00
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++ version object ++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2000-12-21 13:06:32 -06:00
.IF "$(VERSIONOBJ)"!=""
SHL$(TNR)VERSIONOBJ:=$(VERSIONOBJ:d){$(subst,$(UPD)$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f)
USE_VERSIONH:=$(INCCOM)$/$(SHL$(TNR)VERSIONOBJ:b).h
2001-11-01 11:21:52 -06:00
.IF "$(GUI)" == "UNX"
SHL$(TNR)VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(UPD)$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f:s/.o/.obj/)
2001-11-02 04:37:13 -06:00
.ELSE # "$(GUI)" == "UNX"
SHL$(TNR)VERSIONOBJDEP:=$(VERSIONOBJ:d){$(subst,$(UPD)$(DLLPOSTFIX),_dflt $(SHL$(TNR)TARGET))}$(VERSIONOBJ:f)
2001-11-01 11:21:52 -06:00
.ENDIF # "$(GUI)" == "UNX"
$(MISC)$/$(SHL$(TNR)VERSIONOBJ:b).c : $(SOLARENV)$/src$/version.c $(INCCOM)$/$(SHL$(TNR)VERSIONOBJ:b).h
# $(COPY) $(SOLARENV)$/src$/version.c $@
$(TYPE) $(SOLARENV)$/src$/version.c | $(SED) s/_version.h/$(SHL$(TNR)VERSIONOBJ:b).h/ > $@
.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"
.IF "$(GUI)" == "WNT"
.IF "$(SHL$(TNR)IMPLIB)" == ""
SHL$(TNR)IMPLIB=i$(TARGET)_t$(TNR)
.ENDIF # "$(SHL$(TNR)IMPLIB)" == ""
.IF "$(COM)" != "GCC"
2000-09-20 08:43:26 -05:00
USE_$(TNR)IMPLIB=-implib:$(LB)$/$(SHL$(TNR)IMPLIB).lib
.ENDIF # "$(COM)" != "GCC"
SHL$(TNR)IMPLIBN=$(LB)$/$(SHL$(TNR)IMPLIB).lib
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)"==""
.ENDIF # "$(GUI)" == "WNT"
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
$(USE_SHL$(TNR)VERSIONMAP) .PHONY:
@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)"!=""
.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)
@$(RM) $@.dump
2000-09-20 08:43:26 -05:00
.IF "$(SHL$(TNR)OBJS)"!=""
# dump remaining objects on the fly
.IF "$(OS)"=="MACOSX"
@-nm $(SHL$(TNR)OBJS:s/.obj/.o/) > $@.dump
.ELSE
@nm $(SHL$(TNR)OBJS:s/.obj/.o/) > $@.dump
.ENDIF
2000-09-20 08:43:26 -05:00
.ENDIF # "$(SHL$(TNR)OBJS)!"=""
@$(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
$(USE_SHL$(TNR)VERSIONMAP) :
@echo -----------------------------
@echo SHL$(TNR)FILTERFILE not set!
@echo -----------------------------
@$(TOUCH) $@
@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)"!=""
USE_SHL$(TNR)VERSIONMAP=$(MISC)$/$(SHL$(TNR)VERSIONMAP:b)_$(SHL$(TNR)TARGET)$(SHL$(TNR)VERSIONMAP:e)
.IF "$(OS)"!="IRIX"
2000-09-20 08:43:26 -05:00
SHL$(TNR)VERSIONMAPPARA=$(LINKVERSIONMAPFLAG) $(USE_SHL$(TNR)VERSIONMAP)
.ENDIF
.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)
@@-$(RM) -f $@
# 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"
@-$(RM) -f $@.symregexp >& $(NULLDEV)
@-$(RM) -f $@.expsymlist >& $(NULLDEV)
.ENDIF
# Its questionable if the following condition '.IF "$(COMID)"=="gcc3"' makes sense and what
# happens if somebody will change it in the future
.IF "$(COMID)"=="gcc3"
tr -d "\015" < $(SHL$(TNR)VERSIONMAP) | $(AWK) -f $(SOLARENV)$/bin$/addsym.awk > $@
.ELSE # "$(COMID)"=="gcc3"
tr -d "\015" < $(SHL$(TNR)VERSIONMAP) > $@
.ENDIF # "$(COMID)"=="gcc3"
@chmod a+w $@
# 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"
-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
# 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)"!=""
-echo $(foreach,i,$(SHL$(TNR)OBJS:s/.obj/.o/) $i) | xargs -n1 nm -gx | $(SOLARENV)$/bin$/addsym-macosx.sh $@.symbols-regexp $(MISC)$/symbols-regexp.tmp >> $@.exported-symbols
.ENDIF
.IF "$(SHL$(TNR)LIBS)"!=""
-$(TYPE) $(foreach,j,$(SHL$(TNR)LIBS) $j) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g | xargs -n1 nm -gx | $(SOLARENV)$/bin$/addsym-macosx.sh $@.symbols-regexp $(MISC)$/symbols-regexp.tmp >> $@.exported-symbols
.ENDIF
# overwrite the map file generate into the local output tree with the generated
# exported symbols list
cp $@.exported-symbols $@
.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"
.IF "$(OS)"=="IRIX"
SHL$(TNR)SONAME=$(SONAME_SWITCH)$(SHL$(TNR)TARGETN:f)
.ELSE
SHL$(TNR)SONAME=\"$(SONAME_SWITCH)$(SHL$(TNR)TARGETN:f)\"
.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)
SHL$(TNR)LINKRES*=$(MISC)$/$(SHL$(TNR)TARGET).res
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)
SHL$(TNR)LINKRES*=$(MISC)$/$(SHL$(TNR)TARGET).res
SHL$(TNR)LINKRESO*=$(MISC)$/$(SHL$(TNR)TARGET)_res.o
2000-09-20 08:43:26 -05:00
.ENDIF # "$(SHL$(TNR)DEFAULTRES)$(use_shl_versions)"!=""
#.IF "$(SHL$(TNR)TARGETN)"!=""
2001-09-28 11:11:33 -05:00
.IF "$(linkinc)"!=""
.IF "$(GUI)"=="WNT"
$(MISC)$/$(SHL$(TNR)TARGET)_linkinc.ls .PHONY:
@@-$(RM) $@
$(SED) -f $(COMMON_ENV_TOOLS)\chrel.sed $(foreach,i,$(SHL$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@
.ENDIF
2001-09-28 11:11:33 -05:00
LINKINCTARGETS+=$(MISC)$/$(SHL$(TNR)TARGETN:b)_linkinc.ls
$(SHL$(TNR)TARGETN) : $(LINKINCTARGETS)
.ELSE
.IF "$(SHL$(TNR)USE_EXPORTS)"=="name"
.IF "$(GUI)"=="WNT"
SHL$(TNR)LINKLIST=$(MISC)$/$(SHL$(TNR)TARGET)_link.lst
$(MISC)$/$(SHL$(TNR)TARGET)_link.lst : $(SHL$(TNR)LIBS)
@@-$(RM) $@
$(SED) -f $(COMMON_ENV_TOOLS)\chrel.sed $(foreach,i,$(SHL$(TNR)LIBS) $(i:s/.lib/.lin/)) >> $@
.ENDIF
.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"=="name"
$(MISC)$/%linkinc.ls:
echo . > $@
2001-09-28 11:11:33 -05:00
.ENDIF # "$(linkinc)"!=""
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)\
$(SHL$(TNR)DEPN) \
$(SHL$(TNR)LINKLIST)
2000-09-20 08:43:26 -05:00
@echo ------------------------------
@echo Making: $(SHL$(TNR)TARGETN)
.IF "$(GUI)" == "WNT"
.IF "$(SHL$(TNR)DEFAULTRES)"!=""
@@-$(RM) $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
2000-09-20 08:43:26 -05:00
.IF "$(SHL$(TNR)ICON)" != ""
@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)" != ""
.IF "$(SHL$(TNR)ADD_VERINFO)"!=""
@echo $(EMQ)#include $(EMQ)"$(SHL$(TNR)ADD_VERINFO)$(EMQ)" >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
.ELSE # "$(SHL$(TNR)ADD_VERINFO)"!=""
@echo $(EMQ)#define ADDITIONAL_VERINFO1 >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
@echo $(EMQ)#define ADDITIONAL_VERINFO2 >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
@echo $(EMQ)#define ADDITIONAL_VERINFO3 >> $(MISC)$/$(SHL$(TNR)DEFAULTRES:b).rc
.ENDIF # "$(SHL$(TNR)ADD_VERINFO)"!=""
@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)" != ""
$(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)"!=""
.IF "$(USE_SHELL)"=="4nt"
$(COPY) /b $(SHL$(TNR)ALLRES:s/res /res+/) $(SHL$(TNR)LINKRES)
.ELSE # "$(USE_SHELL)"=="4nt"
$(TYPE) $(SHL$(TNR)ALLRES) > $(SHL$(TNR)LINKRES)
.IF "$(COM)"=="GCC"
windres $(SHL$(TNR)LINKRES) $(SHL$(TNR)LINKRESO)
.ENDIF # "$(COM)"=="GCC"
.ENDIF # "$(USE_SHELL)"=="4nt"
2000-09-20 08:43:26 -05:00
.ENDIF # "$(SHL$(TNR)ALLRES)"!=""
.IF "$(COM)"=="GCC" # always have to call dlltool explicitly as ld cannot handle # comment in .def
.IF "$(DEFLIB$(TNR)NAME)"!="" # do not have to include objs
@echo dlltool --input-def $(SHL$(TNR)DEF) \
--dllname $(SHL$(TNR)TARGET)$(DLLPOST) \
--kill-at \
--output-exp $(MISC)$/$(@:b)_exp.o > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
.ELSE # "$(DEFLIB$(TNR)NAME)"!="" # do not have to include objs
@echo dlltool --input-def $(SHL$(TNR)DEF) \
--dllname $(SHL$(TNR)TARGET)$(DLLPOST) \
--kill-at \
--output-exp $(MISC)$/$(@:b)_exp.o \
$(STDOBJ) $(SHL$(TNR)OBJS) $(SHL$(TNR)LINKRESO) \
`$(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
.ENDIF # "$(DEFLIB$(TNR)NAME)"!=""
@echo $(LINK) $(LINKFLAGS) $(LINKFLAGSSHL) -o$@ \
$(STDOBJ) $(SHL$(TNR)VERSIONOBJ) $(SHL$(TNR)DESCRIPTIONOBJ) $(SHL$(TNR)OBJS) $(SHL$(TNR)LINKRESO) \
`$(TYPE) /dev/null $(SHL$(TNR)LIBS) | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
-Wl,--exclude-libs,ALL $(SHL$(TNR)STDLIBS) $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
$(MISC)$/$(@:b)_exp.o \
-Wl,-Map,$(MISC)$/$(@:b).map >> $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
@$(TYPE) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
@+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
.ELSE
2000-09-20 08:43:26 -05:00
.IF "$(linkinc)"==""
.IF "$(SHL$(TNR)USE_EXPORTS)"!="name"
2000-09-20 08:43:26 -05:00
.IF "$(USE_DEFFILE)"!=""
$(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) \
$(SHL$(TNR)VERSIONOBJ) $(SHL$(TNR)OBJS) \
2000-09-20 08:43:26 -05:00
$(SHL$(TNR)LIBS) \
$(SHL$(TNR)STDLIBS) \
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
$(SHL$(TNR)LINKRES) \
) $(LINKOUTPUTFILTER)
# double check if target was really written... still making sense?
@@$(LS) $@
@echo linking $@.manifest ...
.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
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
.ENDIF # "$(VISTA_MANIFEST)"!=""
$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2000-09-20 08:43:26 -05:00
.ELSE # "$(USE_DEFFILE)"!=""
$(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) \
$(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ) \
2000-09-20 08:43:26 -05:00
$(SHL$(TNR)LIBS) \
$(SHL$(TNR)STDLIBS) \
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
$(SHL$(TNR)LINKRES) \
) $(LINKOUTPUTFILTER)
# double check if target was really written... still making sense?
@@$(LS) $@
@echo linking $@.manifest ...
.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
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
.ENDIF # "$(VISTA_MANIFEST)"!=""
$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2000-09-20 08:43:26 -05:00
.ENDIF # "$(USE_DEFFILE)"!=""
.ELSE # "$(SHL$(TNR)USE_EXPORTS)"!="name"
$(SHL$(TNR)LINKER) @$(mktmp $(SHL$(TNR)LINKFLAGS) \
$(LINKFLAGSSHL) $(SHL$(TNR)BASEX) \
$(SHL$(TNR)STACK) -out:$(SHL$(TNR)TARGETN) \
-map:$(MISC)$/$(@:B).map \
$(USE_$(TNR)IMPLIB) \
$(STDOBJ) \
$(SHL$(TNR)OBJS) $(SHL$(TNR)VERSIONOBJ)) \
@$(MISC)$/$(SHL$(TNR)TARGET)_link.lst \
@$(mktmp $(SHL$(TNR)STDLIBS) \
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
$(SHL$(TNR)LINKRES) \
)
@echo linking $@.manifest ...
.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
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
.ENDIF # "$(VISTA_MANIFEST)"!=""
$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
.ENDIF # "$(SHL$(TNR)USE_EXPORTS)"!="name"
2000-09-20 08:43:26 -05:00
.ELSE # "$(linkinc)"==""
-$(RM) del $(MISC)$/$(SHL$(TNR)TARGET).lnk
-$(RM) $(MISC)$/$(SHL$(TNR)TARGET).lst
$(TYPE) $(mktmp \
$(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) \
$(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) \
$(SHL$(TNR)LINKRES) \
2000-09-20 08:43:26 -05:00
) >> $(MISC)$/$(SHL$(TNR)TARGET).lnk
$(TYPE) $(MISC)$/$(SHL$(TNR)TARGETN:b)_linkinc.ls >> $(MISC)$/$(SHL$(TNR)TARGET).lnk
$(SHL$(TNR)LINKER) @$(MISC)$/$(SHL$(TNR)TARGET).lnk
@echo linking $@.manifest ...
.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
$(IFEXIST) $@.manifest $(THEN) mt.exe -manifest $@.manifest -outputresource:$@$(EMQ);2 $(FI)
.ENDIF # "$(VISTA_MANIFEST)"!=""
$(IFEXIST) $@.manifest $(THEN) $(RM:s/+//) $@.manifest $(FI)
$(IFEXIST) $@.tmanifest $(THEN) $(RM:s/+//) $@.tmanifest $(FI)
2000-09-20 08:43:26 -05:00
.ENDIF # "$(linkinc)"==""
.ENDIF # "$(COM)"=="GCC"
2000-09-20 08:43:26 -05:00
.ENDIF # "$(GUI)" == "WNT"
.IF "$(GUI)"=="UNX"
.IF "$(OS)"=="MACOSX"
@-$(RM) $(MISC)$/$(@:b).list
@-$(RM) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
@echo $(STDSLO) $(SHL$(TNR)OBJS:s/.obj/.o/) \
$(SHL$(TNR)VERSIONOBJ) \
`cat /dev/null $(SHL$(TNR)LIBS) | sed s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` | tr -s " " "\n" > $(MISC)$/$(@:b).list
@echo $(SHL$(TNR)LINKER) $(SHL$(TNR)LINKFLAGS) $(SHL$(TNR)VERSIONMAPPARA) $(LINKFLAGSSHL) -L$(PRJ)$/$(ROUT)$/lib $(SOLARLIB) -o $@ \
`macosx-dylib-link-list $(PRJNAME) $(SOLARLIBDIR) $(PRJ)$/$(INPATH)$/lib $(SHL$(TNR)STDLIBS)` \
$(SHL$(TNR)STDLIBS) $(SHL$(TNR)ARCHIVES) $(SHL$(TNR)STDSHL) $(STDSHL$(TNR)) -filelist $(MISC)$/$(@:b).list $(LINKOUTPUT_FILTER) > $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
@cat $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
@+source $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
2002-08-16 05:27:02 -05:00
@echo "Making: $@.jnilib"
@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)"==""
$(SOLARENV)$/bin$/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS) $(SHL$(TNR)TARGETN)
2001-06-19 08:41:53 -05:00
.ENDIF # "$(SHL$(TNR)NOCHECK)"!=""
2000-09-20 08:43:26 -05:00
.ENDIF
.ELSE # "$(OS)"=="MACOSX"
@-$(RM) $(MISC)$/$(TARGET).$(@:b)_$(TNR).cmd
@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/) \
$(SHL$(TNR)VERSIONOBJ) -o $@ \
`cat /dev/null $(SHL$(TNR)LIBS) | tr -s " " "\n" | $(SED) s\#$(ROUT)\#$(PRJ)$/$(ROUT)\#g` \
$(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
.IF "$(UPDATER)"=="YES"
2001-06-19 08:41:53 -05:00
.IF "$(SHL$(TNR)NOCHECK)"==""
-$(RM) $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f)
$(RENAME) $(SHL$(TNR)TARGETN) $(SHL$(TNR)TARGETN:d)check_$(SHL$(TNR)TARGETN:f)
$(SOLARENV)$/bin$/checkdll.sh -L$(LB) -L$(SOLARLIBDIR) $(EXTRALIBPATHS) $(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)"!=""
$(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
.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
@echo ------------------------------
@echo Making: $(SHL$(TNR)IMPLIBN)
.IF "$(GUI)" == "WNT"
.IF "$(COM)"=="GCC"
@echo no ImportLibs on mingw
@-$(RM) $@
@$(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) )
.ELSE # "$(USE_DEFFILE)==""
@echo build of $(SHL$(TNR)TARGETN) creates $@
.ENDIF # "$(USE_DEFFILE)==""
.ENDIF # "$(COM)"=="GCC"
2000-09-20 08:43:26 -05:00
.ELSE
@echo no ImportLibs on Mac and *ix
@-$(RM) $@
2000-09-20 08:43:26 -05:00
@$(TOUCH) $@
.ENDIF
.ENDIF
# unroll end
#######################################################