]> git.saurik.com Git - apt.git/commitdiff
Shared libaries only for linux
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:55:28 +0000 (16:55 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:55:28 +0000 (16:55 +0000)
Author: jgg
Date: 1999-12-10 06:39:46 GMT
Shared libaries only for linux

buildlib/defaults.mak
buildlib/environment.mak.in
buildlib/library.mak

index 17a6b8ac88f8f998b40981c3aa5945fcc029458f..47f297cdf1ddb704535f2b07140dc7cbc3b50c90 100644 (file)
@@ -48,9 +48,11 @@ ifeq ($(words $(BUILDX)),0)
 ifeq ($(words $(wildcard *)),0)
 error-all/environment.mak:
        echo You have a broken version of GNU Make - upgrade.
+       error-out-and-die
 else
 error-all/environment.mak:
        echo Can't find the build directory in $(BUILD_POSSIBLE) -- use BUILD=
+       error-out-and-die
 endif
 
 # Force include below to come to the error target
@@ -147,6 +149,7 @@ else
  endif
 endif  
 
+# Automatic -j support
 ifeq ($(NUM_PROCS),1)
   PARALLEL_RUN=no
 endif
@@ -154,8 +157,8 @@ endif
 ifndef PARALLEL_RUN
  PARALLEL_RUN=yes
  .EXPORT: PARALLEL_RUN
+ # handle recursion
  ifneq ($(NUM_PROCS),)
-# handle recursion
   MAKEFLAGS += -j $(NUM_PROCS)
  endif
 endif
index b0b8f185e13ac715747245abca2f6265e1e0a4f2..6d721c71128e301cd05d76940e308ebede07ff68 100644 (file)
@@ -35,3 +35,12 @@ PTHREADLIB = @PTHREADLIB@
 # Shim Headerfile control
 HAVE_C9X = @HAVE_C9X@
 HAVE_STATVFS = @HAVE_STATVFS@
+
+# Shared library things
+HOST_OS = @host_os@
+ifeq ($(HOST_OS),linux-gnu)
+   ONLYSHAREDLIBS = yes
+   SONAME_MAGIC=-Wl,-soname -Wl,
+   LFLAGS_SO=
+endif
+        
index 54acb6dd460def833b2129c3998bbaac2fa1143c..caf15606bf9b3b8701b7588ee66b7c09a4fb7889 100644 (file)
@@ -47,9 +47,10 @@ $(LIB)/lib$(LIBRARY).so: $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR)
 $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR): $($(LOCAL)-HEADERS) $($(LOCAL)-OBJS)
        -rm -f $(LIB)/lib$($(@F)-LIBRARY).so* 2> /dev/null
        echo Building shared library $@
-       $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) -o $@ \
-          -Wl,-soname -Wl,$($(@F)-SONAME) -shared $(filter %.opic,$^) \
-          $($(@F)-SLIBS)
+       $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\
+          -o $@ $(SONAME_MAGIC)$($(@F)-SONAME) -shared \
+          $(filter %.opic,$^) \
+          $($(@F)-SLIBS) 
 
 # Compilation rules
 vpath %.cc $(SUBDIRS)