summaryrefslogtreecommitdiff
blob: 9af21ba83d4b14f8bf0ef21a0a587c146befe524 (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
diff --git a/src/native/Makefile b/src/native/Makefile
index 679adb7..a1f2a6a 100644
--- a/src/native/Makefile
+++ b/src/native/Makefile
@@ -51,11 +51,11 @@ JavaEditline_LIBS = -ledit -ltermcap
 ifeq (cygwin,$(WIN32))
 JavaGetline_LIBS = -lcygwin
 endif
-CC = gcc
+CC ?= gcc
 OBJ_EXT := o
 LIB_PRE := lib
 LIB_EXT := so
-CFLAGS=-fPIC -DPOSIX
+CFLAGS += -fPIC -DPOSIX
 endif
 
 
@@ -97,7 +97,7 @@ ifeq (CYGWIN,$(WIN32))
 	$(CC) -W1,$(ROOTDIR)/lib$(TG).exp -o $@ \
 		$(OBJECTS) -W1,-e,_readline_init@12
 else
-	$(CC) -shared $(OBJECTS) $(LIBPATH) $($(TG)_LIBS) -o $@
+	$(CC) -shared $(LDFLAGS) $(OBJECTS) $(LIBPATH) $($(TG)_LIBS) -o $@
 endif
 endif