1 |
mocchiut |
1.1 |
#***************************************************************************** |
2 |
|
|
# |
3 |
mocchiut |
1.2 |
# FILE NAME: $Id: Makefile,v 1.1.1.1 2008/09/23 07:19:54 mocchiut Exp $ |
4 |
mocchiut |
1.1 |
# 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 |
mocchiut |
1.2 |
$(PAM_BIT) -o $@ \ |
100 |
mocchiut |
1.1 |
-shared -nostdlib \ |
101 |
|
|
-Wl,-soname \ |
102 |
|
|
-Wl,libyoda.so.0 \ |
103 |
|
|
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crti.o \ |
104 |
|
|
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtbeginS.o \ |
105 |
|
|
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtendS.o \ |
106 |
|
|
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crtn.o \ |
107 |
mocchiut |
1.2 |
-Wl,--whole-archive \ |
108 |
mocchiut |
1.1 |
$^ \ |
109 |
|
|
-Wl,--no-whole-archive |
110 |
|
|
|
111 |
|
|
|
112 |
|
|
libyoda.a: $(TARGETLIB) $(EXTLIB) |
113 |
|
|
cd $(OBJDIR) ; \ |
114 |
|
|
pwd ;\ |
115 |
|
|
for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ |
116 |
|
|
$(AR) -x $$sub_lib ; \ |
117 |
|
|
done ;\ |
118 |
|
|
$(AR) -scrv libyoda.a *.o \ |
119 |
|
|
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crti.o \ |
120 |
|
|
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtbeginS.o \ |
121 |
|
|
/usr/lib/gcc/i386-redhat-linux/3.4.6/crtendS.o \ |
122 |
mocchiut |
1.2 |
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../crtn.o |
123 |
mocchiut |
1.1 |
# $(AR) -scrv libyoda.a *.o |
124 |
|
|
|
125 |
|
|
|
126 |
|
|
$(TARGETLIB) : ${OBJS} |
127 |
|
|
$(AR) -scrv $@ $? |
128 |
|
|
|
129 |
|
|
$(EXTLIB): $(EXTDIR) |
130 |
|
|
for sub_dir in $(EXTDIR) ; do \ |
131 |
|
|
$(MAKE) -C $$sub_dir libs ; \ |
132 |
|
|
done |
133 |
|
|
|
134 |
|
|
SUBPACKET_HEADER_FILES = \ |
135 |
|
|
|
136 |
|
|
INCLUDES = -I. -I$(ROOT_DIR)/include |
137 |
|
|
DICT_HEADER_FILES = \ |
138 |
|
|
PamelaRun.h yodaversion.h RunInfoYoda.h \ |
139 |
|
|
SubPacket.h PacketType.h SubDetector.h \ |
140 |
|
|
DirectoryStructure.h Algorithm.h AlgorithmInfo.h \ |
141 |
|
|
EventHeader.h PscuHeader.h EventCounter.h \ |
142 |
|
|
endrun/PhysEndRunEvent.h \ |
143 |
|
|
endrun/CaloEndRun.h \ |
144 |
|
|
endrun/TBEndRun.h \ |
145 |
|
|
log/LogEvent.h log/LogRecord.h \ |
146 |
|
|
varDump/VarDumpEvent.h varDump/VarDumpRecord.h \ |
147 |
|
|
arrDump/ArrDumpEvent.h arrDump/ArrDumpRecord.h \ |
148 |
|
|
tabDump/TabDumpEvent.h tabDump/TabDumpRecord.h \ |
149 |
|
|
tmtc/TmtcEvent.h tmtc/TmtcRecord.h \ |
150 |
|
|
mcmd/McmdEvent.h mcmd/McmdRecord.h \ |
151 |
|
|
physics/neutronDetector/NeutronEvent.h \ |
152 |
|
|
physics/neutronDetector/NeutronRecord.h \ |
153 |
|
|
physics/anticounter/AnticounterEvent.h \ |
154 |
|
|
physics/calorimeter/CalorimeterEvent.h \ |
155 |
|
|
physics/S4/S4Event.h \ |
156 |
|
|
physics/tof/TofEvent.h \ |
157 |
|
|
physics/tracker/TrackerEvent.h \ |
158 |
|
|
physics/trigger/TriggerEvent.h \ |
159 |
|
|
tsbt/TsbTEvent.h tsbt/TsbTRecord.h \ |
160 |
|
|
tsbb/TsbBEvent.h tsbb/TsbBRecord.h \ |
161 |
|
|
PscuEvent.h \ |
162 |
|
|
CalibCalPulse1Event.h \ |
163 |
|
|
CalibCalPulse2Event.h \ |
164 |
|
|
CalibTrkBothEvent.h \ |
165 |
|
|
CalibTrk1Event.h \ |
166 |
|
|
CalibTrk2Event.h \ |
167 |
|
|
CalibTofEvent.h \ |
168 |
|
|
CalibS4Event.h \ |
169 |
|
|
CalibCalPedEvent.h \ |
170 |
|
|
Calib1_Ac1Event.h \ |
171 |
|
|
Calib2_Ac1Event.h \ |
172 |
|
|
Calib1_Ac2Event.h \ |
173 |
|
|
Calib2_Ac2Event.h \ |
174 |
|
|
CalibCalEvent.h \ |
175 |
|
|
RunHeaderEvent.h \ |
176 |
|
|
RunTrailerEvent.h \ |
177 |
|
|
CalibHeaderEvent.h \ |
178 |
|
|
CalibTrailerEvent.h \ |
179 |
|
|
InitHeaderEvent.h \ |
180 |
|
|
InitTrailerEvent.h \ |
181 |
|
|
EventTrkEvent.h \ |
182 |
|
|
ForcedFECmdEvent.h \ |
183 |
|
|
Ac1InitEvent.h \ |
184 |
|
|
CalInitEvent.h \ |
185 |
|
|
TrkInitEvent.h \ |
186 |
|
|
TofInitEvent.h \ |
187 |
|
|
TrgInitEvent.h \ |
188 |
|
|
NdInitEvent.h \ |
189 |
|
|
S4InitEvent.h \ |
190 |
|
|
Ac2InitEvent.h \ |
191 |
|
|
CalAlarmEvent.h \ |
192 |
|
|
Ac1AlarmEvent.h \ |
193 |
|
|
TrkAlarmEvent.h \ |
194 |
|
|
TrgAlarmEvent.h \ |
195 |
|
|
TofAlarmEvent.h \ |
196 |
|
|
S4AlarmEvent.h \ |
197 |
|
|
Ac2AlarmEvent.h \ |
198 |
|
|
CRC.h \ |
199 |
|
|
Exception.h \ |
200 |
|
|
LinkDef.h |
201 |
|
|
|
202 |
|
|
$(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES} |
203 |
|
|
echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\ |
204 |
|
|
LD_LIBRARY_PATH=$(ROOT_LIB) $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
205 |
|
|
|
206 |
|
|
clean: clean-subdir |
207 |
|
|
rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* |
208 |
|
|
|
209 |
|
|
clean-subdir: $(EXTDIR) |
210 |
|
|
for sub_dir in $(EXTDIR) ; do \ |
211 |
|
|
$(MAKE) -C $$sub_dir clean ; \ |
212 |
|
|
done |
213 |
|
|
|
214 |
|
|
distclean: distclean-sub distclean-subdir clean |
215 |
|
|
rm -f $(ROOTEVENTDICT).{cpp,h} |
216 |
|
|
|
217 |
|
|
distclean-subdir: |
218 |
|
|
for sub_dir in $(EXTDIR) ; do \ |
219 |
|
|
$(MAKE) -C $$sub_dir distclean-sub ; \ |
220 |
|
|
done |
221 |
|
|
|
222 |
|
|
|
223 |
|
|
-include $(DEPEND) |
224 |
|
|
|
225 |
|
|
|
226 |
|
|
#------------------------------------------------------------------------------ |
227 |
|
|
include $(BASEDIR)/event/Make.def.post |
228 |
|
|
#------------------------------------------------------------------------------ |