summaryrefslogtreecommitdiff
blob: 6980332837f65bfc9112c2bcf5537c5fb1ae8409 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
--- src/Makefile.orig	2009-08-12 22:52:51.000000000 +0100
+++ src/Makefile	2009-08-12 23:38:51.000000000 +0100
@@ -7,7 +7,7 @@
 
 CORE_PATH=..
 
-INCLUDE=-I${CORE_PATH}/inc -I${CORE_PATH}/mpfr/include -I${CORE_PATH}/gmp/include
+INCLUDE=-I${CORE_PATH}/inc
 
 # VAR indicates variants of the Core library
 #	E.g., if VAR=(empty) then we compile the release version.
@@ -37,12 +37,13 @@
 
 # The following library will be built:
 CORE_LIB=$(CORE_PATH)/lib/libcore++${VAR}.a
-CORE_SHARED_LIB=$(CORE_PATH)/lib/libcore++${VAR}.so
+CORE_SHARED_LIB_NAME=libcore++${VAR}.so.2.0.0
+CORE_SHARED_LIB=$(CORE_PATH)/lib/$(CORE_SHARED_LIB_NAME)
 
 TARGET=$(CORE_LIB)
 
 ifeq (${LINKAGE}, shared)
-  TARGET+=$(CORE_SHARED_LIB)
+  TARGET=$(CORE_SHARED_LIB)
 endif
 
 # =============================================================
@@ -55,7 +56,7 @@
 	$(AR) $@ $^
 
 ${CORE_SHARED_LIB}:	$(EXPROBJS)
-	$(CXX) $(CORE_LDFLAGS) -o $@ $^
+	$(CXX) $(LDFLAGS) $(CORE_LDFLAGS)  -Wl,-soname,$(CORE_SHARED_LIB_NAME).2.0.0 -o $@ $^ $(LIBS)
 
 %${VAR}.o:	%.cpp
 	${CXX} $(CORE_CXXFLAGS) $(INCLUDE) -c $< -o $@
--- ext/Makefile.orig	2009-08-12 22:54:55.000000000 +0100
+++ ext/Makefile	2009-08-12 23:39:19.000000000 +0100
@@ -13,8 +13,7 @@
 # =============================================================
 
 CORE_PATH=..
-INCLUDE=-I${CORE_PATH}/inc -I${CORE_PATH}/gmp/include \
-	-I${CORE_PATH}/mpfr/include
+INCLUDE=-I${CORE_PATH}/inc
 
 MODULES := linearAlgebra geometry2d geometry3d
 
@@ -30,14 +29,17 @@
 COREX_LIB_LEVEL3=${CORE_PATH}/lib/libcorex++$(VAR)_level3.a
 COREX_LIB_LEVEL2=${CORE_PATH}/lib/libcorex++$(VAR)_level2.a
 COREX_LIB_LEVEL1=${CORE_PATH}/lib/libcorex++$(VAR)_level1.a
-COREX_SHARED_LIB_LEVEL3=${CORE_PATH}/lib/libcorex++$(VAR)_level3.so
-COREX_SHARED_LIB_LEVEL2=${CORE_PATH}/lib/libcorex++$(VAR)_level2.so
-COREX_SHARED_LIB_LEVEL1=${CORE_PATH}/lib/libcorex++$(VAR)_level1.so
+COREX_SHARED_LIB_LEVEL3_NAME=libcorex++$(VAR)_level3.so.2.0.0
+COREX_SHARED_LIB_LEVEL2_NAME=libcorex++$(VAR)_level2.so.2.0.0
+COREX_SHARED_LIB_LEVEL1_NAME=libcorex++$(VAR)_level1.so.2.0.0
+COREX_SHARED_LIB_LEVEL3=${CORE_PATH}/lib/$(COREX_SHARED_LIB_LEVEL3_NAME)
+COREX_SHARED_LIB_LEVEL2=${CORE_PATH}/lib/$(COREX_SHARED_LIB_LEVEL2_NAME)
+COREX_SHARED_LIB_LEVEL1=${CORE_PATH}/lib/$(COREX_SHARED_LIB_LEVEL1_NAME)
 
 TARGET=${COREX_LIB_LEVEL3} ${COREX_LIB_LEVEL2} ${COREX_LIB_LEVEL1}
 
 ifeq (${LINKAGE}, shared)
-  TARGET += $(COREX_SHARED_LIB_LEVEL3) $(COREX_SHARED_LIB_LEVEL2) \
+  TARGET = $(COREX_SHARED_LIB_LEVEL3) $(COREX_SHARED_LIB_LEVEL2) \
             $(COREX_SHARED_LIB_LEVEL1)
 endif
 
@@ -60,7 +62,7 @@
 
 ${COREX_SHARED_LIB_LEVEL3}: ${L3_OBJS}
 	-@rm -rf $@ 
-	$(CXX) $(CORE_LDFLAGS) -o $@ $?
+	$(CXX) $(LDFLAGS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL3_NAME).2.0.0 -o $@ $?
 
 ${COREX_LIB_LEVEL2}: ${L2_OBJS}
 	-@rm -rf $@ 
@@ -68,7 +70,7 @@
 
 ${COREX_SHARED_LIB_LEVEL2}: ${L2_OBJS}
 	-@rm -rf $@ 
-	$(CXX) $(CORE_LDFLAGS) -o $@ $?
+	$(CXX) $(LDFLAGS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL2_NAME).2.0.0 -o $@ $?
 
 ${COREX_LIB_LEVEL1}: ${L1_OBJS}
 	-@rm -rf $@ 
@@ -76,7 +78,7 @@
 
 ${COREX_SHARED_LIB_LEVEL1}: ${L1_OBJS}
 	-@rm -rf $@ 
-	$(CXX) $(CORE_LDFLAGS) -o $@ $?
+	$(CXX) $(LDFLAGS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL1_NAME).2.0.0 -o $@ $?
 
 %_level3.o:	%.cpp
 	${CXX} $(CORE_CXXFLAGS) -DCORE_LEVEL=3 $(INCLUDE) -c $< -o $@