From 19c61bdfc196b8987f291306d70a5c158b623c41 Mon Sep 17 00:00:00 2001 From: Blista Kanjo Date: Wed, 26 Jun 2024 07:24:44 -0400 Subject: refactor: make `Makefile`s more compatible with other distros --- .local/share/python-rainfall/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.local/share/python-rainfall/Makefile') diff --git a/.local/share/python-rainfall/Makefile b/.local/share/python-rainfall/Makefile index 567100b..63c96df 100644 --- a/.local/share/python-rainfall/Makefile +++ b/.local/share/python-rainfall/Makefile @@ -1,3 +1,4 @@ compile: cython3 --embed -o rainfall.c -X language_level=3 rainfall.py - gcc -march=native -O2 -pipe -fno-plt -I /usr/include/python3.12 -o rainfall rainfall.c -lpython3.12 -lpthread -lm -lutil -ldl + PYTHON_VERSION=`ls /usr/include | grep -o 'python[3-9]\+\.[0-9]\+'` ; \ + gcc -march=native -O2 -pipe -fno-plt -I /usr/include/$$PYTHON_VERSION -o rainfall rainfall.c -l$$PYTHON_VERSION -lpthread -lm -lutil -ldl -- cgit v1.2.3