summaryrefslogtreecommitdiff
blob: 3e290ece4e78557776c8d9c546f97677a09c66b3 (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
--- a/native/Makefile	2016-03-16 14:37:28.000000000 +0000
+++ b/native/Makefile	2016-04-16 22:27:06.426345376 +0100
@@ -81,7 +81,7 @@
 LIBSFX=.so
 ARSFX=.a
 JNISFX=$(LIBSFX)
-CC=gcc
+CC?=gcc
 LD=$(CC)
 LIBS=
 # Default to Sun recommendations for JNI compilation
@@ -94,10 +94,10 @@
 COUT=-o $@
 CINCLUDES=$(JAVA_INCLUDES) -I"$(JAVAH)" -I$(FFI_BUILD)/include
 CDEFINES=-D_REENTRANT
-PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
-CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
+PCFLAGS=-Wall -Wno-unused -Wno-parentheses
+CFLAGS+= $(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
        -DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
-LDFLAGS=-o $@ -shared
+LDFLAGS+= -o $@ -shared
 ifeq ($(DYNAMIC_LIBFFI),true)
 CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
 LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi)