summaryrefslogtreecommitdiff
path: root/sci-biology/pals/files/pals-1.0-fix-build-system.patch
blob: a020a697f85b120e9fb34854e4b4a782b8e8aaae (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,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)