[d7d2da3] | 1 | #!/usr/bin/env tclsh
|
---|
| 2 |
|
---|
| 3 | set prefix "tmp/"
|
---|
| 4 | set suffix " \\\n\t"
|
---|
| 5 |
|
---|
| 6 | set srcSuf {.$(SrcSuf)}
|
---|
| 7 | set objSuf {.$(ObjSuf)}
|
---|
[5b5a56b] | 8 | set pcmSuf {$(PcmSuf)}
|
---|
[d7d2da3] | 9 | set exeSuf {$(ExeSuf)}
|
---|
| 10 |
|
---|
| 11 | proc dependencies {fileName firstLine {force 1} {command {}}} {
|
---|
| 12 | global suffix headerFiles sourceFiles
|
---|
| 13 |
|
---|
| 14 | if {[info exists sourceFiles($fileName)]} return
|
---|
| 15 |
|
---|
| 16 | set sourceFiles($fileName) 1
|
---|
| 17 |
|
---|
| 18 | set list {}
|
---|
| 19 | set fid [open $fileName]
|
---|
| 20 | while {! [eof $fid]} {
|
---|
| 21 | set line [gets $fid]
|
---|
| 22 | if [regexp -- {^\s*#include\s*"((\w+/)+\w+\.(h|hh))"} $line] {
|
---|
| 23 | set elements [split $line {"}]
|
---|
| 24 | set file [lindex $elements 1]
|
---|
| 25 | if [file exists $file] {
|
---|
| 26 | lappend list $file
|
---|
| 27 | set headerFiles($file) 1
|
---|
| 28 | } elseif [file exists external/$file] {
|
---|
| 29 | lappend list external/$file
|
---|
| 30 | set headerFiles(external/$file) 1
|
---|
[5b5a56b] | 31 | }
|
---|
[d7d2da3] | 32 | }
|
---|
| 33 | }
|
---|
[ded7435] | 34 |
|
---|
[d7d2da3] | 35 | if {[llength $list] > 0} {
|
---|
| 36 | puts -nonewline $firstLine
|
---|
| 37 | foreach file $list {puts -nonewline $suffix$file}
|
---|
| 38 | if {$command != {}} {
|
---|
[af9008e] | 39 | puts {}
|
---|
[d7d2da3] | 40 | puts $command
|
---|
| 41 | }
|
---|
[af9008e] | 42 | puts {}
|
---|
[d7d2da3] | 43 | } elseif {$force} {
|
---|
| 44 | puts -nonewline $firstLine
|
---|
| 45 | if {$command != {}} {
|
---|
[af9008e] | 46 | puts {}
|
---|
[d7d2da3] | 47 | puts $command
|
---|
| 48 | }
|
---|
[af9008e] | 49 | puts {}
|
---|
[d7d2da3] | 50 | }
|
---|
| 51 |
|
---|
[ded7435] | 52 | close $fid
|
---|
[d7d2da3] | 53 | }
|
---|
| 54 |
|
---|
[2eb25b1] | 55 | proc dictDeps {dictPrefix args} {
|
---|
[d7d2da3] | 56 |
|
---|
[5b5a56b] | 57 | global prefix suffix srcSuf objSuf pcmSuf
|
---|
[d7d2da3] | 58 |
|
---|
[1df571a] | 59 | set dict [lsort [eval glob -nocomplain $args]]
|
---|
[ded7435] | 60 |
|
---|
[d7d2da3] | 61 | set dictSrcFiles {}
|
---|
| 62 | set dictObjFiles {}
|
---|
| 63 |
|
---|
| 64 | foreach fileName $dict {
|
---|
| 65 | regsub {LinkDef\.h} $fileName {Dict} dictName
|
---|
| 66 | set dictName $prefix$dictName
|
---|
[ded7435] | 67 |
|
---|
[d7d2da3] | 68 | lappend dictSrcFiles $dictName$srcSuf
|
---|
| 69 | lappend dictObjFiles $dictName$objSuf
|
---|
[5b5a56b] | 70 | lappend dictPcmFiles [file tail $dictName$pcmSuf]
|
---|
[ded7435] | 71 |
|
---|
[d7d2da3] | 72 | dependencies $fileName "$dictName$srcSuf:$suffix$fileName"
|
---|
[5b5a56b] | 73 |
|
---|
| 74 | puts -nonewline [file tail $dictName$pcmSuf]:$suffix
|
---|
| 75 | puts -nonewline $dictName$pcmSuf$suffix
|
---|
| 76 | puts -nonewline $dictName$srcSuf
|
---|
| 77 | puts {}
|
---|
[d7d2da3] | 78 | }
|
---|
[ded7435] | 79 |
|
---|
[2eb25b1] | 80 | puts -nonewline "${dictPrefix}_OBJ += $suffix"
|
---|
[d7d2da3] | 81 | puts [join $dictObjFiles $suffix]
|
---|
[af9008e] | 82 | puts {}
|
---|
[d7d2da3] | 83 |
|
---|
[2eb25b1] | 84 | puts -nonewline "${dictPrefix}_PCM += $suffix"
|
---|
[5b5a56b] | 85 | puts [join $dictPcmFiles $suffix]
|
---|
| 86 | puts {}
|
---|
[d7d2da3] | 87 | }
|
---|
| 88 |
|
---|
| 89 | proc sourceDeps {srcPrefix args} {
|
---|
| 90 |
|
---|
| 91 | global prefix suffix srcSuf objSuf
|
---|
[ded7435] | 92 |
|
---|
[1df571a] | 93 | set source [lsort [eval glob -nocomplain $args]]
|
---|
[ded7435] | 94 |
|
---|
[d7d2da3] | 95 | set srcObjFiles {}
|
---|
[2eb25b1] | 96 | set srcObjFilesFastJet {}
|
---|
[c41c262] | 97 | set srcObjFilesPythia8 {}
|
---|
[ded7435] | 98 |
|
---|
[d7d2da3] | 99 | foreach fileName $source {
|
---|
| 100 | regsub {\.cc} $fileName {} srcName
|
---|
| 101 | set srcObjName $prefix$srcName
|
---|
[b65ca6b] | 102 |
|
---|
[c41c262] | 103 | if {$fileName == "modules/PileUpMergerPythia8.cc"} {
|
---|
| 104 | lappend srcObjFilesPythia8 $srcObjName$objSuf
|
---|
[2eb25b1] | 105 | } elseif {[string match {modules/FastJet*.cc} $fileName] && $srcPrefix != {FASTJET}} {
|
---|
| 106 | continue
|
---|
[c41c262] | 107 | } else {
|
---|
| 108 | lappend srcObjFiles $srcObjName$objSuf
|
---|
| 109 | }
|
---|
[ded7435] | 110 |
|
---|
[d7d2da3] | 111 | dependencies $fileName "$srcObjName$objSuf:$suffix$srcName$srcSuf"
|
---|
| 112 | }
|
---|
| 113 |
|
---|
[af9008e] | 114 | puts -nonewline "${srcPrefix}_OBJ += $suffix"
|
---|
[d7d2da3] | 115 | puts [join $srcObjFiles $suffix]
|
---|
[af9008e] | 116 | puts {}
|
---|
[b65ca6b] | 117 |
|
---|
[c466459] | 118 | puts {ifeq ($(HAS_PYTHIA8),true)}
|
---|
[c41c262] | 119 | puts -nonewline "${srcPrefix}_OBJ += $suffix"
|
---|
| 120 | puts [join $srcObjFilesPythia8 $suffix]
|
---|
| 121 | puts {endif}
|
---|
[af9008e] | 122 | puts {}
|
---|
[d7d2da3] | 123 | }
|
---|
| 124 |
|
---|
| 125 | proc tclDeps {} {
|
---|
| 126 |
|
---|
| 127 | global prefix suffix srcSuf objSuf
|
---|
[ded7435] | 128 |
|
---|
[1df571a] | 129 | set source [lsort [glob -nocomplain {external/tcl/*.c}]]
|
---|
[ded7435] | 130 |
|
---|
[d7d2da3] | 131 | set srcObjFiles {}
|
---|
[ded7435] | 132 |
|
---|
[d7d2da3] | 133 | foreach fileName $source {
|
---|
| 134 | if {$fileName == "tcl/tclc.c" || $fileName == "tcl/tcl.c"} continue
|
---|
[ded7435] | 135 |
|
---|
[d7d2da3] | 136 | regsub {\.c} $fileName {} srcName
|
---|
| 137 | set srcObjName $prefix$srcName
|
---|
[ded7435] | 138 |
|
---|
[d7d2da3] | 139 | lappend srcObjFiles $srcObjName$objSuf
|
---|
[ded7435] | 140 |
|
---|
[d7d2da3] | 141 | dependencies $fileName "$srcObjName$objSuf:$suffix$fileName"
|
---|
| 142 | }
|
---|
[ded7435] | 143 |
|
---|
[0d60c9d] | 144 | puts -nonewline "TCL_OBJ += $suffix"
|
---|
[d7d2da3] | 145 | puts [join $srcObjFiles $suffix]
|
---|
[af9008e] | 146 | puts {}
|
---|
[d7d2da3] | 147 | }
|
---|
| 148 |
|
---|
[af9008e] | 149 | proc executableDeps {args} {
|
---|
[d7d2da3] | 150 |
|
---|
| 151 | global prefix suffix objSuf exeSuf
|
---|
[ded7435] | 152 |
|
---|
[1df571a] | 153 | set executable [lsort [eval glob -nocomplain $args]]
|
---|
[ded7435] | 154 |
|
---|
[d7d2da3] | 155 | set exeFiles {}
|
---|
[ded7435] | 156 |
|
---|
[d7d2da3] | 157 | foreach fileName $executable {
|
---|
| 158 | regsub {\.cpp} $fileName {} exeObjName
|
---|
| 159 | set exeObjName $prefix$exeObjName
|
---|
| 160 | set exeName [file tail $exeObjName]
|
---|
| 161 |
|
---|
| 162 | lappend exeFiles $exeName$exeSuf
|
---|
| 163 | lappend exeObjFiles $exeObjName$objSuf
|
---|
[ded7435] | 164 |
|
---|
[d7d2da3] | 165 | puts "$exeName$exeSuf:$suffix$exeObjName$objSuf"
|
---|
[af9008e] | 166 | puts {}
|
---|
[ded7435] | 167 |
|
---|
[d7d2da3] | 168 | dependencies $fileName "$exeObjName$objSuf:$suffix$fileName"
|
---|
| 169 | }
|
---|
[ded7435] | 170 |
|
---|
[d7d2da3] | 171 | if [info exists exeFiles] {
|
---|
[af9008e] | 172 | puts -nonewline "EXECUTABLE += $suffix"
|
---|
[d7d2da3] | 173 | puts [join $exeFiles $suffix]
|
---|
[af9008e] | 174 | puts {}
|
---|
[d7d2da3] | 175 | }
|
---|
| 176 | if [info exists exeObjFiles] {
|
---|
[af9008e] | 177 | puts -nonewline "EXECUTABLE_OBJ += $suffix"
|
---|
[d7d2da3] | 178 | puts [join $exeObjFiles $suffix]
|
---|
[af9008e] | 179 | puts {}
|
---|
[d7d2da3] | 180 | }
|
---|
| 181 | }
|
---|
| 182 |
|
---|
| 183 | proc headerDeps {} {
|
---|
| 184 | global suffix headerFiles
|
---|
[ded7435] | 185 |
|
---|
[d7d2da3] | 186 | foreach fileName [array names headerFiles] {
|
---|
| 187 | dependencies $fileName "$fileName:" 0 "\t@touch \$@"
|
---|
| 188 | }
|
---|
| 189 | }
|
---|
| 190 |
|
---|
| 191 | puts {
|
---|
| 192 | #
|
---|
| 193 | # Makefile for ExRootAnalysis
|
---|
| 194 | #
|
---|
| 195 | # Author: P. Demin - UCL, Louvain-la-Neuve
|
---|
| 196 | #
|
---|
| 197 | # multi-platform configuration is taken from ROOT (root/test/Makefile.arch)
|
---|
| 198 | #
|
---|
| 199 |
|
---|
| 200 | include doc/Makefile.arch
|
---|
| 201 |
|
---|
[5b5a56b] | 202 | ROOT_MAJOR := $(shell $(RC) --version | cut -d'.' -f1)
|
---|
[d7d2da3] | 203 |
|
---|
| 204 | SrcSuf = cc
|
---|
[5b5a56b] | 205 | PcmSuf = _rdict.pcm
|
---|
[d7d2da3] | 206 |
|
---|
| 207 | CXXFLAGS += $(ROOTCFLAGS) -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DDROP_CGAL -I. -Iexternal -Iexternal/tcl
|
---|
[00bcbe6] | 208 | DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS)
|
---|
[341c4db] | 209 | DISPLAY_LIBS = $(shell $(RC) --evelibs) -lGuiHtml $(SYSLIBS)
|
---|
[d7d2da3] | 210 |
|
---|
[af9008e] | 211 | ifneq ($(CMSSW_FWLITE_INCLUDE_PATH),)
|
---|
| 212 | HAS_CMSSW = true
|
---|
[41fec5e] | 213 | CXXFLAGS += -std=c++0x -I$(subst :, -I,$(CMSSW_FWLITE_INCLUDE_PATH))
|
---|
[6427420] | 214 | OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH)))
|
---|
[af9008e] | 215 | ifneq ($(CMSSW_RELEASE_BASE),)
|
---|
| 216 | CXXFLAGS += -I$(CMSSW_RELEASE_BASE)/src
|
---|
| 217 | endif
|
---|
| 218 | ifneq ($(LD_LIBRARY_PATH),)
|
---|
[6427420] | 219 | OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
|
---|
[af9008e] | 220 | endif
|
---|
[6427420] | 221 | OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
|
---|
[af9008e] | 222 | endif
|
---|
| 223 |
|
---|
| 224 | ifneq ($(PROMC),)
|
---|
| 225 | HAS_PROMC = true
|
---|
[6427420] | 226 | CXXFLAGS += -I$(PROMC)/include -I$(PROMC)/src
|
---|
| 227 | OPT_LIBS += -L$(PROMC)/lib -lpromc -lprotoc -lprotobuf -lprotobuf-lite -lcbook -lz
|
---|
[af9008e] | 228 | endif
|
---|
| 229 |
|
---|
[c41c262] | 230 | ifneq ($(PYTHIA8),)
|
---|
[c466459] | 231 | HAS_PYTHIA8 = true
|
---|
[0d60c9d] | 232 | CXXFLAGS += -I$(PYTHIA8)/include
|
---|
[280667b] | 233 | CXXFLAGS += -I$(PYTHIA8)/include/Pythia8
|
---|
[aef818f] | 234 | OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl
|
---|
[c466459] | 235 | else
|
---|
| 236 | ifneq ($(PYTHIA8DATA),)
|
---|
| 237 | HAS_PYTHIA8 = true
|
---|
[0d60c9d] | 238 | CXXFLAGS += -I$(PYTHIA8DATA)/../include
|
---|
[280667b] | 239 | CXXFLAGS += -I$(PYTHIA8DATA)/../include/Pythia8
|
---|
[aef818f] | 240 | OPT_LIBS += -L$(PYTHIA8DATA)/../lib -lpythia8 -ldl
|
---|
[c466459] | 241 | endif
|
---|
[c41c262] | 242 | endif
|
---|
| 243 |
|
---|
[6427420] | 244 | DELPHES_LIBS += $(OPT_LIBS)
|
---|
| 245 | DISPLAY_LIBS += $(OPT_LIBS)
|
---|
| 246 |
|
---|
[d7d2da3] | 247 | ###
|
---|
| 248 |
|
---|
[2eb25b1] | 249 | NOFASTJET = libDelphesNoFastJet.$(DllSuf)
|
---|
| 250 | NOFASTJETLIB = libDelphesNoFastJet.lib
|
---|
| 251 |
|
---|
[00bcbe6] | 252 | DELPHES = libDelphes.$(DllSuf)
|
---|
| 253 | DELPHESLIB = libDelphes.lib
|
---|
| 254 |
|
---|
| 255 | DISPLAY = libDelphesDisplay.$(DllSuf)
|
---|
| 256 | DISPLAYLIB = libDelphesDisplay.lib
|
---|
[d7d2da3] | 257 |
|
---|
| 258 | VERSION = $(shell cat VERSION)
|
---|
| 259 | DISTDIR = Delphes-$(VERSION)
|
---|
| 260 | DISTTAR = $(DISTDIR).tar.gz
|
---|
| 261 |
|
---|
| 262 | all:
|
---|
| 263 |
|
---|
| 264 | }
|
---|
| 265 |
|
---|
[af9008e] | 266 | executableDeps {converters/*.cpp} {examples/*.cpp}
|
---|
| 267 |
|
---|
| 268 | executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp}
|
---|
| 269 |
|
---|
| 270 | puts {ifeq ($(HAS_CMSSW),true)}
|
---|
| 271 | executableDeps {readers/DelphesCMSFWLite.cpp}
|
---|
| 272 | puts {endif}
|
---|
| 273 | puts {}
|
---|
| 274 |
|
---|
| 275 | puts {ifeq ($(HAS_PROMC),true)}
|
---|
| 276 | executableDeps {readers/DelphesProMC.cpp}
|
---|
| 277 | puts {endif}
|
---|
| 278 | puts {}
|
---|
| 279 |
|
---|
| 280 | puts {ifeq ($(HAS_PYTHIA8),true)}
|
---|
| 281 | executableDeps {readers/DelphesPythia8.cpp}
|
---|
[0d60c9d] | 282 | dictDeps {DELPHES_DICT} {modules/Pythia8LinkDef.h}
|
---|
[af9008e] | 283 | puts {endif}
|
---|
| 284 | puts {}
|
---|
[d7d2da3] | 285 |
|
---|
[0d60c9d] | 286 | dictDeps {DELPHES_DICT} {classes/ClassesLinkDef.h} {modules/ModulesLinkDef.h} {external/ExRootAnalysis/ExRootAnalysisLinkDef.h}
|
---|
[00bcbe6] | 287 |
|
---|
[2eb25b1] | 288 | dictDeps {FASTJET_DICT} {modules/FastJetLinkDef.h}
|
---|
| 289 |
|
---|
[0d60c9d] | 290 | dictDeps {DISPLAY_DICT} {display/DisplayLinkDef.h}
|
---|
[00bcbe6] | 291 |
|
---|
[2eb25b1] | 292 | sourceDeps {DELPHES} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/Hector/*.cc}
|
---|
| 293 |
|
---|
| 294 | sourceDeps {FASTJET} {modules/FastJet*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/fastjet/contribs/*/*.cc}
|
---|
[d7d2da3] | 295 |
|
---|
[00bcbe6] | 296 | sourceDeps {DISPLAY} {display/*.cc}
|
---|
[d7d2da3] | 297 |
|
---|
| 298 | tclDeps
|
---|
| 299 |
|
---|
| 300 | headerDeps
|
---|
| 301 |
|
---|
| 302 | puts {
|
---|
| 303 |
|
---|
| 304 | ###
|
---|
| 305 |
|
---|
[5b5a56b] | 306 | ifeq ($(ROOT_MAJOR),6)
|
---|
[2eb25b1] | 307 | all: $(NOFASTJET) $(DELPHES) $(DELPHES_DICT_PCM) $(FASTJET_DICT_PCM) $(EXECUTABLE)
|
---|
[5b5a56b] | 308 | display: $(DISPLAY) $(DISPLAY_DICT_PCM)
|
---|
| 309 | else
|
---|
[2eb25b1] | 310 | all: $(NOFASTJET) $(DELPHES) $(EXECUTABLE)
|
---|
[00bcbe6] | 311 | display: $(DISPLAY)
|
---|
[5b5a56b] | 312 | endif
|
---|
[00bcbe6] | 313 |
|
---|
[2eb25b1] | 314 | $(NOFASTJET): $(DELPHES_DICT_OBJ) $(DELPHES_OBJ) $(TCL_OBJ)
|
---|
| 315 | @mkdir -p $(@D)
|
---|
| 316 | @echo ">> Building $@"
|
---|
| 317 | ifeq ($(ARCH),aix5)
|
---|
| 318 | @$(MAKESHARED) $(OutPutOpt) $@ $(DELPHES_LIBS) -p 0 $^
|
---|
| 319 | else
|
---|
| 320 | ifeq ($(PLATFORM),macosx)
|
---|
| 321 | # We need to make both the .dylib and the .so
|
---|
| 322 | @$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
|
---|
| 323 | ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
|
---|
| 324 | ifeq ($(MACOSX_MINOR),4)
|
---|
| 325 | @ln -sf $@ $(subst .$(DllSuf),.so,$@)
|
---|
| 326 | endif
|
---|
| 327 | endif
|
---|
| 328 | else
|
---|
| 329 | ifeq ($(PLATFORM),win32)
|
---|
| 330 | @bindexplib $* $^ > $*.def
|
---|
| 331 | @lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(NOFASTJETLIB)
|
---|
| 332 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DELPHES_LIBS) $(OutPutOpt)$@
|
---|
| 333 | @$(MT_DLL)
|
---|
| 334 | else
|
---|
| 335 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
|
---|
| 336 | @$(MT_DLL)
|
---|
| 337 | endif
|
---|
| 338 | endif
|
---|
| 339 | endif
|
---|
| 340 |
|
---|
| 341 | $(DELPHES): $(DELPHES_DICT_OBJ) $(FASTJET_DICT_OBJ) $(DELPHES_OBJ) $(FASTJET_OBJ) $(TCL_OBJ)
|
---|
[d7d2da3] | 342 | @mkdir -p $(@D)
|
---|
| 343 | @echo ">> Building $@"
|
---|
| 344 | ifeq ($(ARCH),aix5)
|
---|
[00bcbe6] | 345 | @$(MAKESHARED) $(OutPutOpt) $@ $(DELPHES_LIBS) -p 0 $^
|
---|
[d7d2da3] | 346 | else
|
---|
| 347 | ifeq ($(PLATFORM),macosx)
|
---|
| 348 | # We need to make both the .dylib and the .so
|
---|
[00bcbe6] | 349 | @$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
|
---|
[d7d2da3] | 350 | ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
|
---|
| 351 | ifeq ($(MACOSX_MINOR),4)
|
---|
| 352 | @ln -sf $@ $(subst .$(DllSuf),.so,$@)
|
---|
| 353 | endif
|
---|
| 354 | endif
|
---|
| 355 | else
|
---|
| 356 | ifeq ($(PLATFORM),win32)
|
---|
| 357 | @bindexplib $* $^ > $*.def
|
---|
[00bcbe6] | 358 | @lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DELPHESLIB)
|
---|
| 359 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DELPHES_LIBS) $(OutPutOpt)$@
|
---|
[d7d2da3] | 360 | @$(MT_DLL)
|
---|
| 361 | else
|
---|
[00bcbe6] | 362 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
|
---|
| 363 | @$(MT_DLL)
|
---|
| 364 | endif
|
---|
| 365 | endif
|
---|
| 366 | endif
|
---|
| 367 |
|
---|
[2eb25b1] | 368 | $(DISPLAY): $(DELPHES_DICT_OBJ) $(FASTJET_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(FASTJET_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ)
|
---|
[00bcbe6] | 369 | @mkdir -p $(@D)
|
---|
| 370 | @echo ">> Building $@"
|
---|
| 371 | ifeq ($(ARCH),aix5)
|
---|
| 372 | @$(MAKESHARED) $(OutPutOpt) $@ $(DISPLAY_LIBS) -p 0 $^
|
---|
| 373 | else
|
---|
| 374 | ifeq ($(PLATFORM),macosx)
|
---|
| 375 | # We need to make both the .dylib and the .so
|
---|
| 376 | @$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
|
---|
| 377 | ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
|
---|
| 378 | ifeq ($(MACOSX_MINOR),4)
|
---|
| 379 | @ln -sf $@ $(subst .$(DllSuf),.so,$@)
|
---|
| 380 | endif
|
---|
| 381 | endif
|
---|
| 382 | else
|
---|
| 383 | ifeq ($(PLATFORM),win32)
|
---|
| 384 | @bindexplib $* $^ > $*.def
|
---|
| 385 | @lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DISPLAYLIB)
|
---|
| 386 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DISPLAY_LIBS) $(OutPutOpt)$@
|
---|
| 387 | @$(MT_DLL)
|
---|
| 388 | else
|
---|
| 389 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
|
---|
[d7d2da3] | 390 | @$(MT_DLL)
|
---|
| 391 | endif
|
---|
| 392 | endif
|
---|
| 393 | endif
|
---|
| 394 |
|
---|
| 395 | clean:
|
---|
[2eb25b1] | 396 | @rm -f $(DELPHES_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(FASTJET_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ) core
|
---|
[00bcbe6] | 397 | @rm -rf tmp
|
---|
[d7d2da3] | 398 |
|
---|
| 399 | distclean: clean
|
---|
[2eb25b1] | 400 | @rm -f $(NOFASTJET) $(NOFASTJETLIB) $(DELPHES) $(DELPHESLIB) $(DELPHES_DICT_PCM) $(FASTJET_DICT_PCM) $(DISPLAY) $(DISPLAYLIB) $(DISPLAY_DICT_PCM) $(EXECUTABLE)
|
---|
[d7d2da3] | 401 |
|
---|
| 402 | dist:
|
---|
| 403 | @echo ">> Building $(DISTTAR)"
|
---|
| 404 | @mkdir -p $(DISTDIR)
|
---|
[1df571a] | 405 | @cp -a CHANGELOG CREDITS README VERSION Makefile configure cards classes converters display doc examples external modules python readers $(DISTDIR)
|
---|
[d7d2da3] | 406 | @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \;
|
---|
| 407 | @tar -czf $(DISTTAR) $(DISTDIR)
|
---|
| 408 | @rm -rf $(DISTDIR)
|
---|
| 409 |
|
---|
| 410 | ###
|
---|
| 411 |
|
---|
[5b5a56b] | 412 | .SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf) $(PcmSuf)
|
---|
[d7d2da3] | 413 |
|
---|
| 414 | %Dict.$(SrcSuf):
|
---|
| 415 | @mkdir -p $(@D)
|
---|
| 416 | @echo ">> Generating $@"
|
---|
[0d60c9d] | 417 | @rootcint -f $@ -c -Iexternal $<
|
---|
[d7d2da3] | 418 | @echo "#define private public" > $@.arch
|
---|
| 419 | @echo "#define protected public" >> $@.arch
|
---|
| 420 | @mv $@ $@.base
|
---|
| 421 | @cat $@.arch $< $@.base > $@
|
---|
| 422 | @rm $@.arch $@.base
|
---|
| 423 |
|
---|
[5b5a56b] | 424 | %Dict$(PcmSuf):
|
---|
| 425 | @echo ">> Copying $@"
|
---|
| 426 | @cp $< $@
|
---|
| 427 |
|
---|
[00bcbe6] | 428 | $(DELPHES_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
|
---|
| 429 | @mkdir -p $(@D)
|
---|
| 430 | @echo ">> Compiling $<"
|
---|
| 431 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 432 |
|
---|
[2eb25b1] | 433 | $(FASTJET_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
|
---|
| 434 | @mkdir -p $(@D)
|
---|
| 435 | @echo ">> Compiling $<"
|
---|
| 436 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 437 |
|
---|
[00bcbe6] | 438 | $(DISPLAY_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
|
---|
| 439 | @mkdir -p $(@D)
|
---|
| 440 | @echo ">> Compiling $<"
|
---|
| 441 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 442 |
|
---|
| 443 | $(DELPHES_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
|
---|
[d7d2da3] | 444 | @mkdir -p $(@D)
|
---|
| 445 | @echo ">> Compiling $<"
|
---|
| 446 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 447 |
|
---|
[2eb25b1] | 448 | $(FASTJET_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
|
---|
| 449 | @mkdir -p $(@D)
|
---|
| 450 | @echo ">> Compiling $<"
|
---|
| 451 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 452 |
|
---|
[00bcbe6] | 453 | $(DISPLAY_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
|
---|
[d7d2da3] | 454 | @mkdir -p $(@D)
|
---|
| 455 | @echo ">> Compiling $<"
|
---|
| 456 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 457 |
|
---|
| 458 | $(TCL_OBJ): tmp/%.$(ObjSuf): %.c
|
---|
| 459 | @mkdir -p $(@D)
|
---|
| 460 | @echo ">> Compiling $<"
|
---|
[9582d01] | 461 | @$(CC) $(patsubst -std=%,,$(CXXFLAGS)) -c $< $(OutPutOpt)$@
|
---|
[d7d2da3] | 462 |
|
---|
| 463 | $(EXECUTABLE_OBJ): tmp/%.$(ObjSuf): %.cpp
|
---|
| 464 | @mkdir -p $(@D)
|
---|
| 465 | @echo ">> Compiling $<"
|
---|
| 466 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 467 |
|
---|
[2eb25b1] | 468 | $(EXECUTABLE): %$(ExeSuf): $(DELPHES_DICT_OBJ) $(FASTJET_DICT_OBJ) $(DELPHES_OBJ) $(FASTJET_OBJ) $(TCL_OBJ)
|
---|
[d7d2da3] | 469 | @echo ">> Building $@"
|
---|
[00bcbe6] | 470 | @$(LD) $(LDFLAGS) $^ $(DELPHES_LIBS) $(OutPutOpt)$@
|
---|
[d7d2da3] | 471 |
|
---|
| 472 | ###
|
---|
| 473 |
|
---|
| 474 | }
|
---|