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