forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astyle-2.05.1-build_system.patch
56 lines (50 loc) · 1.71 KB
/
astyle-2.05.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
55
56
diff --git a/build/gcc/Makefile b/build/gcc/Makefile
index b1af4c1..1dfa021 100755
--- a/build/gcc/Makefile
+++ b/build/gcc/Makefile
@@ -34,15 +34,15 @@ objdir = obj
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)
@@ -134,13 +134,13 @@ astyled: $(OBJd)
shared: libastyle-2.05.1.so
libastyle-2.05.1.so: $(OBJs)
@ mkdir -p $(bindir)
- $(CXX) -shared $(LDFLAGSr) -o $(bindir)/$@ $^
+ $(CXX) -shared -Wl,-soname,$@ $(LDFLAGSr) -o $(bindir)/$@ $^
@ echo
shareddebug: libastyle-2.05.1d.so
libastyle-2.05.1d.so: $(OBJsd)
@ mkdir -p $(bindir)
- $(CXX) -shared $(LDFLAGSd) -o $(bindir)/$@ $^
+ $(CXX) -shared -Wl,-soname,$@ $(LDFLAGSr) -o $(bindir)/$@ $^
@ echo
static: libastyle.a
@@ -158,13 +158,13 @@ libastyled.a: $(OBJad)
java: libastyle-2.05.1j.so
libastyle-2.05.1j.so: $(OBJsj)
@ mkdir -p $(bindir)
- $(CXX) -shared $(LDFLAGSr) -o $(bindir)/$@ $^
+ $(CXX) -shared -Wl,-soname,$@ $(LDFLAGSr) -o $(bindir)/$@ $^
@ echo
javadebug: libastyle-2.05.1jd.so
libastyle-2.05.1jd.so: $(OBJsjd)
@ mkdir -p $(bindir)
- $(CXX) -shared $(LDFLAGSd) -o $(bindir)/$@ $^
+ $(CXX) -shared -Wl,-soname,$@ $(LDFLAGSr) -o $(bindir)/$@ $^
@ echo
all: release debug shared shareddebug static staticdebug