]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/caffe-jacinto.git/commitdiff
Makefile py 3
authorSergei Nikolaev <snikolaev@nvidia.com>
Sun, 7 Jan 2018 03:09:08 +0000 (19:09 -0800)
committerSergei Nikolaev <snikolaev@nvidia.com>
Sun, 7 Jan 2018 03:09:08 +0000 (19:09 -0800)
Makefile

index 3dcb7b23c6b9da9444c659968c407cc378ee173d..a89fdb33cbf07e3853e185042484fc92a80590cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -222,7 +222,16 @@ ifeq ($(USE_OPENCV), 1)
        endif
                
 endif
-PYTHON_LIBRARIES ?= boost_python python2.7 boost_regex
+
+python_version_full := $(wordlist 2,4,$(subst ., ,$(shell python --version 2>&1)))
+python_version_major := $(word 1,${python_version_full})
+python_version_minor := $(word 2,${python_version_full})
+python_version_patch := $(word 3,${python_version_full})
+ifeq ($(python_version_major), 3)
+       python_lib_suffix := m
+endif
+
+PYTHON_LIBRARIES ?= boost_python python${python_version_major}.${python_version_minor}${python_lib_suffix} boost_regex
 WARNINGS := -Wall -Wno-sign-compare
 
 ##############################