#***************************************************************************** # # FILE NAME: $Id: Makefile,v 1.7 2008/09/23 15:22:21 mocchiut Exp $ # VERSION: # AUTHOR: Nergal S.r.l. # DATE: # # DESCRIPTION: base Makefile # # REVISION HISTORY: # # Version Date Author Change Description # #*****************************************************************************/ #------------------------------------------------------------------------------ include $(BASEDIR)/event/Make.def #------------------------------------------------------------------------------ CFLAGS += -I $(EVNT_DIR_INC) -I $(ROOT_DIR_INC) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DPIC ROOTEVENTDICT = EventDict CXXSRCS = NullAlgorithm.cpp \ yodaversion.cpp \ PamelaRun.cpp \ RunInfoYoda.cpp \ $(ROOTEVENTDICT).cpp \ SubPacket.cpp \ PacketType.cpp \ SubDetector.cpp \ Algorithm.cpp \ AlgorithmInfo.cpp \ EventHeader.cpp \ PscuHeader.cpp \ EventCounter.cpp \ PscuEvent.cpp \ CalibCalPulse1Event.cpp \ CalibCalPulse2Event.cpp \ CalibTrkBothEvent.cpp \ CalibTrk1Event.cpp \ CalibTrk2Event.cpp \ CalibTofEvent.cpp \ CalibS4Event.cpp \ CalibCalPedEvent.cpp \ Calib1_Ac1Event.cpp \ Calib1_Ac2Event.cpp \ Calib2_Ac1Event.cpp \ Calib2_Ac2Event.cpp \ CalibCalEvent.cpp \ RunHeaderEvent.cpp \ RunTrailerEvent.cpp \ CalibHeaderEvent.cpp \ CalibTrailerEvent.cpp \ InitHeaderEvent.cpp \ InitTrailerEvent.cpp \ EventTrkEvent.cpp \ ForcedFECmdEvent.cpp \ Ac1InitEvent.cpp \ CalInitEvent.cpp \ TrkInitEvent.cpp \ TofInitEvent.cpp \ TrgInitEvent.cpp \ NdInitEvent.cpp \ S4InitEvent.cpp \ Ac2InitEvent.cpp \ CalAlarmEvent.cpp \ Ac1AlarmEvent.cpp \ TrkAlarmEvent.cpp \ TrgAlarmEvent.cpp \ TofAlarmEvent.cpp \ S4AlarmEvent.cpp \ Ac2AlarmEvent.cpp \ CSRCS= CRC.c \ DirectoryStructure.c #------------------------------------------------------------------------------ TARGETLIB = $(EVNT_A) #------------------------------------------------------------------------------ all: dynamic static dynamic: libyoda.so.0.0.0 ln -sf libyoda.so.0.0.0 libyoda.so.0 ;\ ln -sf libyoda.so.0.0.0 libyoda.so static: libyoda.a libyoda.so.0.0.0: $(TARGETLIB) $(EXTLIB) $(CXX) \ $(PAM_BIT) -o $@ \ -shared -nostdlib \ -Wl,-soname \ -Wl,libyoda.so.0 \ /usr/lib/gcc/i386-redhat-linux/3.4.6/crtbeginS.o \ /usr/lib/gcc/i386-redhat-linux/3.4.6/crtendS.o \ -Wl,--whole-archive \ $^ \ -Wl,--no-whole-archive libyoda.a: $(TARGETLIB) $(EXTLIB) cd $(OBJDIR) ; \ pwd ;\ for sub_lib in $(TARGETLIB) $(EXTLIB) ; do \ $(AR) -x $$sub_lib ; \ done ;\ $(AR) -scrv libyoda.a *.o \ /usr/lib/gcc/i386-redhat-linux/3.4.6/crtbeginS.o \ /usr/lib/gcc/i386-redhat-linux/3.4.6/crtendS.o $(TARGETLIB) : ${OBJS} $(AR) -scrv $@ $? $(EXTLIB): $(EXTDIR) for sub_dir in $(EXTDIR) ; do \ $(MAKE) -C $$sub_dir libs ; \ done SUBPACKET_HEADER_FILES = \ INCLUDES = -I. -I$(ROOT_DIR)/include DICT_HEADER_FILES = \ PamelaRun.h yodaversion.h RunInfoYoda.h \ SubPacket.h PacketType.h SubDetector.h \ DirectoryStructure.h Algorithm.h AlgorithmInfo.h \ EventHeader.h PscuHeader.h EventCounter.h \ endrun/PhysEndRunEvent.h \ endrun/CaloEndRun.h \ endrun/TBEndRun.h \ log/LogEvent.h log/LogRecord.h \ varDump/VarDumpEvent.h varDump/VarDumpRecord.h \ arrDump/ArrDumpEvent.h arrDump/ArrDumpRecord.h \ tabDump/TabDumpEvent.h tabDump/TabDumpRecord.h \ tmtc/TmtcEvent.h tmtc/TmtcRecord.h \ mcmd/McmdEvent.h mcmd/McmdRecord.h \ physics/neutronDetector/NeutronEvent.h \ physics/neutronDetector/NeutronRecord.h \ physics/anticounter/AnticounterEvent.h \ physics/calorimeter/CalorimeterEvent.h \ physics/S4/S4Event.h \ physics/tof/TofEvent.h \ physics/tracker/TrackerEvent.h \ physics/trigger/TriggerEvent.h \ tsbt/TsbTEvent.h tsbt/TsbTRecord.h \ tsbb/TsbBEvent.h tsbb/TsbBRecord.h \ PscuEvent.h \ CalibCalPulse1Event.h \ CalibCalPulse2Event.h \ CalibTrkBothEvent.h \ CalibTrk1Event.h \ CalibTrk2Event.h \ CalibTofEvent.h \ CalibS4Event.h \ CalibCalPedEvent.h \ Calib1_Ac1Event.h \ Calib2_Ac1Event.h \ Calib1_Ac2Event.h \ Calib2_Ac2Event.h \ CalibCalEvent.h \ RunHeaderEvent.h \ RunTrailerEvent.h \ CalibHeaderEvent.h \ CalibTrailerEvent.h \ InitHeaderEvent.h \ InitTrailerEvent.h \ EventTrkEvent.h \ ForcedFECmdEvent.h \ Ac1InitEvent.h \ CalInitEvent.h \ TrkInitEvent.h \ TofInitEvent.h \ TrgInitEvent.h \ NdInitEvent.h \ S4InitEvent.h \ Ac2InitEvent.h \ CalAlarmEvent.h \ Ac1AlarmEvent.h \ TrkAlarmEvent.h \ TrgAlarmEvent.h \ TofAlarmEvent.h \ S4AlarmEvent.h \ Ac2AlarmEvent.h \ CRC.h \ Exception.h \ LinkDef.h $(ROOTEVENTDICT).cpp: ${DICT_HEADER_FILES} echo $(ROOTCINT) -f $@ -c ${INCLUDES} $^ ;\ LD_LIBRARY_PATH=$(ROOT_LIB) $(ROOTCINT) -f $@ -c ${INCLUDES} $^ clean: clean-subdir rm -f $(TARGETLIB) ${OBJS} $(OBJDIR)/.*.d libyoda* clean-subdir: $(EXTDIR) for sub_dir in $(EXTDIR) ; do \ $(MAKE) -C $$sub_dir clean ; \ done distclean: distclean-sub distclean-subdir clean rm -f $(ROOTEVENTDICT).{cpp,h} distclean-subdir: for sub_dir in $(EXTDIR) ; do \ $(MAKE) -C $$sub_dir distclean-sub ; \ done -include $(DEPEND) #------------------------------------------------------------------------------ include $(BASEDIR)/event/Make.def.post #------------------------------------------------------------------------------