aboutsummaryrefslogtreecommitdiff
blob: 64fa893a4336b35261e6995697432152e3039a6a (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
 Makefile |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 6d5d68f..30a1019 100644
--- a/Makefile
+++ b/Makefile
@@ -11,23 +11,23 @@ SYSTYPE :=     $(shell uname)
 
 # C compiler
 
-CC      := g++
-CFLAGS  = -O2 -Wall ${SEARCHDIRS} -fno-exceptions -fno-rtti -fno-strict-aliasing -D_REENTRANT
+CXX      ?= g++
+CXXFLAGS  += -Wall ${SEARCHDIRS} -fno-exceptions -fno-rtti -fno-strict-aliasing -D_REENTRANT
 
 %.o : %.c
-	${CC} ${CFLAGS} -c $< -o $@
+	${CXX} ${CXXFLAGS} -c $< -o $@
 
-%.o : %.cc
-	${CC} ${CFLAGS} -c $< -o $@
+%.o : %.CXX
+	${CXX} ${CXXFLAGS} -c $< -o $@
 
 %.o : %.C
-	${CC} ${CFLAGS} -c $< -o $@
+	${CXX} ${CXXFLAGS} -c $< -o $@
 
 %.o : %.cpp
-	${CC} ${CFLAGS} -c $< -o $@
+	${CXX} ${CXXFLAGS} -c $< -o $@
 
 %.o : %.cxx
-	${CC} ${CFLAGS} -c $< -o $@
+	${CXX} ${CXXFLAGS} -c $< -o $@
 
 # C/C++ linker
 
@@ -39,7 +39,7 @@ LOADLIBES :=
 all:    nrcl
 
 nrcl:  ./nrcl.o ${GCLDIR}/GBase.o ${GCLDIR}/GStr.o ${GCLDIR}/GArgs.o
-	${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}
+	${CXX} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}
 
 # target for removing all object files