From 226cf0404334a01a2c756b8ad1009cf5e35e1f63 Mon Sep 17 00:00:00 2001 From: Fernando Date: Mon, 15 Aug 2022 17:03:26 -0300 Subject: [PATCH] BUG: Fix conda installation when compiler is installed in environment. --- Makefile | 6 ++++-- python_package/Makefile | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ccdd95d..ad5c2e4 100644 --- a/Makefile +++ b/Makefile @@ -63,8 +63,10 @@ BINSOURCES_CPP = exec.cpp \ AUXFILES = VERSION -LIBS = -lgsl -lgslcblas -lpthread -lm -INC = -I./include +LIBS = $(shell gsl-config --libs) +LIBS += -lpthread +INC = $(shell gsl-config --cflags) +INC += -I./include ifeq ($(CONDA_PREFIX),) PREFIX = /usr/local diff --git a/python_package/Makefile b/python_package/Makefile index fcaba77..06edce0 100644 --- a/python_package/Makefile +++ b/python_package/Makefile @@ -26,8 +26,10 @@ NUMPY_VERSION := $(shell $(PYTHON) -c "import numpy; print(numpy.__version__)") OBJECTS = $(WRAPPEROBJS) $(INTERFACEOBJS) CPPFLAGS = -std=c++11 -fPIC $(OPT_FLAG) -LIBS = -lgsl -lblas -L../build -ltrackcpp -INC = -I../include $(PYTHON_INCLUDES) $(NUMPY_INCLUDE) +LIBS = $(shell gsl-config --libs) +LIBS += -L../build -ltrackcpp +INC = $(shell gsl-config --cflags) +INC += -I../include $(PYTHON_INCLUDES) $(NUMPY_INCLUDE) INTERFACESRCS = $(INTERFACEOBJS:.o=.cpp) INTERFACEHDRS = $(INTERFACEOBJS:.o=.h)