https://github.com/SModelS/smodels
Raw File
Tip revision: e12013f9e1d7de0fe921cab5544e7669388bd0e9 authored by Wolfgang Waltenberger on 03 June 2018, 09:53:18 UTC
113rc2
Tip revision: e12013f
Makefile
python_version_full := $(wordlist 2,4,$(subst ., ,$(shell python --version 2>&1)))
python_version_major := $(word 1,${python_version_full})
python_version_minor := $(word 2,${python_version_full})
libpython := -lpython$(python_version_major).$(python_version_minor)
LDFLAGS := $(shell python-config --ldflags)
#LIBDIR := $(shell python-config --prefix)
#CFLAGS := $(shell python-config --cflags)
#EXECPATH := $(shell python-config --exec-prefix)/lib/python$(python_version_major).$(python_version_minor)

GCC=g++

all: library exe

library:
	$(GCC) SModelS.cc -I. $(LDFLAGS) $(libpython) -shared -fPIC -o libSModelS.so

exe:
	## run.cpp is meant as an example, tweak the code and integrate it in your framework!
	$(GCC) run.cpp -I. -Wl,-rpath,`pwd` -L. -o run -ldl -lpthread -lutil -l SModelS
	## done. now adapt parameters.ini and execute ./run

.PHONY:
back to top