Skip to content
Snippets Groups Projects
Commit 4500bb85 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

Fix static linking of roota and libRoot.a in the cases of OSX Cocoa backend

and in case of Cling. In Cling case there is still a startup issuse, to be
fixed next.


git-svn-id: http://root.cern.ch/svn/root/trunk@46879 27541ba8-7e3a-0410-8455-c3a389f83636
parent 767900b9
No related branches found
No related tags found
No related merge requests found
......@@ -501,7 +501,8 @@ ROOTMAP = etc/system.rootmap
##### Extra libs needed for "static" target #####
STATICEXTRALIBS = $(PCRELDFLAGS) $(PCRELIB) \
STATICEXTRALIBS = $(CLINGLIBEXTRA) \
$(PCRELDFLAGS) $(PCRELIB) \
$(FREETYPELDFLAGS) $(FREETYPELIB)
ifneq ($(SSLLIB),)
STATICEXTRALIBS += $(SSLLIB)
......@@ -510,7 +511,7 @@ ifeq ($(XFTLIB),yes)
STATICEXTRALIBS += -lXft
endif
ifeq ($(BUILDCOCOA),yes)
STATICEXTRALIBS += -framework Cocoa
STATICEXTRALIBS += -framework Cocoa -framework OpenGL
endif
##### libCore #####
......
......@@ -23,18 +23,15 @@ rm -f $ROOTAEXE $PROOFAEXE
gobjs=`$STATICOBJECTLIST -d`
dummyc=R__dummy.c
dummyo=""
if [ $PLATFORM = "alpha" ] && [ $CXX = "cxx" ]; then
echo 'void dnet_conn() {}' > $dummyc
$CC -c $dummyc
dummyo=R__dummy.o
# If linking with Cocoa framework, then don't use XLIBS
if echo $EXTRALIBS | grep ' Cocoa' > /dev/null 2>& 1 ; then
XLIBS=
fi
echo "Making $ROOTAEXE..."
echo $LD $LDFLAGS -o $ROOTAEXE main/src/rmain.o $dummyo $gobjs $ROOTALIB \
echo $LD $LDFLAGS -o $ROOTAEXE main/src/rmain.o $gobjs $ROOTALIB \
$XLIBS $SYSLIBS $EXTRALIBS
$LD $LDFLAGS -o $ROOTAEXE main/src/rmain.o $dummyo $gobjs $ROOTALIB \
$LD $LDFLAGS -o $ROOTAEXE main/src/rmain.o $gobjs $ROOTALIB \
$XLIBS $SYSLIBS $EXTRALIBS
linkstat=$?
......@@ -43,9 +40,9 @@ if [ $linkstat -ne 0 ]; then
fi
echo "Making $PROOFAEXE..."
echo $LD $LDFLAGS -o $PROOFAEXE main/src/pmain.o $dummyo $gobjs $ROOTALIB \
echo $LD $LDFLAGS -o $PROOFAEXE main/src/pmain.o $gobjs $ROOTALIB \
$XLIBS $SYSLIBS $EXTRALIBS
$LD $LDFLAGS -o $PROOFAEXE main/src/pmain.o $dummyo $gobjs $ROOTALIB \
$LD $LDFLAGS -o $PROOFAEXE main/src/pmain.o $gobjs $ROOTALIB \
$XLIBS $SYSLIBS $EXTRALIBS
linkstat=$?
......@@ -53,6 +50,4 @@ if [ $linkstat -ne 0 ]; then
exit $linkstat
fi
rm -f $dummyc $dummyo
exit 0
......@@ -50,6 +50,11 @@ for i in * ; do
fi
done
# add Cling objects
for i in Interpreter MetaProcessor Utils ; do
ls interpreter/cling/lib/$i/*.o > /dev/null 2>&1 && objs="$objs `ls interpreter/cling/lib/$i/*.o`"
done
if [ "x$dictonly" = "xyes" ]; then
echo $gobjs
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment