1 |
#***************************************************************************** |
2 |
# |
3 |
# FILE NAME: $Id: Makefile,v 1.4 2008/09/23 11:06:38 mocchiut Exp $ |
4 |
# VERSION: |
5 |
# AUTHOR: Nergal S.r.l. |
6 |
# DATE: |
7 |
# |
8 |
# DESCRIPTION: base Makefile |
9 |
# |
10 |
# REVISION HISTORY: |
11 |
# |
12 |
# Version Date Author Change Description |
13 |
# |
14 |
#*****************************************************************************/ |
15 |
|
16 |
|
17 |
#------------------------------------------------------------------------------ |
18 |
include $(BASEDIR)/event/Make.def |
19 |
#------------------------------------------------------------------------------ |
20 |
|
21 |
CFLAGS += -I $(EVNT_DIR_INC) -I $(ROOT_DIR_INC) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DPIC |
22 |
|
23 |
ROOTEVENTDICT = EventDict |
24 |
|
25 |
CXXSRCS = NullAlgorithm.cpp \ |
26 |
yodaversion.cpp \ |
27 |
PamelaRun.cpp \ |
28 |
RunInfoYoda.cpp \ |
29 |
$(ROOTEVENTDICT).cpp \ |
30 |
SubPacket.cpp \ |
31 |
PacketType.cpp \ |
32 |
SubDetector.cpp \ |
33 |
Algorithm.cpp \ |
34 |
AlgorithmInfo.cpp \ |
35 |
EventHeader.cpp \ |
36 |
PscuHeader.cpp \ |
37 |
EventCounter.cpp \ |
38 |
PscuEvent.cpp \ |
39 |
CalibCalPulse1Event.cpp \ |
40 |
CalibCalPulse2Event.cpp \ |
41 |
CalibTrkBothEvent.cpp \ |
42 |
CalibTrk1Event.cpp \ |
43 |
CalibTrk2Event.cpp \ |
44 |
CalibTofEvent.cpp \ |
45 |
CalibS4Event.cpp \ |
46 |
CalibCalPedEvent.cpp \ |
47 |
Calib1_Ac1Event.cpp \ |
48 |
Calib1_Ac2Event.cpp \ |
49 |
Calib2_Ac1Event.cpp \ |
50 |
Calib2_Ac2Event.cpp \ |
51 |
CalibCalEvent.cpp \ |
52 |
RunHeaderEvent.cpp \ |
53 |
RunTrailerEvent.cpp \ |
54 |
CalibHeaderEvent.cpp \ |
55 |
CalibTrailerEvent.cpp \ |
56 |
InitHeaderEvent.cpp \ |
57 |
InitTrailerEvent.cpp \ |
58 |
EventTrkEvent.cpp \ |
59 |
ForcedFECmdEvent.cpp \ |
60 |
Ac1InitEvent.cpp \ |
61 |
CalInitEvent.cpp \ |
62 |
TrkInitEvent.cpp \ |
63 |
TofInitEvent.cpp \ |
64 |
TrgInitEvent.cpp \ |
65 |
NdInitEvent.cpp \ |
66 |
S4InitEvent.cpp \ |
67 |
Ac2InitEvent.cpp \ |
68 |
CalAlarmEvent.cpp \ |
69 |
Ac1AlarmEvent.cpp \ |
70 |
TrkAlarmEvent.cpp \ |
71 |
TrgAlarmEvent.cpp \ |
72 |
TofAlarmEvent.cpp \ |
73 |
S4AlarmEvent.cpp \ |
74 |
Ac2AlarmEvent.cpp \ |
75 |
|
76 |
CSRCS= CRC.c \ |
77 |
DirectoryStructure.c |
78 |
|
79 |
|
80 |
#------------------------------------------------------------------------------ |
81 |
|
82 |
TARGETLIB = $(EVNT_A) |
83 |
|
84 |
#------------------------------------------------------------------------------ |
85 |
|
86 |
|
87 |
all: dynamic static |
88 |
|
89 |
|
90 |
dynamic: libyoda.so.0.0.0 |
91 |
ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\ |
92 |
ln -sf libyoda.so.0.0.0 libyoda.so |
93 |
|
94 |
|
95 |
static: libyoda.a |
96 |
|
97 |
libyoda.so.0.0.0: $(TARGETLIB) $(EXTLIB) |
98 |
$(CXX) \ |
99 |
$(PAM_BIT) -o $@ \ |
100 |
-shared -nostdlib \ |
101 |
-Wl,-soname \ |
102 |
-Wl,libyoda.so.0 \ |
103 |
-Wl,--whole-archive \ |
104 |
$^ \ |
105 |
-Wl,--no-whole-archive |
106 |
|
107 |
|
108 |
libyoda.a: $(TARGETLIB) $(EXTLIB) |
109 |
cd $(OBJDIR) ; \ |
110 |
pwd ;\ |
111 |
for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ |
112 |
$(AR) -x $$sub_lib ; \ |
113 |
done ;\ |
114 |
$(AR) -scrv libyoda.a *.o |
115 |
|
116 |
|
117 |
$(TARGETLIB) : ${OBJS} |
118 |
$(AR) -scrv $@ $? |
119 |
|
120 |
$(EXTLIB): $(EXTDIR) |
121 |
for sub_dir in $(EXTDIR) ; do \ |
122 |
$(MAKE) -C $$sub_dir libs ; \ |
123 |
done |
124 |
|
125 |
SUBPACKET_HEADER_FILES = \ |
126 |
|
127 |
INCLUDES = -I. -I$(ROOT_DIR)/include |
128 |
DICT_HEADER_FILES = \ |
129 |
PamelaRun.h yodaversion.h RunInfoYoda.h \ |
130 |
SubPacket.h PacketType.h SubDetector.h \ |
131 |
DirectoryStructure.h Algorithm.h AlgorithmInfo.h \ |
132 |
EventHeader.h PscuHeader.h EventCounter.h \ |
133 |
endrun/PhysEndRunEvent.h \ |
134 |
endrun/CaloEndRun.h \ |
135 |
endrun/TBEndRun.h \ |
136 |
log/LogEvent.h log/LogRecord.h \ |
137 |
varDump/VarDumpEvent.h varDump/VarDumpRecord.h \ |
138 |
arrDump/ArrDumpEvent.h arrDump/ArrDumpRecord.h \ |
139 |
tabDump/TabDumpEvent.h tabDump/TabDumpRecord.h \ |
140 |
tmtc/TmtcEvent.h tmtc/TmtcRecord.h \ |
141 |
mcmd/McmdEvent.h mcmd/McmdRecord.h \ |
142 |
physics/neutronDetector/NeutronEvent.h \ |
143 |
physics/neutronDetector/NeutronRecord.h \ |
144 |
physics/anticounter/AnticounterEvent.h \ |
145 |
physics/calorimeter/CalorimeterEvent.h \ |
146 |
physics/S4/S4Event.h \ |
147 |
physics/tof/TofEvent.h \ |
148 |
physics/tracker/TrackerEvent.h \ |
149 |
physics/trigger/TriggerEvent.h \ |
150 |
tsbt/TsbTEvent.h tsbt/TsbTRecord.h \ |
151 |
tsbb/TsbBEvent.h tsbb/TsbBRecord.h \ |
152 |
PscuEvent.h \ |
153 |
CalibCalPulse1Event.h \ |
154 |
CalibCalPulse2Event.h \ |
155 |
CalibTrkBothEvent.h \ |
156 |
CalibTrk1Event.h \ |
157 |
CalibTrk2Event.h \ |
158 |
CalibTofEvent.h \ |
159 |
CalibS4Event.h \ |
160 |
CalibCalPedEvent.h \ |
161 |
Calib1_Ac1Event.h \ |
162 |
Calib2_Ac1Event.h \ |
163 |
Calib1_Ac2Event.h \ |
164 |
Calib2_Ac2Event.h \ |
165 |
CalibCalEvent.h \ |
166 |
RunHeaderEvent.h \ |
167 |
RunTrailerEvent.h \ |
168 |
CalibHeaderEvent.h \ |
169 |
CalibTrailerEvent.h \ |
170 |
InitHeaderEvent.h \ |
171 |
InitTrailerEvent.h \ |
172 |
EventTrkEvent.h \ |
173 |
ForcedFECmdEvent.h \ |
174 |
Ac1InitEvent.h \ |
175 |
CalInitEvent.h \ |
176 |
TrkInitEvent.h \ |
177 |
TofInitEvent.h \ |
178 |
TrgInitEvent.h \ |
179 |
NdInitEvent.h \ |
180 |
S4InitEvent.h \ |
181 |
Ac2InitEvent.h \ |
182 |
CalAlarmEvent.h \ |
183 |
Ac1AlarmEvent.h \ |
184 |
TrkAlarmEvent.h \ |
185 |
TrgAlarmEvent.h \ |
186 |
TofAlarmEvent.h \ |
187 |
S4AlarmEvent.h \ |
188 |
Ac2AlarmEvent.h \ |
189 |
CRC.h \ |
190 |
Exception.h \ |
191 |
LinkDef.h |
192 |
|
193 |
$(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES} |
194 |
echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\ |
195 |
LD_LIBRARY_PATH=$(ROOT_LIB) $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
196 |
|
197 |
clean: clean-subdir |
198 |
rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* |
199 |
|
200 |
clean-subdir: $(EXTDIR) |
201 |
for sub_dir in $(EXTDIR) ; do \ |
202 |
$(MAKE) -C $$sub_dir clean ; \ |
203 |
done |
204 |
|
205 |
distclean: distclean-sub distclean-subdir clean |
206 |
rm -f $(ROOTEVENTDICT).{cpp,h} |
207 |
|
208 |
distclean-subdir: |
209 |
for sub_dir in $(EXTDIR) ; do \ |
210 |
$(MAKE) -C $$sub_dir distclean-sub ; \ |
211 |
done |
212 |
|
213 |
|
214 |
-include $(DEPEND) |
215 |
|
216 |
|
217 |
#------------------------------------------------------------------------------ |
218 |
include $(BASEDIR)/event/Make.def.post |
219 |
#------------------------------------------------------------------------------ |