summaryrefslogtreecommitdiff
blob: b7a24a1b6e942ce0050637ff61813579d3f9122d (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
Author: Nils Freydank <holgersson@posteo.de>
Date:   Fri Nov 17 20:30:00 2017 +0100

Respect CFLAGS, CPPFLAGS etc. This patch is inspired
by hasufell’s patch.

--- a/Makefile  2017-03-31 11:08:58.419210817 +0200
+++ b/Makefile	2017-11-17 20:30:00.000000000 +0100
@@ -223,7 +223,7 @@
 ifndef USE_ALTGAMMA
   # Clearskies - X11-based gamma for Linux
   USE_ALTGAMMA=1
-endif
+  endif
 
 ifndef USE_SKEETMOD
   USE_SKEETMOD=0
@@ -306,34 +306,33 @@
 CLIENT_EXTRA_FILES=
 
 ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
-  BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
-    -pipe -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\"
+  BASE_CFLAGS = -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\"
   CLIENT_CFLAGS += $(SDL_CFLAGS)
 
-  OPTIMIZEVM = -O3
-  OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+  OPTIMIZEVM =
+  OPTIMIZE = $(OPTIMIZEVM)
 
   ifeq ($(ARCH),x86_64)
-    OPTIMIZEVM = -O3
-    OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+    OPTIMIZEVM =
+    OPTIMIZE = $(OPTIMIZEVM)
     HAVE_VM_COMPILED = true
   else
   ifeq ($(ARCH),x86)
-    OPTIMIZEVM = -O3 -march=i586
-    OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+    OPTIMIZEVM =
+    OPTIMIZE = $(OPTIMIZEVM)
     HAVE_VM_COMPILED=true
   else
   ifeq ($(ARCH),ppc)
-    BASE_CFLAGS += -maltivec
+    BASE_CFLAGS +=
     HAVE_VM_COMPILED=true
   endif
   ifeq ($(ARCH),ppc64)
-    BASE_CFLAGS += -maltivec
+    BASE_CFLAGS +=
     HAVE_VM_COMPILED=true
   endif
   ifeq ($(ARCH),sparc)
-    OPTIMIZE += -mtune=ultrasparc3 -mv8plus
-    OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus
+    OPTIMIZE +=
+    OPTIMIZEVM +=
     HAVE_VM_COMPILED=true
   endif
   ifeq ($(ARCH),armv7l)
@@ -1124,7 +1123,7 @@
 
 define DO_CC
 $(echo_cmd) "CC $<"
-$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
+$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CPPFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $<
 endef
 
 define DO_REF_CC