summarylogtreecommitdiffstats
path: root/Makefile.config
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.config')
-rw-r--r--Makefile.config12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile.config b/Makefile.config
index a9a8f31bac7b..3b8fd75b2012 100644
--- a/Makefile.config
+++ b/Makefile.config
@@ -1,14 +1,18 @@
+_PYVER := $(shell python -c 'import sys; print("%s.%s" %sys.version_info[0:2])')
+_PYMAJ := $(shell python -c 'import sys; print("%s" %sys.version_info[0])')
+_OCVMAJ := $(shell opencv_version | awk -F'.' '{ print $1 }')
+
CPU_ONLY := 1
USE_OPENCV := 1
USE_LEVELDB := 1
USE_LMDB := 1
-OPENCV_VERSION := 3
+OPENCV_VERSION := $(_OCVMAJ)
BLAS := open
BLAS_INCLUDE := /usr/include
BLAS_LIB := /usr/lib
-PYTHON_LIBRARIES := boost_python3 python3.7m
-PYTHON_INCLUDE := /usr/include/python3.7m \
- /usr/lib/python3.7/site-packages/numpy/core/include
+PYTHON_LIBRARIES := boost_python$(_PYMAJ) python$(_PYVER)m
+PYTHON_INCLUDE := /usr/include/python$(_PYVER)m \
+ /usr/lib/python$(_PYVER)/site-packages/numpy/core/include
PYTHON_LIB := /usr/lib
WITH_PYTHON_LAYER := 1
INCLUDE_DIRS := $(PYTHON_INCLUDE)