-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathGNUmakefile
53 lines (43 loc) · 1.69 KB
/
GNUmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ifndef LARCV_BASEDIR
ERROR_MESSAGE := $(error LARCV_BASEDIR is not set... run configure.sh!)
endif
ifndef LARCV_PYTHON
ERROR_MESSAGE := $(error LARCV_PYTHON is not set)
endif
OSNAME = $(shell uname -s)
HOST = $(shell uname -n)
OSNAMEMODE = $(OSNAME)
include $(LARCV_BASEDIR)/Makefile/Makefile.${OSNAME}
CORE_SUBDIRS := Base DataFormat Processor CPPUtil
ifeq ($(LARCV_NUMPY),1)
CORE_SUBDIRS += PyUtil
endif
ifeq ($(LARCV_OPENCV),1)
CORE_SUBDIRS += CVUtil
endif
APP_SUBDIRS := Filter ImageAna ImageMod SBNDImageMod ThreadIO Overlay #NextImageMod #Merger
.phony: all clean
all: obj lib
clean: clean_app clean_core
@rm -f $(LARCV_LIBDIR)/liblarcv.so
clean_core:
@for i in $(CORE_SUBDIRS); do ( echo "" && echo "Cleaning $$i..." && cd $(LARCV_COREDIR)/$$i && rm -rf $(LARCV_BUILDDIR)/$$i && rm -rf $(LARCV_BUILDDIR)/lib/*$ii.* ) || exit $$?; done
clean_app:
@for i in $(APP_SUBDIRS); do ( echo "" && echo "Cleaning $$i..." && cd $(LARCV_APPDIR)/$$i && rm -rf $(LARCV_BUILDDIR)/$$i && rm -rf $(LARCV_BUILDDIR)/lib/*$ii.* ) || exit $$?; done
obj:
@echo
@echo Building core...
@echo
@for i in $(CORE_SUBDIRS); do ( echo "" && echo "Compiling $$i..." && cd $(LARCV_COREDIR)/$$i && $(MAKE) ) || exit $$?; done
@echo Building app...
@for i in $(APP_SUBDIRS); do ( echo "" && echo "Compiling $$i..." && cd $(LARCV_APPDIR)/$$i && $(MAKE) ) || exit $$?; done
lib: obj
@echo
@if [ `${LARCV_PYTHON} ${LARCV_BASEDIR}/bin/libarg.py build` ]; then \
echo Linking library...; \
$(SOMAKER) $(SOFLAGS) $(shell ${LARCV_PYTHON} $(LARCV_BASEDIR)/bin/libarg.py); \
else \
echo Nothing to be done for lib...; \
fi
# @$(SOMAKER) $(SOFLAGS) `$(LARCV_PYTHON) $(LARCV_BASEDIR)/bin/libarg.py`;
@echo