45 lines
1.5 KiB
Text
45 lines
1.5 KiB
Text
--- Makefile.orig 2012-01-06 14:29:04.000000000 +0100
|
|
+++ Makefile 2013-09-05 14:35:52.000000000 +0200
|
|
@@ -177,6 +177,11 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.cc
|
|
$(CCC) $(CCFLAGS) $(ADDFLAGS) -c $< -o $@
|
|
$(STRIP) $@
|
|
|
|
+# the shared object files
|
|
+$(OBJDIR)/%.So: $(SRCDIR)/%.cc
|
|
+ $(CCC) -fPIC $(CCFLAGS) $(ADDFLAGS) -c $< -o $@
|
|
+ $(STRIP) $@
|
|
+
|
|
|
|
#######################################################################
|
|
#
|
|
@@ -523,15 +524,20 @@
|
|
$(ARCHIVE) $@ $(OSI_O)
|
|
|
|
# The basic ABACUS library
|
|
-abacus-base: $(LIBDIR)/stuff/abacus-base.a
|
|
+abacus-base-static: $(LIBDIR)/stuff/abacus-base.a
|
|
+abacus-base-shared: $(LIBDIR)/stuff/abacus-base.so.1
|
|
|
|
$(LIBDIR)/stuff/abacus-base.a: $(ABACUS_O)
|
|
rm -f $@
|
|
@$(PRE_ARCHIVE) $(ABACUS_O)
|
|
$(ARCHIVE) $@ $(ABACUS_O)
|
|
|
|
+$(LIBDIR)/stuff/abacus-base.so.1: $(ABACUS_O:%.o=%.So)
|
|
+ rm -f $@
|
|
+ $(CCC) $(LDFLAGS) -shared -o $@ $(ABACUS_O:%.o=%.So)
|
|
+
|
|
# Build the library distribution directory (lib and lib/stuff)
|
|
-lib-all: subdirs abacus-base lpif interface $(ADDITIONAL_LIB_ALL)
|
|
+lib-all: subdirs abacus-base-static abacus-base-shared lpif interface $(ADDITIONAL_LIB_ALL)
|
|
|
|
# Create a tar file containing all necessary stuff to compile ABACUS on
|
|
# a remote system.
|
|
@@ -571,6 +577,7 @@
|
|
|
|
abacus: lib-all
|
|
cp $(LIBDIR)/stuff/abacus-base.a $(LIBDIR)/libabacus-osi.a
|
|
+ cp $(LIBDIR)/stuff/abacus-base.so.1 $(LIBDIR)/libabacus-osi.so.1
|
|
mkdir $(LIBDIR)/temp
|
|
cd $(LIBDIR)/temp; ar x ../stuff/interface-osi.a
|
|
find $(LIBDIR)/temp -name \*.o | xargs -n1 ar r $(LIBDIR)/libabacus-osi.a
|