diff options
author | Pjotr Prins | 2018-06-29 12:56:08 +0000 |
---|---|---|
committer | Pjotr Prins | 2018-06-29 12:56:08 +0000 |
commit | 1c2dbad9b627b67ff91158480335d499106b4e50 (patch) | |
tree | 6554e972f830de5e377b45d8d9d07b9612edee12 /Makefile | |
parent | cee92876e456299e14afd51e0b719384c48c5286 (diff) | |
parent | 9f9887eb5befe025e85641f1930e46e5e6a25e56 (diff) | |
download | pangemma-1c2dbad9b627b67ff91158480335d499106b4e50.tar.gz |
Fix conflict
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 36 insertions, 8 deletions
@@ -41,7 +41,19 @@ GEMMA_VERSION = $(shell cat ./VERSION) # Set this variable to either LNX or MAC -SYS = LNX # LNX|MAC (Linux is the default) +ifeq ($(OS),Windows_NT) + SYS = WIN + VGEN = scripts/gen_version_info.cmd +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Darwin) + SYS = MAC + else + SYS = LNX # default to linux + endif + VGEN = scripts/gen_version_info.sh +endif + # Leave blank after "=" to disable; put "= 1" to enable DIST_NAME = gemma-$(GEMMA_VERSION) DEBUG = 1 # DEBUG mode, set DEBUG=0 for a release @@ -53,8 +65,20 @@ OPENBLAS_LEGACY = # Using older OpenBlas FORCE_STATIC = # Static linking of libraries GCC_FLAGS = -Wall -O3 -std=gnu++11 # extra flags -Wl,--allow-multiple-definition TRAVIS_CI = # used by TRAVIS for testing -EIGEN_INCLUDE_PATH = /usr/include/eigen3 -OPENBLAS_INCLUDE_PATH = /usr/local/opt/openblas/include + +GSL_INCLUDE_PATH = +ifeq ($(SYS), WIN) + GSL_INCLUDE_PATH = -isystemc:/MinGW/include -LC:/MinGW/lib + EIGEN_INCLUDE_PATH = ../eigen-git-mirror + OPENBLAS_INCLUDE_PATH = ../OpenBLAS-v0.2.19-Win64-int32/include -L../OpenBLAS-v0.2.19-Win64-int32/lib +else + OPENBLAS_INCLUDE_PATH = /usr/local/opt/openblas/include + ifeq ($(SYS), MAC) + EIGEN_INCLUDE_PATH = /usr/local/include/eigen3 + else + EIGEN_INCLUDE_PATH = /usr/include/eigen3 + endif +endif # -------------------------------------------------------------------- # Edit below this line with caution @@ -73,13 +97,13 @@ endif ifeq ($(CPP), clang++) # macOS Homebrew settings (as used on Travis-CI) - GCC_FLAGS=-O3 -std=c++11 -stdlib=libc++ -isystem/$(OPENBLAS_INCLUDE_PATH) -isystem//usr/local/include/eigen3 -Wl,-L/usr/local/opt/openblas/lib + GCC_FLAGS=-O3 -std=c++11 -stdlib=libc++ -isystem$(OPENBLAS_INCLUDE_PATH) -isystem$(EIGEN_INCLUDE_PATH) -Wl,-L/usr/local/opt/openblas/lib endif ifdef WITH_OPENBLAS OPENBLAS=1 # WITH_LAPACK = # OPENBLAS usually includes LAPACK - CPPFLAGS += -DOPENBLAS -isystem/$(OPENBLAS_INCLUDE_PATH) + CPPFLAGS += -DOPENBLAS -isystem$(OPENBLAS_INCLUDE_PATH) ifdef OPENBLAS_LEGACY # Legacy version (mostly for Travis-CI) CPPFLAGS += -DOPENBLAS_LEGACY @@ -87,10 +111,14 @@ ifdef WITH_OPENBLAS endif ifdef DEBUG - CPPFLAGS += -g $(GCC_FLAGS) -isystem/$(EIGEN_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc + CPPFLAGS += -g $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -isystem$(EIGEN_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc else # release mode - CPPFLAGS += -DNDEBUG $(GCC_FLAGS) -isystem/$(EIGEN_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc + CPPFLAGS += -DNDEBUG $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -isystem$(EIGEN_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc +endif + +ifeq ($(SYS), WIN) + CPPFLAGS += -Duint="unsigned int" -D__CRT__NO_INLINE -D__STRING="__STRINGIFY" -DWINDOWS -DWITH_GSLCBLAS=1 endif ifdef SHOW_COMPILER_WARNINGS @@ -149,7 +177,7 @@ OBJS = $(SOURCES:.cpp=.o) all: $(OUTPUT) ./src/version.h: ./VERSION - ./scripts/gen_version_info.sh > src/version.h + $(VGEN) > src/version.h $(OUTPUT): $(OBJS) $(CPP) $(CPPFLAGS) $(OBJS) $(LIBS) -o $(OUTPUT) |