only build matcaffe as part of 'make everything' if MATLAB_DIR is set
authorJeff Donahue <jeff.donahue@gmail.com>
Tue, 30 Dec 2014 09:31:46 +0000 (01:31 -0800)
committerJeff Donahue <jeff.donahue@gmail.com>
Tue, 30 Dec 2014 09:36:58 +0000 (01:36 -0800)
Makefile

index ea97392..6361305 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -346,6 +346,13 @@ PYTHON_LDFLAGS := $(LDFLAGS) $(foreach library,$(PYTHON_LIBRARIES),-l$(library))
 # default behavior of 'find'.
 SUPERCLEAN_EXTS := .so .a .o .bin .testbin .pb.cc .pb.h _pb2.py .cuo
 
+# Set the sub-targets of the 'everything' target.
+EVERYTHING_TARGETS := all py$(PROJECT) test warn lint runtest
+# Only build matcaffe as part of "everything" if MATLAB_DIR is specified.
+ifneq ($(MATLAB_DIR),)
+       EVERYTHING_TARGETS += mat$(PROJECT)
+endif
+
 ##############################
 # Define build targets
 ##############################
@@ -355,7 +362,7 @@ SUPERCLEAN_EXTS := .so .a .o .bin .testbin .pb.cc .pb.h _pb2.py .cuo
 
 all: $(STATIC_NAME) $(DYNAMIC_NAME) tools examples
 
-everything: all py$(PROJECT) mat$(PROJECT) test warn lint runtest
+everything: $(EVERYTHING_TARGETS)
 
 linecount:
        cloc --read-lang-def=$(PROJECT).cloc \