blob: 3754f80a93465bdbd1fb550f64cae5a8ffacd5e5 (
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
|
Make build system honour user variables
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,4 @@
-CFLAGS = -O3 -funroll-loops -Winline -DNDEBUG=1
-#CFLAGS = -O3 -funroll-loops -Winline
-LDLIBS = -lm -static
-# LDLIBS = -lm
+LDLIBS = -lm
OBJ = .o
EXE =
@@ -9,17 +6,13 @@
RM = rm -f
CP = cp
-GPP = g++
-LD = $(GPP) $(CFLAGS)
-CPP = $(GPP) -c $(CFLAGS)
-
all: pilercr
CPPSRC = $(sort $(wildcard *.cpp))
CPPOBJ = $(subst .cpp,.o,$(CPPSRC))
-$(CPPOBJ): %.o: %.cpp
- $(CPP) $< -o $@
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -DNDEBUG $(CPPFLAGS) -c $< -o $@
pilercr: $(CPPOBJ)
- $(LD) -o pilercr $(CPPOBJ) $(LDLIBS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o pilercr $(CPPOBJ) $(LDLIBS)
|