-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
61 lines (57 loc) · 1.94 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
57
58
59
60
61
#####################################################################################
#
# A top Makefile for building my project.
# One needs to define $LITE_FMWK_BASEDIR to build the sub directories.
#
#####################################################################################
#
# IMPOSE CONDITION BETWEEN LITE_FMWK_BASEDIR & PWD =>
# do not compile if PWD !=$LITE_FMWK_BASEDIR is set elsewhere
#
ifndef LITE_FMWK_BASEDIR
LITE_FMWK_BASEDIR := $(shell cd . && pwd -P)
endif
NORMALIZED_LITE_FMWK_BASEDIR := $(shell cd ${LITE_FMWK_BASEDIR} && pwd -P)
ifneq ($(NORMALIZED_LITE_FMWK_BASEDIR), $(shell cd . && pwd -P))
ifneq ($(wildcard ./PMTDecoder/*),)
ERROR_MESSAGE := $(error Your source code detected in current dir, but LITE_FMWK_BASEDIR is not current dir. \
To avoid recompiling the wrong installation,\
LITE_FMWK_BASEDIR must be set to the current directory when making. \
Currently it is set to ${LITE_FMWK_BASEDIR} [$(NORMALIZED_LITE_FMWK_BASEDIR)]. \
Current directory is $(shell pwd).)
endif
endif
export LITE_FMWK_BASEDIR
all:
@mkdir -p $(LITE_FMWK_BASEDIR)/lib
@echo "Start building core"
@make --directory=$(LITE_FMWK_COREDIR)
@echo
@echo "Start building main"
@make --directory=$(LITE_FMWK_BASEDIR)/main
@echo
@echo "Exiting"
clean:
@echo "Cleaning core"
@make clean --directory=$(LITE_FMWK_COREDIR)
@echo
@echo "Cleaning main"
@make clean --directory=$(LITE_FMWK_BASEDIR)/main
@echo
@echo "Cleaning lib"
@rm -f $(LITE_FMWK_LIBDIR)/*.so
@rm -f $(LITE_FMWK_LIBDIR)/*.rootmap
@echo
@echo "Exiting"
#####################################################################################
#
# DOCUMENTATION...
#
doxygen:
@echo 'dOxygenising your code...'
@doxygen $(LITE_FMWK_BASEDIR)/doc/doxygenMyProject.script
doxygen+:
@echo 'dOxygenising MyProject + local-ROOT...'
@doxygen $(LITE_FMWK_BASEDIR)/doc/doxygenMyProject+.script
#
#####################################################################################