1 |
mocchiut |
1.1 |
#***************************************************************************** |
2 |
|
|
# |
3 |
mocchiut |
1.7 |
# FILE NAME: $Id: Makefile,v 1.6 2009/04/10 15:01:45 pam-fi 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 |
pam-fi |
1.6 |
ifneq ($(MAKECMDGOALS),distclean) |
19 |
mocchiut |
1.1 |
include $(BASEDIR)/PamOffLineSW/Make.def |
20 |
pam-fi |
1.6 |
endif |
21 |
mocchiut |
1.1 |
#------------------------------------------------------------------------------ |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
#CFLAGS += -I $(PAMOFF_DIR) -I $(TECH_DIR_INC) -I $(ROOT_DIR_INC) -I $(BASEDIR) -I $(EVENT_DIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DPIC |
25 |
|
|
CFLAGS += -I $(BASEDIR) -I $(EVENT_DIR) -I $(TECH_DIR) -I $(PAMOFF_DIR) -I $(ROOT_DIR_INC) -fPIC -DPIC |
26 |
|
|
|
27 |
|
|
CXXSRCS = \ |
28 |
|
|
PamOffLineSW_Main.cpp \ |
29 |
|
|
StateManager.cpp \ |
30 |
|
|
R0_Init_State.cpp \ |
31 |
|
|
R1_FA_State.cpp \ |
32 |
|
|
R2_FAFE_State.cpp \ |
33 |
|
|
R3_FAFEDE_State.cpp \ |
34 |
|
|
R4_HEADER_State.cpp \ |
35 |
|
|
CRC16.cpp \ |
36 |
|
|
PacketSemanticAnalyzer.cpp \ |
37 |
|
|
PacketUser.cpp \ |
38 |
|
|
Logger.cpp |
39 |
|
|
|
40 |
|
|
|
41 |
|
|
#------------------------------------------------------------------------------ |
42 |
|
|
|
43 |
|
|
TARGETLIB = $(PAMOFF_A) |
44 |
|
|
|
45 |
|
|
#------------------------------------------------------------------------------ |
46 |
|
|
EXECUTABLES=chewbacca |
47 |
|
|
#EXECUTABLES=PamOffLineSW |
48 |
|
|
|
49 |
|
|
all: $(EXECUTABLES) |
50 |
|
|
|
51 |
|
|
$(EXECUTABLES): $(TARGETLIB) $(EXTLIB) |
52 |
mocchiut |
1.7 |
ifeq ($(verbose),) |
53 |
|
|
@$(CXX) $(PAM_BIT) -o $@ -L ../event -lyoda -lg2c `root-config --libs` -lRMySQL $^ |
54 |
|
|
else |
55 |
mocchiut |
1.4 |
$(CXX) $(PAM_BIT) -o $@ -L ../event -lyoda -lg2c `root-config --libs` -lRMySQL $^ |
56 |
mocchiut |
1.7 |
endif |
57 |
mocchiut |
1.1 |
|
58 |
|
|
$(EXTLIB): $(EXTDIR) |
59 |
mocchiut |
1.7 |
ifeq ($(verbose),) |
60 |
|
|
@for sub_dir in $(EXTDIR) ; do \ |
61 |
|
|
(${EGREEN} "Make all in $$sub_dir "; ${RESET});\ |
62 |
|
|
$(MAKE) -s -C $$sub_dir libs ; \ |
63 |
|
|
done |
64 |
|
|
else |
65 |
mocchiut |
1.1 |
for sub_dir in $(EXTDIR) ; do \ |
66 |
|
|
$(MAKE) -C $$sub_dir libs ; \ |
67 |
|
|
done |
68 |
mocchiut |
1.7 |
endif |
69 |
mocchiut |
1.1 |
|
70 |
|
|
libs: $(TARGETLIB) |
71 |
|
|
|
72 |
|
|
$(TARGETLIB) : ${OBJS} |
73 |
mocchiut |
1.7 |
ifeq ($(verbose),) |
74 |
|
|
@$(AR) -scrv $@ ${OBJS} &>/dev/null |
75 |
|
|
else |
76 |
mocchiut |
1.1 |
$(AR) -scrv $@ ${OBJS} |
77 |
mocchiut |
1.7 |
endif |
78 |
mocchiut |
1.1 |
|
79 |
|
|
SUBPACKET_HEADER_FILES = \ |
80 |
|
|
|
81 |
|
|
INCLUDES = -I. -I$(ROOT_DIR)/include |
82 |
|
|
DICT_HEADER_FILES = \ |
83 |
|
|
PamelaRun.h yodaversion.h RunInfoYoda.h \ |
84 |
|
|
SubPacket.h PacketType.h SubDetector.h \ |
85 |
|
|
DirectoryStructure.h Algorithm.h AlgorithmInfo.h \ |
86 |
|
|
EventHeader.h PscuHeader.h EventCounter.h \ |
87 |
|
|
endrun/PhysEndRunEvent.h \ |
88 |
|
|
endrun/CaloEndRun.h \ |
89 |
|
|
endrun/TBEndRun.h \ |
90 |
|
|
log/LogEvent.h log/LogRecord.h \ |
91 |
|
|
varDump/VarDumpEvent.h varDump/VarDumpRecord.h \ |
92 |
|
|
arrDump/ArrDumpEvent.h arrDump/ArrDumpRecord.h \ |
93 |
|
|
tabDump/TabDumpEvent.h tabDump/TabDumpRecord.h \ |
94 |
|
|
tmtc/TmtcEvent.h tmtc/TmtcRecord.h \ |
95 |
|
|
mcmd/McmdEvent.h mcmd/McmdRecord.h \ |
96 |
|
|
physics/neutronDetector/NeutronEvent.h \ |
97 |
|
|
physics/neutronDetector/NeutronRecord.h \ |
98 |
|
|
physics/anticounter/AnticounterEvent.h \ |
99 |
|
|
physics/calorimeter/CalorimeterEvent.h \ |
100 |
|
|
physics/S4/S4Event.h \ |
101 |
|
|
physics/tof/TofEvent.h \ |
102 |
|
|
physics/tracker/TrackerEvent.h \ |
103 |
|
|
physics/trigger/TriggerEvent.h \ |
104 |
|
|
tsbt/TsbTEvent.h tsbt/TsbTRecord.h \ |
105 |
|
|
tsbb/TsbBEvent.h tsbb/TsbBRecord.h \ |
106 |
|
|
PscuEvent.h \ |
107 |
|
|
CalibCalPulse1Event.h \ |
108 |
|
|
CalibCalPulse2Event.h \ |
109 |
|
|
CalibTrkBothEvent.h \ |
110 |
|
|
CalibTrk1Event.h \ |
111 |
|
|
CalibTrk2Event.h \ |
112 |
|
|
CalibTofEvent.h \ |
113 |
|
|
CalibS4Event.h \ |
114 |
|
|
CalibCalPedEvent.h \ |
115 |
|
|
Calib1_Ac1Event.h \ |
116 |
|
|
Calib2_Ac1Event.h \ |
117 |
|
|
Calib1_Ac2Event.h \ |
118 |
|
|
Calib2_Ac2Event.h \ |
119 |
|
|
CalibCalEvent.h \ |
120 |
|
|
RunHeaderEvent.h \ |
121 |
|
|
RunTrailerEvent.h \ |
122 |
|
|
CalibHeaderEvent.h \ |
123 |
|
|
CalibTrailerEvent.h \ |
124 |
|
|
InitHeaderEvent.h \ |
125 |
|
|
InitTrailerEvent.h \ |
126 |
|
|
EventTrkEvent.h \ |
127 |
|
|
ForcedFECmdEvent.h \ |
128 |
|
|
Ac1InitEvent.h \ |
129 |
|
|
CalInitEvent.h \ |
130 |
|
|
TrkInitEvent.h \ |
131 |
|
|
TofInitEvent.h \ |
132 |
|
|
TrgInitEvent.h \ |
133 |
|
|
NdInitEvent.h \ |
134 |
|
|
S4InitEvent.h \ |
135 |
|
|
Ac2InitEvent.h \ |
136 |
|
|
CalAlarmEvent.h \ |
137 |
|
|
Ac1AlarmEvent.h \ |
138 |
|
|
TrkAlarmEvent.h \ |
139 |
|
|
TrgAlarmEvent.h \ |
140 |
|
|
TofAlarmEvent.h \ |
141 |
|
|
S4AlarmEvent.h \ |
142 |
|
|
Ac2AlarmEvent.h \ |
143 |
|
|
CRC.h \ |
144 |
|
|
Exception.h \ |
145 |
|
|
LinkDef.h |
146 |
|
|
|
147 |
|
|
$(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES} |
148 |
mocchiut |
1.7 |
ifeq ($(verbose),) |
149 |
|
|
@echo "Calling ROOTCINT" ;\ |
150 |
|
|
LD_LIBRARY_PATH=$(ROOT_LIB):$(LD_LIBRARY_PATH); $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
151 |
|
|
else |
152 |
mocchiut |
1.1 |
echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\ |
153 |
mocchiut |
1.5 |
LD_LIBRARY_PATH=$(ROOT_LIB):$(LD_LIBRARY_PATH); $(ROOTCINT) -f $@ -c ${INCLUDES} $^ |
154 |
mocchiut |
1.7 |
endif |
155 |
mocchiut |
1.1 |
|
156 |
|
|
clean: clean-subdir |
157 |
mocchiut |
1.7 |
ifeq ($(verbose),) |
158 |
|
|
@rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d $(EXECUTABLES) |
159 |
|
|
else |
160 |
mocchiut |
1.1 |
rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d $(EXECUTABLES) |
161 |
mocchiut |
1.7 |
endif |
162 |
mocchiut |
1.1 |
|
163 |
|
|
clean-subdir: $(EXTDIR) |
164 |
mocchiut |
1.7 |
ifeq ($(verbose),) |
165 |
|
|
@for sub_dir in $(EXTDIR) ; do \ |
166 |
|
|
$(MAKE) -s -C $$sub_dir clean ; \ |
167 |
|
|
done |
168 |
|
|
else |
169 |
mocchiut |
1.1 |
for sub_dir in $(EXTDIR) ; do \ |
170 |
|
|
$(MAKE) -C $$sub_dir clean ; \ |
171 |
|
|
done |
172 |
mocchiut |
1.7 |
endif |
173 |
mocchiut |
1.1 |
|
174 |
|
|
distclean: distclean-sub distclean-subdir clean |
175 |
mocchiut |
1.7 |
ifeq ($(verbose),) |
176 |
|
|
@rm -f $(ROOTEVENTDICT).{cpp,h} |
177 |
|
|
else |
178 |
mocchiut |
1.1 |
rm -f $(ROOTEVENTDICT).{cpp,h} |
179 |
mocchiut |
1.7 |
endif |
180 |
mocchiut |
1.1 |
|
181 |
|
|
distclean-subdir: |
182 |
mocchiut |
1.7 |
ifeq ($(verbose),) |
183 |
|
|
@for sub_dir in $(EXTDIR) ; do \ |
184 |
|
|
$(MAKE) -s -C $$sub_dir distclean-sub ; \ |
185 |
|
|
done |
186 |
|
|
else |
187 |
mocchiut |
1.1 |
for sub_dir in $(EXTDIR) ; do \ |
188 |
|
|
$(MAKE) -C $$sub_dir distclean-sub ; \ |
189 |
|
|
done |
190 |
mocchiut |
1.7 |
endif |
191 |
mocchiut |
1.1 |
|
192 |
mocchiut |
1.7 |
#-include $(DEPEND) |
193 |
mocchiut |
1.1 |
|
194 |
|
|
|
195 |
|
|
#------------------------------------------------------------------------------ |
196 |
|
|
include $(BASEDIR)/PamOffLineSW/Make.def.post |
197 |
|
|
#------------------------------------------------------------------------------ |