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