forked from rock-core/package_set
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sisl-01-build_shlibs-02.patch
53 lines (48 loc) · 1.32 KB
/
sisl-01-build_shlibs-02.patch
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
--- ../sisl_4.4_gpl/makefile_template 2005-08-22 16:29:12.000000000 +0200
+++ makefile_template 2010-02-04 16:09:29.248643986 +0100
@@ -70,10 +70,10 @@ ifeq "$(PLATFORM)" "linux"
CC =gcc
ifeq "$(MODE)" "opt"
- CFLAGS =-O2 -Wall
+ CFLAGS =-O2 -Wall -fPIC
CDEFS =-DNDEBUG
else
- CFLAGS =-g -Wall
+ CFLAGS =-g -Wall -fPIC
CDEFS =
endif
@@ -105,10 +105,10 @@ ifeq "$(PLATFORM)" "linux"
CXX =g++
LDXX =$(CXX)
ifeq "$(MODE)" "opt"
- CXXFLAGS =-O2 -Wall
+ CXXFLAGS =-fPIC -O2 -Wall
CXXDEFS =-DNDEBUG
else
- CXXFLAGS =-g -Wall
+ CXXFLAGS =-fPIC -g -Wall
CXXDEFS =
endif
endif
@@ -127,7 +127,7 @@ ifdef WINDOWS_TYPE_PLATFORM
endif
ifeq "$(PLATFORM)" "linux"
- LIBNAME =lib$(notdir $(shell pwd))_$(MODE).a
+ LIBNAME =lib$(notdir $(shell pwd))_$(MODE).so
endif
#------------------------------------------------------------
@@ -173,7 +173,7 @@ $(LIBNAME): $(COBJS) $(CXXOBJS)
ifdef WINDOWS_TYPE_PLATFORM
link -lib $(LDXXFLAGS) /out:"lib/$(LIBNAME)" $^
else
- ar -sr lib/$(LIBNAME) $^
+ $(LDXX) -shared -fPIC -o lib/$(LIBNAME) $^
endif
lib/%.o: src/%.c
@@ -231,4 +231,4 @@ default:; @echo ""
@echo "You need to edit the Makefile to set the required"
@echo "variables for your platform type."
@echo ""
-endif
\ No newline at end of file
+endif