Updated makefile.

This commit is contained in:
Isse
2024-11-27 10:24:41 +01:00
parent 2e3fa26fef
commit 6e1ed43ff1

View File

@ -2,12 +2,13 @@
FLAGS = -fPIC -O3 -march=native -Wall -Werror -flto -fopenmp -fopenmp-simd
# The Python interface through SWIG
PYTHONI = -I/usr/include/python3.8/
PYTHON_VERSION = $(shell python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}");')
PYTHONI = -I/usr/include/python$(PYTHON_VERSION)/
PYTHONL = -Xlinker -export-dynamic
# Default super-target
all:
cd ../rpt/ && g++ $(FLAGS) -std=c++2a -I/usr/include/opencv4 -c *.cpp ; cd ../swig/
cd ../rpt/ && g++ $(FLAGS) -std=c++2a -isystem /usr/include/opencv4/ -c *.cpp ; cd ../swig/
swig -c++ -python -keyword -o rpt_wrap.cxx rpt.i
g++ $(FLAGS) $(PYTHONI) -c rpt_wrap.cxx -o rpt_wrap.o
g++ $(FLAGS) $(PYTHONL) -shared ../rpt/*.o rpt_wrap.o -lopencv_core -lopencv_imgproc -lopencv_calib3d -o _rpt.so