From d51efebfef9fec07262b9d0b526bb2ad67a1eb17 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 4 Mar 2005 04:56:26 +0000 Subject: fixed shared library versioning library versioning for linux fixed eol-style svn path=/trunk/; revision=2597 --- externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc | 2 ++ externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc | 12 +++++++++++- externals/grill/flext/buildsys/lnx/gnumake-gcc.inc | 3 +-- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'externals/grill/flext/buildsys/lnx') diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc index 22314356..b3a20f16 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc-ext.inc @@ -1,5 +1,7 @@ # build class specific settings +TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) + INCPATH += -I$(FLEXTINC) LIBPATH += -L$(FLEXTLIB) -L$(FLEXTSHLIB) LIBS += -l$(FLEXTNAME) diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc index 9f587cfc..93db3313 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc-flext.inc @@ -1,5 +1,12 @@ # build class specific settings +ifdef SHARED +SONAME=$(OUTNAME).$(EXT) +TARGET=$(TARGETPATH)/$(OUTNAME).$(PKGVERSION).$(EXT) +else +TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) +endif + ############################################## # default target @@ -21,7 +28,7 @@ $(TARGET) :: $(TARGETPATH) $(TARGET) :: $(COBJS) $(CPPOBJS) ifdef SHARED - $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ $(COBJS) $(CPPOBJS) $(LIBS) + $(CXX) $(LDFLAGS) $(LIBPATH) -o $@ -Wl,-soname,$(SONAME) $(COBJS) $(CPPOBJS) $(LIBS) chmod 755 $@ ifndef DEBUG ifndef PROFILE @@ -53,4 +60,7 @@ $(FLEXTLIBINST): _install_: $(FLEXTINC) $(FLEXTLIBINST) install $(TARGET) $(FLEXTLIBINST) +ifdef SHARED + ldconfig -l $(TARGET) +endif install $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(FLEXTINC) diff --git a/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc b/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc index 4be5953d..08945e71 100644 --- a/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc +++ b/externals/grill/flext/buildsys/lnx/gnumake-gcc.inc @@ -2,11 +2,10 @@ OBJPATH=$(OUTPATH)/$(OUTSUB) TARGETPATH=$(OBJPATH) -TARGET=$(TARGETPATH)/$(OUTNAME).$(EXT) ############################################## -CFLAGS += -pthread +CFLAGS += -pthread -fPIC LDFLAGS += -pthread -shared -Wl,-x ############################################## -- cgit v1.2.1