From 9dcbadac655a18d5da42857341b3517d1055c8dd Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 1 Jul 2023 20:04:46 +0200 Subject: Fix and improve makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- config.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'config.mk') diff --git a/config.mk b/config.mk index 9838819..514c92c 100644 --- a/config.mk +++ b/config.mk @@ -1,16 +1,16 @@ PREFIX = /usr MANPREFIX = $(PREFIX)/share/man -PYTHONDIR = $(PREFIX)/lib/python$(PY_MAJOR).$(PY_MINOR) +PYTHONDIR = $(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR) PYTHONPKGDIR = $(PYTHONDIR)/site-packages CC = cc -CYTHON = cython -PYTHON = python$(PY_VERSION) +CYTHON = cython$(PYTHON_MAJOR) +PYTHON = python$(PYTHON_VERSION) CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOUCE -D_XOPEN_SOURCE=700 -CFLAGS = -std=c99 -O2 $$(pkg-config --cflags python$(PY_MAJOR)) -LDFLAGS = -s $$(pkg-config --libs python$(PY_MAJOR)) -lbus +CFLAGS = -std=c99 -O2 $$(pkg-config --cflags python$(PYTHON_MAJOR)) +LDFLAGS = -s $$(pkg-config --libs python$(PYTHON_MAJOR)) -lbus -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) +PYTHON_MAJOR = $$(python --version 2>&1 | cut -d ' ' -f 2 | cut -d . -f 1) +PYTHON_MINOR = $$(python$(PYTHON_MAJOR) --version 2>&1 | cut -d . -f 2) +PYTHON_VERSION = $(PYTHON_MAJOR).$(PYTHON_MINOR) -- cgit v1.2.3-70-g09d2