# Generic Makefile for GEMMA # # Supported platforms # # Unix / Linux LNX (default) # Mac MAC # # Compilation options # static compilation FORCE_STATIC # # Examples: # # Make GEMMA on Linux with OPENBLAS support: # # make WITH_OPENBLAS=1 # # Disable debug info and checks (slightly faster release mode) # # make WITH_OPENBLAS=1 DEBUG= # # Force static compilation # # make FORCE_STATIC=1 # # Run tests with # # make check # # See also the INSTALL.md document in the source tree at # # https://github.com/genetics-statistics/GEMMA/blob/master/INSTALL.md # Set this variable to either LNX or MAC SYS = MAC # LNX|MAC (Linux is the default) # Leave blank after "=" to disable; put "= 1" to enable DIST_NAME = gemma-0.97.2 DEBUG = # DEBUG mode, set DEBUG= for a release SHOW_COMPILER_WARNINGS = WITH_LAPACK = 1 WITH_OPENBLAS = # Defaults to LAPACK - OPENBLAS may be faster FORCE_STATIC = # Static linking of libraries GCC_FLAGS = -O3 -I/usr/local/Cellar/gsl/2.4/include -I./eigen TRAVIS_CI = # used by TRAVIS for testing EIGEN_INCLUDE_PATH= CXX = g++ # -------------------------------------------------------------------- # Edit below this line with caution # -------------------------------------------------------------------- BIN_DIR = ./bin SRC_DIR = ./src TEST_SRC_DIR = ./test/src ifdef CXX # CXX defined in environment CPP = $(CXX) CC = $(CXX) else CPP = g++ endif ifdef OPENBLAS WITH_LAPACK = # OPENBLAS usually includes LAPACK endif ifdef DEBUG CPPFLAGS = -g $(GCC_FLAGS) -std=gnu++11 -isystem/$(EIGEN_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc else # release mode CPPFLAGS = -DNDEBUG $(GCC_FLAGS) -std=gnu++11 -isystem/$(EIGEN_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc endif ifdef SHOW_COMPILER_WARNINGS CPPFLAGS += -Wall endif OUTPUT = $(BIN_DIR)/gemma SOURCES = $(SRC_DIR)/main.cpp HDR = # Detailed libary paths, D for dynamic and S for static LIBS += -framework Accelerate \ /usr/local/opt/zlib/lib/libz.a \ /usr/local/Cellar/gsl/2.4/lib/libgsl.a \ /usr/local/Cellar/gsl/2.4/lib/libgslcblas.a HDR = $(wildcard src/*.h) SOURCES = $(wildcard src/*.cpp) # all OBJS = $(SOURCES:.cpp=.o) all: $(OUTPUT)