summaryrefslogtreecommitdiff
blob: 6b2f0f1bd2018d2503ade50a936b07afd268ceab (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
Fix build with --as-needed, respect CXX, CXXFLAGS

http://www.mothur.org/forum/viewtopic.php?f=4&t=590
http://bugs.gentoo.org/show_bug.cgi?id=339753

--- makefile
+++ makefile
@@ -11,7 +11,7 @@
 
 # Optimize to level 3:
 
-CXXFLAGS += -O3
+#CXXFLAGS += -O3
 
 MOTHUR_FILES = "\"Enter_your_default_path_here\""
 
@@ -49,7 +49,7 @@
 
 ifeq  ($(strip $(USEREADLINE)),yes)
     CXXFLAGS += -DUSE_READLINE
-    LDFLAGS += \
+    LIBS = \
       -lreadline\
       -lncurses
 endif
@@ -57,7 +57,7 @@
 USEMPI ?= no
 
 ifeq  ($(strip $(USEMPI)),yes)
-    CXX = mpic++
+#    CXX = mpic++
     CXXFLAGS += -DUSE_MPI
 endif
 
@@ -74,7 +74,7 @@
 OBJECTS=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
 
 mothur : $(OBJECTS)
-	$(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS)
+	$(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)
 
 install : mothur
 	cp mothur ../Release/mothur