about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorPjotr Prins2018-09-15 11:59:49 +0000
committerPjotr Prins2018-09-15 11:59:49 +0000
commit10cc3c77d5f6d385807f019b7894d4b87820cab4 (patch)
tree5e818f61a2dd7c7d4ce11076e829a6e0d75917d3 /Makefile
parent74fdcbcb6fa579f788e4bdadaf004c752349fcf7 (diff)
downloadpangemma-10cc3c77d5f6d385807f019b7894d4b87820cab4.tar.gz
Using Guix container to build with gcc and clang
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 047911f..97bbc68 100644
--- a/Makefile
+++ b/Makefile
@@ -76,15 +76,15 @@ ifeq ($(SYS), WIN)
 else
   OPENBLAS_INCLUDE_PATH = /usr/local/opt/openblas/include
   ifeq ($(SYS), MAC)
-  EIGEN_INCLUDE_PATH = /usr/local/include/eigen3
+    EIGEN_INCLUDE_PATH = /usr/local/include/eigen3
   else
-  EIGEN_INCLUDE_PATH = /usr/include/eigen3
+    EIGEN_INCLUDE_PATH = /usr/include/eigen3
   endif
   ifdef GUIX
     # Effectively disable paths for GNU Guix
     OPENBLAS_INCLUDE_PATH = .
     EIGEN_INCLUDE_PATH = $(GUIX)/include/eigen3
-    RPATH = -Xlinker --rpath=$(GUIX)/lib
+    # RPATH = -Xlinker --rpath=$(GUIX)/lib
     PROFILE =$(realpath $(GUIX))
   endif
 endif
@@ -106,7 +106,8 @@ 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$(EIGEN_INCLUDE_PATH) -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
+  GCC_FLAGS=-O3 -std=c++11 -isystem$(OPENBLAS_INCLUDE_PATH) -isystem$(EIGEN_INCLUDE_PATH) -Wl,-L/usr/local/opt/openblas/lib
 endif
 
 ifdef WITH_OPENBLAS
@@ -119,6 +120,11 @@ ifdef WITH_OPENBLAS
   endif
 endif
 
+ifeq ($(CXX), clang++)
+  # CPPFLAGS += -isystem$(GUIX)/include/c++ -isystem$(GUIX)/include/c++/x86_64-unknown-linux-gnu
+  CPPFLAGS += -I$(GUIX)/include/c++ -I$(GUIX)/include/c++/x86_64-unknown-linux-gnu -L$(GUIX)/lib
+endif
+
 ifdef DEBUG
   CPPFLAGS += -g -Og $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -isystem$(EIGEN_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc $(RPATH)
 else