You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
681 B
35 lines
681 B
Make build system honour user variables
|
|
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -1,6 +1,4 @@
|
|
-CFLAGS = -O3 -march=pentiumpro -mcpu=pentiumpro -funroll-loops -Winline -DNDEBUG=1
|
|
-LDLIBS = -lm -static
|
|
-# LDLIBS = -lm
|
|
+LDLIBS = -lm
|
|
|
|
OBJ = .o
|
|
EXE =
|
|
@@ -8,18 +6,13 @@
|
|
RM = rm -f
|
|
CP = cp
|
|
|
|
-GPP = g++
|
|
-LD = $(GPP) $(CFLAGS)
|
|
-CPP = $(GPP) -c $(CFLAGS)
|
|
-CC = gcc -c $(CFLAGS)
|
|
-
|
|
all: pals
|
|
|
|
CPPSRC = $(sort $(wildcard *.cpp))
|
|
CPPOBJ = $(subst .cpp,.o,$(CPPSRC))
|
|
|
|
-$(CPPOBJ): %.o: %.cpp
|
|
- $(CPP) $< -o $@
|
|
+%.o: %.cpp
|
|
+ $(CXX) $(CXXFLAGS) -DNDEBUG $(CPPFLAGS) -c $< -o $@
|
|
|
|
pals: $(CPPOBJ)
|
|
- $(LD) -o pals $(CPPOBJ) $(LDLIBS)
|
|
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o pals $(CPPOBJ) $(LDLIBS)
|