aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2022-10-17 17:15:03 +0200
committerIgor Pashev <pashev.igor@gmail.com>2022-10-17 17:15:03 +0200
commited749ed4553ac266fa8fdaf7d758f577563fd393 (patch)
tree93f11c5015bc7dc891a10da5c7ba90941f65dd32 /Makefile
parentff86e0ee5bf9cafdea3e656fcae10a78f3c9d182 (diff)
downloadmendeleev-ed749ed4553ac266fa8fdaf7d758f577563fd393.tar.gz
Add nuitka
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 16 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index c2abbd8..1bc79ff 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,8 @@ BINARIES := \
mendeleev-c \
mendeleev-c-cpp \
mendeleev-f \
- mendeleev-hs
+ mendeleev-hs \
+ mendeleev-py \
SCRIPTS := \
python2:mendeleev.py \
@@ -50,12 +51,6 @@ prof: \
GMON_OUT_PREFIX=$<-gmon ./$< $(PROF_TEST) > /dev/null
$(MV) $<-gmon.* $@
-prof-mendeleev-py.dat: mendeleev.py
- python3 -m cProfile -o $@ $< $(PROF_TEST) > /dev/null
-
-prof-mendeleev-py.txt: prof-mendeleev-py.dat
- python3 -c 'import pstats; pstats.Stats("$<").sort_stats("tottime").print_stats()' > $@
-
# C
CC = gcc
@@ -106,3 +101,17 @@ prof-mendeleev-hs.txt: prof-mendeleev-hs
./$< +RTS -p -RTS $(PROF_TEST) > /dev/null
$(MV) $<.prof $@
+# Python
+NUITKA = nuitka3
+NUITKA_FLAGS = --quiet --remove-output --follow-imports
+mendeleev-py: mendeleev.py
+ $(NUITKA) $(NUITKA_FLAGS) $< -o $@
+
+prof-mendeleev-py.dat: mendeleev.py
+ python3 -m cProfile -o $@ $< $(PROF_TEST) > /dev/null
+
+prof-mendeleev-py.txt: prof-mendeleev-py.dat
+ python3 -c 'import pstats; pstats.Stats("$<").sort_stats("tottime").print_stats()' > $@
+
+
+