aboutsummaryrefslogtreecommitdiffstats
path: root/config.mk
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-10-22 20:47:49 +0200
committerMattias Andrée <maandree@kth.se>2019-10-22 20:48:13 +0200
commit6aeb2443f562c9b879009137c4aa92cfd592a93e (patch)
treeb8e1a7028b0472fbd88019a2b9325024038443e3 /config.mk
parentFix Python 3.7 compatility (diff)
downloadpylibcoopgamma-6aeb2443f562c9b879009137c4aa92cfd592a93e.tar.gz
pylibcoopgamma-6aeb2443f562c9b879009137c4aa92cfd592a93e.tar.bz2
pylibcoopgamma-6aeb2443f562c9b879009137c4aa92cfd592a93e.tar.xz
Change license, flat file hier, do not use gpp, join .py and .pyx, simpler makefile1.1.2
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'config.mk')
-rw-r--r--config.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/config.mk b/config.mk
new file mode 100644
index 0000000..610ba13
--- /dev/null
+++ b/config.mk
@@ -0,0 +1,16 @@
+PREFIX = /usr
+
+PY_MAJOR = $$($(PYTHON) --version 2>&1 | cut -d ' ' -f 2 | cut -d . -f 1)
+PY_MINOR = $$($(PYTHON) --version 2>&1 | cut -d ' ' -f 2 | cut -d . -f 2)
+PY_VER = $(PY_MAJOR)$(PY_MINOR)
+PY_VERSION = $(PY_MAJOR).$(PY_MINOR)
+
+PYTHONDIR = $(PREFIX)/lib/python$(PY_VERSION)
+
+CYTHON = cython
+PKGCONFIG = pkg-config
+PYTHON = python3
+
+CPPFLAGS =
+CFLAGS = -std=c99 -Wall $$($(PKGCONFIG) --cflags python$(PY_MAJOR)) -O2
+LDFLAGS = $$($(PKGCONFIG) --libs python$(PY_MAJOR)) -lcoopgamma