зеркало из https://github.com/microsoft/caffe.git
matcaffe fixes
This commit is contained in:
Родитель
48994cf0dd
Коммит
abf44a6174
17
Makefile
17
Makefile
|
@ -1,11 +1,8 @@
|
||||||
# The makefile for caffe. Pretty hacky.
|
# The makefile for caffe. Pretty hacky.
|
||||||
PROJECT := caffe
|
PROJECT := caffe
|
||||||
|
|
||||||
include Makefile.config
|
CONFIG_FILE := Makefile.config
|
||||||
|
include $(CONFIG_FILE)
|
||||||
##############################################################################
|
|
||||||
# After this line, things should happen automatically.
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
# The target static library and shared library name
|
# The target static library and shared library name
|
||||||
LIB_BUILD_DIR := $(BUILD_DIR)/lib
|
LIB_BUILD_DIR := $(BUILD_DIR)/lib
|
||||||
|
@ -58,7 +55,10 @@ PY$(PROJECT)_SRC := python/$(PROJECT)/_$(PROJECT).cpp
|
||||||
PY$(PROJECT)_SO := python/$(PROJECT)/_$(PROJECT).so
|
PY$(PROJECT)_SO := python/$(PROJECT)/_$(PROJECT).so
|
||||||
# MAT$(PROJECT)_SRC is the matlab wrapper for $(PROJECT)
|
# MAT$(PROJECT)_SRC is the matlab wrapper for $(PROJECT)
|
||||||
MAT$(PROJECT)_SRC := matlab/$(PROJECT)/mat$(PROJECT).cpp
|
MAT$(PROJECT)_SRC := matlab/$(PROJECT)/mat$(PROJECT).cpp
|
||||||
MAT$(PROJECT)_SO := matlab/$(PROJECT)/$(PROJECT)
|
ifneq ($(MATLAB_DIR),)
|
||||||
|
MAT_SO_EXT := $(shell $(MATLAB_DIR)/bin/mexext)
|
||||||
|
endif
|
||||||
|
MAT$(PROJECT)_SO := matlab/$(PROJECT)/$(PROJECT).$(MAT_SO_EXT)
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
# Derive generated files
|
# Derive generated files
|
||||||
|
@ -220,6 +220,11 @@ mat$(PROJECT): mat
|
||||||
mat: $(MAT$(PROJECT)_SO)
|
mat: $(MAT$(PROJECT)_SO)
|
||||||
|
|
||||||
$(MAT$(PROJECT)_SO): $(MAT$(PROJECT)_SRC) $(STATIC_NAME)
|
$(MAT$(PROJECT)_SO): $(MAT$(PROJECT)_SRC) $(STATIC_NAME)
|
||||||
|
@ if [ -z "$(MATLAB_DIR)" ]; then \
|
||||||
|
echo "MATLAB_DIR must be specified in $(CONFIG_FILE)" \
|
||||||
|
"to build mat$(PROJECT)."; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
$(MATLAB_DIR)/bin/mex $(MAT$(PROJECT)_SRC) $(STATIC_NAME) \
|
$(MATLAB_DIR)/bin/mex $(MAT$(PROJECT)_SRC) $(STATIC_NAME) \
|
||||||
CXXFLAGS="\$$CXXFLAGS $(CXXFLAGS) $(WARNINGS)" \
|
CXXFLAGS="\$$CXXFLAGS $(CXXFLAGS) $(WARNINGS)" \
|
||||||
CXXLIBS="\$$CXXLIBS $(LDFLAGS)" -o $@
|
CXXLIBS="\$$CXXLIBS $(LDFLAGS)" -o $@
|
||||||
|
|
Загрузка…
Ссылка в новой задаче