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.
gentoo-overlay/sci-biology/piler/files/piler-1.0-fix-build-system....

35 lines
685 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: piler
CPPSRC = $(sort $(wildcard *.cpp))
CPPOBJ = $(subst .cpp,.o,$(CPPSRC))
-$(CPPOBJ): %.o: %.cpp
- $(CPP) $< -o $@
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -DNDEBUG $(CPPFLAGS) -c $< -o $@
piler: $(CPPOBJ)
- $(LD) -o piler $(CPPOBJ) $(LDLIBS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o piler $(CPPOBJ) $(LDLIBS)