forked from cms-gem-daq-project/cmsgemos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
123 lines (91 loc) · 3.05 KB
/
Makefile
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#
# Global Makefile for GEM
#
SUBPACKAGES := \
gemutils \
gembase \
gemhardware \
gemreadout \
gemsupervisor \
gemHwMonitor \
SUBPACKAGES.DEBUG := $(patsubst %,%.debug, ${SUBPACKAGES})
SUBPACKAGES.INSTALL := $(patsubst %,%.install, ${SUBPACKAGES})
SUBPACKAGES.RPM := $(patsubst %,%.rpm, ${SUBPACKAGES})
SUBPACKAGES.CLEANRPM := $(patsubst %,%.cleanrpm, ${SUBPACKAGES})
SUBPACKAGES.CLEAN := $(patsubst %,%.clean, ${SUBPACKAGES})
#OS:=linux
#ARCH:=x86_64
#LIBDIR:=lib/$(OS)/$(ARCH)
default: all
all: $(SUBPACKAGES)
release: all doc
gcc47: UserCFlags+=${GCC47Flags}
gcc47: UserCCFlags+=${GCC47Flags}
gcc47: $(SUBPACKAGES)
gcc48: UserCFlags+=${GCC47Flags}
gcc48: UserCFlags+=${GCC48Flags}
gcc48: UserCCFlags+=${GCC47Flags}
gcc48: UserCCFlags+=${GCC48Flags}
gcc48: $(SUBPACKAGES)
gcc49: UserCFlags+=${GCC47Flags}
gcc49: UserCFlags+=${GCC48Flags}
gcc49: UserCFlags+=${GCC49Flags}
gcc49: UserCCFlags+=${GCC47Flags}
gcc49: UserCCFlags+=${GCC48Flags}
gcc49: UserCCFlags+=${GCC49Flags}
gcc49: $(SUBPACKAGES)
debug: UserCFlags+=${DEBUG_CFlags}
debug: UserCCFlags+=${DEBUG_CCFlags}
debug: $(SUBPACKAGES)
profile: UserCFlags+=${PROFILING_Flags}
profile: UserCCFlags+=${PROFILING_Flags}
profile: UserDynamicLinkFlags+=${PROFILING_LDFlags}
profile: DependentLibraries+=${PROFILING_LIBS}
profile: $(SUBPACKAGES)
dbgprofile: UserCFlags+=${DEBUG_CFlags} ${PROFILING_Flags}
dbgprofile: UserCCFlags+=${DEBUG_CCFlags} ${PROFILING_Flags}
dbgprofile: UserDynamicLinkFlags+=${PROFILING_LDFlags}
dbgprofile: DependentLibraries+=${PROFILING_LIBS}
dbgprofile: $(SUBPACKAGES)
doc: $(SUBPACKAGES)
@echo "Generating doxygen"
@rm -fr ./doc/html 2> /dev/null
@doxygen -s ./doc/cmsgemos.cfg > /dev/null 2>&1
#@git checkout gh-pages > /dev/null 2>&1
#@git add -f ./doc/html > /dev/null 2>&1
#@git commit -m "generating doxygen" ./doc/html > /dev/null 2>&1
#@git tag ./doc/html > /dev/null 2>&1
install: $(LIBDIR) $(SUBPACKAGES) $(SUBPACKAGES.INSTALL)
rpm: $(SUBPACKAGES) $(SUBPACKAGES.RPM)
cleanrpm: $(SUBPACKAGES.CLEANRPM)
clean: $(SUBPACKAGES.CLEAN)
$(LIBDIR):
mkdir -p $(LIBDIR)
$(SUBPACKAGES):
$(MAKE) -C $@
$(SUBPACKAGES.RPM):
$(MAKE) -C $(patsubst %.rpm,%, $@) rpm
$(SUBPACKAGES.CLEANRPM):
$(MAKE) -C $(patsubst %.cleanrpm,%, $@) cleanrpm
$(SUBPACKAGES.INSTALL):
-find $(patsubst %.install,%, $@)/lib -name *.so -print -exec cp {} ${LIBDIR} \;
$(SUBPACKAGES.CLEAN):
$(MAKE) -C $(patsubst %.clean,%, $@) clean
.PHONY: $(SUBPACKAGES) $(SUBPACKAGES.INSTALL) $(SUBPACKAGES.CLEAN)
gemHwMonitor: gemutils gembase gemhardware
gemhardware: gemutils gembase gemreadout
gembase: gemutils
gemsupervisor: gemutils gembase gemhardware gemreadout
gemutils:
gemreadout: gemutils gembase
print-env:
@echo BUILD_HOME $(BUILD_HOME)
@echo XDAQ_ROOT $(XDAQ_ROOT)
@echo XDAQ_OS $(XDAQ_OS)
@echo XDAQ_PLATFORM $(XDAQ_PLATFORM)
@echo LIBDIR $(LIBDIR)
@echo ROOTCFLAGS $(ROOTCFLAGS)
@echo ROOTLIBS $(ROOTLIBS)
@echo ROOTGLIBS $(ROOTGLIBS)
@echo GIT_VERSION $(GIT_VERSION)
@echo GEMDEVLOPER $(GEMDEVLOPER)