diff options
author | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:41:40 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-09-16 18:41:40 +0200 |
commit | 189ad13fcf1c8e264ef51f978dd86bdd108e3a1b (patch) | |
tree | 36df7c1514c859e1300b6ad609f9ff7a1a8ed3f2 /config.mk | |
parent | some improvments + license change (diff) | |
download | python-bus-189ad13fcf1c8e264ef51f978dd86bdd108e3a1b.tar.gz python-bus-189ad13fcf1c8e264ef51f978dd86bdd108e3a1b.tar.bz2 python-bus-189ad13fcf1c8e264ef51f978dd86bdd108e3a1b.tar.xz |
Improve makefile3.1.3
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | config.mk | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1,10 +1,16 @@ -PREFIX = /usr/local +PREFIX = /usr MANPREFIX = $(PREFIX)/share/man PYTHONDIR = $(PREFIX)/lib/python$(PY_MAJOR).$(PY_MINOR) +PYTHONPKGDIR = $(PYTHONDIR)/site-packages + +CC = cc +CYTHON = cython +PYTHON = python$(PY_VERSION) CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOUCE -D_XOPEN_SOURCE=700 -CFLAGS = -std=c99 -O2 $$(pkg-config --cflags python$(PY_MAJOR)) $(CPPFLAGS) +CFLAGS = -std=c99 -O2 $$(pkg-config --cflags python$(PY_MAJOR)) LDFLAGS = -s $$(pkg-config --libs python$(PY_MAJOR)) -lbus -CYTHON = cython -PYTHON = python$(PY_MAJOR) +PY_MAJOR = $$(python --version 2>&1 | cut -d . -f 1 | cut -d ' ' -f 2) +PY_MINOR = $$(python$(PYTHON_MAJOR) --version 2>&1 | cut -d . -f 2) +PY_VERSION = $(PY_MAJOR).$(PY_MINOR) |