-
Notifications
You must be signed in to change notification settings - Fork 2
/
GNUmakefile
56 lines (52 loc) · 2.1 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
54
55
56
#####################################################################################
#
# A top Makefile for building my project.
# One needs to define $LARLITE_USERDEVDIR environment variable and set it to where this
# makefile exists.
# One can type "make" and this builds packages that are added in $SUBDIR defined below.
#
# The original is taken from Glenn A. Smith's example for Double Chooz experiment.
#
#####################################################################################
#
# IMPOSE CONDITION BETWEEN LARLITE_USERDEVDIR & PWD =>
# do not compile if PWD !=$LARLITE_USERDEVDIR is set elsewhere
#
ifndef LARLITE_USERDEVDIR
ERROR_MESSAGE := $(error LARLITE_USERDEVDIR is not defined!)
endif
#
#####################################################################################
#
# Define directories to be compile upon a global "make"...
#
SUBDIRS := Demonstrators #ADD_NEW_SUBDIR ... do not remove this comment from this line
#####################################################################################
#
# COMPILATION...
#
#.phony: all configure default-config clean
.phony: all clean
all:
@for i in $(SUBDIRS); do ( echo "" && echo "Compiling $$i..." && cd $(LARLITE_USERDEVDIR)/Demonstrators/$$i && $(MAKE) ) || exit $$?; done
#####################################################################################
#
# CLEANs...
#
clean:
@for i in $(SUBDIRS); do ( echo "" && echo "Cleaning $$i..." && cd $(LARLITE_USERDEVDIR)/Demonstrators/$$i && $(MAKE) clean && rm -f $(LARLITE_LIBDIR)/$$i.* ) || exit $$?; done
#####################################################################################
#
# DOCUMENTATION...
#
doxygen:
@echo 'dOxygenising your code...'
@mkdir -p $(LARLITE_USERDEVDIR)/Demonstrators/doc/dOxygenMyProject
@doxygen $(LARLITE_USERDEVDIR)/Demonstrators/doc/doxygenMyProject.script
doxygen+:
@echo 'dOxygenising MyProject + local-ROOT...'
@mkdir -p $(LARLITE_USERDEVDIR)/Demonstrators/doc/dOxygenMyProject+
@doxygen $(LARLITE_USERDEVDIR)/Demonstrators/doc/doxygenMyProject+.script
#
#####################################################################################
#EOF