Skip to content

Commit

Permalink
Fix for conda recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebionne committed Jul 16, 2020
1 parent e0cc552 commit c60504d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ PGPLOTDIR = /usr/local/pgplot
DISLIN = /usr/local/dislin
GSLDIR = /usr/local/lib
CGRAPHDIR = /usr/local/lib
BINDIR = /home/gwyndaf/bin
INCLUDE = /usr/local/pgplot
X11LIBDIR = /usr/X11R6/lib
######################################
Expand All @@ -27,6 +26,10 @@ PGLIBS = -lcpgplot -lpgplot
DISLINLIBS= -ldislnc
EXE = chooch-$(VERSION).$(ARCH)
EXEPG = chooch-$(VERSION)-pg.$(ARCH)

PYTHON_INCLUDE_DIR ?= $(shell python -c 'from distutils.sysconfig import get_python_inc; print(get_python_inc())')
PYTHON_DEST_DIR ?= $(shell python -c 'import site; print(site.getsitepackages())')

#
# How to compile and link
#
Expand Down Expand Up @@ -68,9 +71,8 @@ chooch-with-pgplot : clean ${OBJECTS} Makefile
#
all: chooch chooch-pg
#
install :
$(MV) $(EXE) $(BINDIR)
$(MV) $(EXEPG) $(BINDIR)
install : pychooch
$(MV) PyChooch.so $(PYTHON_DEST_DIR)
#
clean :
${RM} -f *.o
Expand Down
10 changes: 2 additions & 8 deletions Makefile.Linux
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
FOPTIM = -O2
FFLAGS = $(FOPTIM)
#LDFLAGS = -static -L$(PGPLOTDIR) $(PGLIBS) -L$(X11LIBDIR) -L$(GSLDIR) \
# -L$(CGRAPHDIR) -L$(DISLIN) $(DISLINLIBS) $(CGRAPH) $(LIBS) -lm -ldl -lpthread
LDFLAGS=-L$(GSLDIR) $(LIBS) -lm -ldl -lpthread -L$(CONDA_PREFIX)/lib -L$(CONDA_PREFIX)/lib
CFLAGS = -fPIC -I$(CONDA_PREFIX)/include -I$(CONDA_PREFIX)/include/python3.7m
FC = g77
CC = gcc
LDFLAGS = $(LIBS) -lm -ldl -lpthread -L$(PREFIX)/lib
CFLAGS = -fPIC -I$(PREFIX)/include -I$(PYTHON_INCLUDE_DIR)

0 comments on commit c60504d

Please sign in to comment.