aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPjotr Prins2017-08-14 07:43:07 +0000
committerPjotr Prins2017-08-14 08:23:14 +0000
commitff1252fe3db1ba639fe148f45b0408a4f182da0d (patch)
treee11ee6858159b53b2570273f9ba3d1ac882232f7 /Makefile
parent3763f477e17a74942e1bf545aa9493d39bf9448e (diff)
downloadpangemma-ff1252fe3db1ba639fe148f45b0408a4f182da0d.tar.gz
Tests and fixes https://github.com/genetics-statistics/GEMMA/issues/26
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 12 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 1983148..875573c 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,9 @@ WITH_OPENBLAS =
NO_INTEL_COMPAT =
FORCE_32BIT =
FORCE_DYNAMIC =
+GCC_FLAGS = -O3 # extra flags -Wl,--allow-multiple-definition
DIST_NAME = gemma-0.97.1
+TRAVIS_CI =
# --------------------------------------------------------------------
# Edit below this line with caution
@@ -36,11 +38,10 @@ else
endif
ifdef DEBUG
- # development mode
- CPPFLAGS = -g -O3 -std=gnu++11 -isystem/$(EIGEN_INCLUDE_PATH)
+ CPPFLAGS = -g $(GCC_FLAGS) -std=gnu++11 -isystem/$(EIGEN_INCLUDE_PATH)
else
- # release
- CPPFLAGS = -DNDEBUG -O3 -std=gnu++11 -isystem/$(EIGEN_INCLUDE_PATH)
+ # release mode
+ CPPFLAGS = -DNDEBUG $(GCC_FLAGS) -std=gnu++11 -isystem/$(EIGEN_INCLUDE_PATH)
endif
ifdef SHOW_COMPILER_WARNINGS
@@ -50,7 +51,9 @@ endif
ifdef FORCE_DYNAMIC
LIBS = -lgsl -lgslcblas -pthread -lz
else
- LIBS = -lgsl -lgslcblas -pthread -lz
+ ifndef TRAVIS_CI # Travis static compile we cheat a little
+ CPPFLAGS += -static
+ endif
endif
OUTPUT = $(BIN_DIR)/gemma
@@ -65,8 +68,10 @@ LIBS_LNX_D_LAPACK = -llapack
LIBS_LNX_D_BLAS = -lblas
LIBS_LNX_D_OPENBLAS = -lopenblas
LIBS_MAC_D_LAPACK = -framework Veclib
+# LIBS_LNX_S_LAPACK = /usr/lib/libgsl.a /usr/lib/libgslcblas.a /usr/lib/lapack/liblapack.a -lz
LIBS_LNX_S_LAPACK = /usr/lib/lapack/liblapack.a -lgfortran /usr/lib/atlas-base/libatlas.a /usr/lib/libblas/libblas.a -Wl,--allow-multiple-definition
+
SOURCES += $(SRC_DIR)/param.cpp $(SRC_DIR)/gemma.cpp $(SRC_DIR)/io.cpp $(SRC_DIR)/lm.cpp $(SRC_DIR)/lmm.cpp $(SRC_DIR)/vc.cpp $(SRC_DIR)/mvlmm.cpp $(SRC_DIR)/bslmm.cpp $(SRC_DIR)/prdt.cpp $(SRC_DIR)/mathfunc.cpp $(SRC_DIR)/gzstream.cpp $(SRC_DIR)/eigenlib.cpp $(SRC_DIR)/ldr.cpp $(SRC_DIR)/bslmmdap.cpp $(SRC_DIR)/logistic.cpp $(SRC_DIR)/varcov.cpp
HDR += $(SRC_DIR)/param.h $(SRC_DIR)/gemma.h $(SRC_DIR)/io.h $(SRC_DIR)/lm.h $(SRC_DIR)/lmm.h $(SRC_DIR)/vc.h $(SRC_DIR)/mvlmm.h $(SRC_DIR)/bslmm.h $(SRC_DIR)/prdt.h $(SRC_DIR)/mathfunc.h $(SRC_DIR)/gzstream.h $(SRC_DIR)/eigenlib.h
@@ -82,6 +87,8 @@ else
LIBS += $(LIBS_LNX_D_BLAS)
endif
LIBS += $(LIBS_LNX_D_LAPACK)
+ else
+ LIBS += $(LIBS_LNX_S_LAPACK)
endif
endif
SOURCES += $(SRC_DIR)/lapack.cpp
@@ -97,11 +104,6 @@ ifdef NO_INTEL_COMPAT
endif
endif
-ifdef FORCE_DYNAMIC
-else
- CPPFLAGS += -static
-endif
-
# all
OBJS = $(SOURCES:.cpp=.o)