/[PAMELA software]/chewbacca/event/Makefile
ViewVC logotype

Contents of /chewbacca/event/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Wed Jul 29 16:13:14 2009 UTC (15 years, 4 months ago) by mocchiut
Branch: MAIN
CVS Tags: v10RED, v9r00, v9r01, HEAD
Changes since 1.13: +3 -2 lines
More compilation bugs fixed

1 #*****************************************************************************
2 #
3 # FILE NAME: $Id: Makefile,v 1.13 2009/07/29 15:47:21 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 ifneq ($(MAKECMDGOALS),distclean)
19 include $(BASEDIR)/event/Make.def
20 endif
21 #------------------------------------------------------------------------------
22
23 CFLAGS += -I $(EVNT_DIR_INC) -I $(ROOT_DIR_INC) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DPIC
24
25 ROOTEVENTDICT = EventDict
26
27 CXXSRCS = NullAlgorithm.cpp \
28 yodaversion.cpp \
29 PamelaRun.cpp \
30 RunInfoYoda.cpp \
31 $(ROOTEVENTDICT).cpp \
32 SubPacket.cpp \
33 PacketType.cpp \
34 SubDetector.cpp \
35 Algorithm.cpp \
36 AlgorithmInfo.cpp \
37 EventHeader.cpp \
38 PscuHeader.cpp \
39 EventCounter.cpp \
40 PscuEvent.cpp \
41 CalibCalPulse1Event.cpp \
42 CalibCalPulse2Event.cpp \
43 CalibTrkBothEvent.cpp \
44 CalibTrk1Event.cpp \
45 CalibTrk2Event.cpp \
46 CalibTofEvent.cpp \
47 CalibS4Event.cpp \
48 CalibCalPedEvent.cpp \
49 Calib1_Ac1Event.cpp \
50 Calib1_Ac2Event.cpp \
51 Calib2_Ac1Event.cpp \
52 Calib2_Ac2Event.cpp \
53 CalibCalEvent.cpp \
54 RunHeaderEvent.cpp \
55 RunTrailerEvent.cpp \
56 CalibHeaderEvent.cpp \
57 CalibTrailerEvent.cpp \
58 InitHeaderEvent.cpp \
59 InitTrailerEvent.cpp \
60 EventTrkEvent.cpp \
61 ForcedFECmdEvent.cpp \
62 Ac1InitEvent.cpp \
63 CalInitEvent.cpp \
64 TrkInitEvent.cpp \
65 TofInitEvent.cpp \
66 TrgInitEvent.cpp \
67 NdInitEvent.cpp \
68 S4InitEvent.cpp \
69 Ac2InitEvent.cpp \
70 CalAlarmEvent.cpp \
71 Ac1AlarmEvent.cpp \
72 TrkAlarmEvent.cpp \
73 TrgAlarmEvent.cpp \
74 TofAlarmEvent.cpp \
75 S4AlarmEvent.cpp \
76 Ac2AlarmEvent.cpp \
77
78 CSRCS= CRC.c \
79 DirectoryStructure.c
80
81
82 #------------------------------------------------------------------------------
83
84 TARGETLIB = $(EVNT_A)
85
86 #------------------------------------------------------------------------------
87
88
89 all: dynamic
90 #static
91
92
93 dynamic: libyoda.so.0.0.0
94 ifeq ($(verbose),)
95 @ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\
96 ln -sf libyoda.so.0.0.0 libyoda.so
97 else
98 ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\
99 ln -sf libyoda.so.0.0.0 libyoda.so
100 endif
101
102 static: libyoda.a
103
104 libyoda.so.0.0.0: $(TARGETLIB) $(EXTLIB)
105 ifeq ($(verbose),)
106 @$(CXX) \
107 $(PAM_BIT) -o $@ \
108 -shared \
109 -Wl,-soname \
110 -Wl,libyoda.so.0 \
111 -Wl,--whole-archive \
112 $^ \
113 -Wl,--no-whole-archive
114 else
115 $(CXX) \
116 $(PAM_BIT) -o $@ \
117 -shared \
118 -Wl,-soname \
119 -Wl,libyoda.so.0 \
120 -Wl,--whole-archive \
121 $^ \
122 -Wl,--no-whole-archive
123 endif
124
125 libyoda.a: $(TARGETLIB) $(EXTLIB)
126 ifeq ($(verbose),)
127 @cd $(OBJDIR) &>/dev/null ; \
128 for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \
129 $(AR) -x $$sub_lib ; \
130 done ;\
131 $(AR) -scrv libyoda.a *.o &>/dev/null
132 else
133 cd $(OBJDIR) ; \
134 pwd ;\
135 for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \
136 $(AR) -x $$sub_lib ; \
137 done ;\
138 $(AR) -scrv libyoda.a *.o
139 endif
140
141 $(TARGETLIB) : ${OBJS}
142 ifeq ($(verbose),)
143 @$(AR) -scrv $@ $? &>/dev/null
144 else
145 $(AR) -scrv $@ $?
146 endif
147
148 $(EXTLIB): $(EXTDIR)
149 ifeq ($(verbose),)
150 @for sub_dir in $(EXTDIR) ; do \
151 (${EGREEN} "Make all in $$sub_dir "; ${RESET});\
152 $(MAKE) -s -C $$sub_dir libs ; \
153 done
154 else
155 for sub_dir in $(EXTDIR) ; do \
156 $(MAKE) -C $$sub_dir libs ; \
157 done
158 endif
159
160 SUBPACKET_HEADER_FILES = \
161
162 INCLUDES = -I. -I$(ROOT_DIR)/include
163 DICT_HEADER_FILES = \
164 PamelaRun.h yodaversion.h RunInfoYoda.h \
165 SubPacket.h PacketType.h SubDetector.h \
166 DirectoryStructure.h Algorithm.h AlgorithmInfo.h \
167 EventHeader.h PscuHeader.h EventCounter.h \
168 endrun/PhysEndRunEvent.h \
169 endrun/CaloEndRun.h \
170 endrun/TBEndRun.h \
171 log/LogEvent.h log/LogRecord.h \
172 varDump/VarDumpEvent.h varDump/VarDumpRecord.h \
173 arrDump/ArrDumpEvent.h arrDump/ArrDumpRecord.h \
174 tabDump/TabDumpEvent.h tabDump/TabDumpRecord.h \
175 tmtc/TmtcEvent.h tmtc/TmtcRecord.h \
176 mcmd/McmdEvent.h mcmd/McmdRecord.h \
177 physics/neutronDetector/NeutronEvent.h \
178 physics/neutronDetector/NeutronRecord.h \
179 physics/anticounter/AnticounterEvent.h \
180 physics/calorimeter/CalorimeterEvent.h \
181 physics/S4/S4Event.h \
182 physics/tof/TofEvent.h \
183 physics/tracker/TrackerEvent.h \
184 physics/trigger/TriggerEvent.h \
185 tsbt/TsbTEvent.h tsbt/TsbTRecord.h \
186 tsbb/TsbBEvent.h tsbb/TsbBRecord.h \
187 PscuEvent.h \
188 CalibCalPulse1Event.h \
189 CalibCalPulse2Event.h \
190 CalibTrkBothEvent.h \
191 CalibTrk1Event.h \
192 CalibTrk2Event.h \
193 CalibTofEvent.h \
194 CalibS4Event.h \
195 CalibCalPedEvent.h \
196 Calib1_Ac1Event.h \
197 Calib2_Ac1Event.h \
198 Calib1_Ac2Event.h \
199 Calib2_Ac2Event.h \
200 CalibCalEvent.h \
201 RunHeaderEvent.h \
202 RunTrailerEvent.h \
203 CalibHeaderEvent.h \
204 CalibTrailerEvent.h \
205 InitHeaderEvent.h \
206 InitTrailerEvent.h \
207 EventTrkEvent.h \
208 ForcedFECmdEvent.h \
209 Ac1InitEvent.h \
210 CalInitEvent.h \
211 TrkInitEvent.h \
212 TofInitEvent.h \
213 TrgInitEvent.h \
214 NdInitEvent.h \
215 S4InitEvent.h \
216 Ac2InitEvent.h \
217 CalAlarmEvent.h \
218 Ac1AlarmEvent.h \
219 TrkAlarmEvent.h \
220 TrgAlarmEvent.h \
221 TofAlarmEvent.h \
222 S4AlarmEvent.h \
223 Ac2AlarmEvent.h \
224 CRC.h \
225 Exception.h \
226 LinkDef.h
227
228 $(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES}
229 ifeq ($(verbose),)
230 @LD_LIBRARY_PATH=$(ROOT_LIB):$(LD_LIBRARY_PATH); $(ROOTCINT) -f $@ -c ${INCLUDES} $^
231 else
232 echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\
233 LD_LIBRARY_PATH=$(ROOT_LIB):$(LD_LIBRARY_PATH); $(ROOTCINT) -f $@ -c ${INCLUDES} $^
234 endif
235
236 clean: clean-subdir
237 ifeq ($(verbose),)
238 @rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda*
239 else
240 rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda*
241 endif
242
243 clean-subdir: $(EXTDIR)
244 ifeq ($(verbose),)
245 @for sub_dir in $(EXTDIR) ; do \
246 $(MAKE) -s -C $$sub_dir clean ; \
247 done
248 else
249 for sub_dir in $(EXTDIR) ; do \
250 $(MAKE) -C $$sub_dir clean ; \
251 done
252 endif
253
254 distclean: distclean-sub distclean-subdir clean
255 ifeq ($(verbose),)
256 @rm -f $(ROOTEVENTDICT).{cpp,h}
257 else
258 rm -f $(ROOTEVENTDICT).{cpp,h}
259 endif
260
261 distclean-subdir:
262 ifeq ($(verbose),)
263 @for sub_dir in $(EXTDIR) ; do \
264 $(MAKE) -s -C $$sub_dir distclean-sub ; \
265 done
266 else
267 for sub_dir in $(EXTDIR) ; do \
268 $(MAKE) -C $$sub_dir distclean-sub ; \
269 done
270 endif
271
272 #-include $(DEPEND)
273
274
275 #------------------------------------------------------------------------------
276 include $(BASEDIR)/event/Make.def.post
277 #------------------------------------------------------------------------------

  ViewVC Help
Powered by ViewVC 1.1.23