summarylogtreecommitdiffstats
path: root/0001-Makefile-cflags-and-destdir.patch
blob: f356c6d227713623b6498dfd73fbe3de4b666879 (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
diff --git a/Makefile b/Makefile
index 2cca402..86f4c4e 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ target=$(DESTDIR)$(prefix)
 parsedir:=$(.PARSEDIR)
 srcdir=$(dir $(abspath $(firstword $(MAKEFILE_LIST))))$(parsedir)
 VPATH=$(srcdir)
-mandir?=$(prefix)/share/man
+mandir?=$(DESTDIR)$(prefix)/share/man
 
 INSTALL = install
 TAR = tar
@@ -34,7 +34,7 @@ GCC_WARNINGS1=-Wall -Wpointer-arith -Wstrict-prototypes
 GCC_WARNINGS2=-Wmissing-prototypes -Wmissing-declarations
 GCC_WARNINGS3=-Wno-unused-function -Wno-unused-label -Wno-format-zero-length
 GCC_WARNINGS=$(GCC_WARNINGS1) $(GCC_WARNINGS2) $(GCC_WARNINGS3)
-CFLAGS=$(GCC_WARNINGS)
+CFLAGS+=$(GCC_WARNINGS)
 CPPFLAGS += -I. -I$(srcdir)
 #LIBS=-lrt
 CPPFLAGS += -DVERSION=\"$(VERSION)\"
@@ -44,7 +44,7 @@ CFLAGS += -pthread
 CPPFLAGS += -DTHREADS
 
 # Optimizing for speed. Comment this out for distribution builds
-CFLAGS += -march=native
+# CFLAGS += -march=native
 
 # To enable debugging of the Yacc grammar, uncomment the following line
 #CPPFLAGS += -DYYDEBUG=1
@@ -78,7 +78,7 @@ CPPFLAGS+=-Drestrict=__restrict__
 # CFLAGS += -pg
 # Warning: Using -O3 has been seen to cause core dumps on repositories with
 # very long revision names - some bounds check gets optimized away. Don't do that.
-CFLAGS += -O2
+# CFLAGS += -O2
 # If your toolchain supports link time optimization this is a cheap speedup
 # CFLAGS += -flto
 # CFLAGS += -g