forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astyle-2.02.1-build_system.patch
54 lines (49 loc) · 1.62 KB
/
astyle-2.02.1-build_system.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
54
--- a/build/gcc/Makefile
+++ b/build/gcc/Makefile
@@ -34,25 +34,25 @@
ipath=$(prefix)/bin
CBASEFLAGS = -W -Wall -fno-rtti -fno-exceptions
JAVAINCS = -I$(JAVA_HOME)/include
-CXX = g++
+CXX ?= g++
INSTALL=install -o $(USER) -g $(USER)
##################################################
# define compile options for each build
-ifdef CFLAGS
- CFLAGSr = -DNDEBUG $(CBASEFLAGS) $(CFLAGS)
- CFLAGSd = -g $(CBASEFLAGS) $(CFLAGS)
+ifdef CXXFLAGS
+ CFLAGSr = -DNDEBUG $(CBASEFLAGS) $(CXXFLAGS)
+ CFLAGSd = -g $(CBASEFLAGS) $(CXXFLAGS)
else
CFLAGSr = -DNDEBUG -O3 $(CBASEFLAGS)
CFLAGSd = -g $(CBASEFLAGS)
endif
-CFLAGSs = -DASTYLE_LIB -fpic $(CFLAGSr)
-CFLAGSsd = -DASTYLE_LIB -fpic $(CFLAGSd)
+CFLAGSs = -DASTYLE_LIB -fPIC $(CFLAGSr)
+CFLAGSsd = -DASTYLE_LIB -fPIC $(CFLAGSd)
CFLAGSa = -DASTYLE_LIB $(CFLAGSr)
CFLAGSad = -DASTYLE_LIB $(CFLAGSd)
-CFLAGSsj = -DASTYLE_JNI -fpic $(CFLAGSr) $(JAVAINCS)
-CFLAGSsjd = -DASTYLE_JNI -fpic $(CFLAGSd) $(JAVAINCS)
+CFLAGSsj = -DASTYLE_JNI -fPIC $(CFLAGSr) $(JAVAINCS)
+CFLAGSsjd = -DASTYLE_JNI -fPIC $(CFLAGSd) $(JAVAINCS)
# define link options
ifdef LDFLAGS
@@ -134,7 +134,7 @@
shared: libastyle.so
libastyle.so: $(OBJs)
@ mkdir -p $(bindir)
- $(CXX) -shared $(LDFLAGSr) -o $(bindir)/$@ $^
+ $(CXX) -shared -Wl,-soname,[email protected] $(LDFLAGSr) -o $(bindir)/[email protected] $^
@ echo
shareddebug: libastyled.so
@@ -158,7 +158,7 @@
java: libastylej.so
libastylej.so: $(OBJsj)
@ mkdir -p $(bindir)
- $(CXX) -shared $(LDFLAGSr) -o $(bindir)/$@ $^
+ $(CXX) -shared -Wl,-soname,[email protected] $(LDFLAGSr) -o $(bindir)/[email protected] $^
@ echo
javadebug: libastylejd.so