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