Browse Source

Shared libaries only for linux

Author: jgg
Date: 1999-12-10 06:39:46 GMT
Shared libaries only for linux
debian/1.8.y
Arch Librarian 18 years ago
parent
commit
70fbac25ae
  1. 5
      buildlib/defaults.mak
  2. 9
      buildlib/environment.mak.in
  3. 7
      buildlib/library.mak

5
buildlib/defaults.mak

@ -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

9
buildlib/environment.mak.in

@ -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

7
buildlib/library.mak

@ -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)

Loading…
Cancel
Save