forked from cms-gem-daq-project/cmsgemos
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
143 lines (106 loc) · 3.48 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#
# Global Makefile for GEM
#
SUBPACKAGES := \
gemutils \
gembase \
gemhardware \
gemreadout \
gemsupervisor \
gempython \
# 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)
.PHONY: doc cleandoc
doc:
$(MAKE) -C $@ docs
cleandoc:
$(MAKE) -C doc cleanall
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)
.phony: gemhwmanagers gemhwdevices
gemhwdevices: gemutils
$(MAKE) -C $(BUILD_HOME)/cmsgemos/gemhardware -f Makefile devices
gemhwmanagers: gemutils gembase gemreadout gemhwdevices
$(MAKE) -C $(BUILD_HOME)/cmsgemos/gemhardware -f Makefile managers
gemhardware: gemhwdevices gemhwmanagers
gemHwMonitor: gemutils gembase gemhwdevices
## only gemhardware.devices... how to fix this?
gempython: gemhwdevices
gembase: gemutils
gemsupervisor: gemutils gembase gemhardware gemreadout
gemutils:
gemreadout: gemutils gembase gemhwdevices
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)
@echo CC $(CC)
@echo CPP $(CPP)
@echo CXX $(CXX)
@echo LD $(LD)
@echo AR $(AR)
@echo NM $(NM)
@echo RANLIB $(RANLIB)
@echo GCCVERSION $(GCCVERSION)
@echo CLANGVERSION $(CLANGVERSION)
@echo DependentLibraryDirs $(DependentLibraryDirs)