From 55e5aa2374574aff19ce28c1c6ed84df18eb139b Mon Sep 17 00:00:00 2001 From: Jonathan L Long Date: Fri, 9 Jan 2015 22:57:26 -0800 Subject: [PATCH] add WITH_PYTHON_LAYER build option to include Python layer Currently, this will only work when running from pycaffe (but not the tool binary), due to static linking conflicts with registration. --- Makefile | 6 ++++++ Makefile.config.example | 3 +++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index ba60ae9..254f7fe 100644 --- a/Makefile +++ b/Makefile @@ -288,6 +288,12 @@ ifeq ($(CPU_ONLY), 1) COMMON_FLAGS += -DCPU_ONLY endif +# Python layer support +ifeq ($(WITH_PYTHON_LAYER), 1) + COMMON_FLAGS += -DWITH_PYTHON_LAYER + LIBRARIES += $(PYTHON_LIBRARIES) +endif + # BLAS configuration (default = ATLAS) BLAS ?= atlas ifeq ($(BLAS), mkl) diff --git a/Makefile.config.example b/Makefile.config.example index 9d13b45..7a8aafd 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -57,6 +57,9 @@ PYTHON_INCLUDE := /usr/include/python2.7 \ PYTHON_LIB := /usr/lib # PYTHON_LIB := $(ANACONDA_HOME)/lib +# Uncomment to support layers written in Python (will link against Python libs) +# WITH_PYTHON_LAYER := 1 + # Whatever else you find you need goes here. INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib -- 2.7.4