[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 |
|
---|
| 55 | proc dictDeps {dictVar args} {
|
---|
| 56 |
|
---|
[5b5a56b] | 57 | global prefix suffix srcSuf objSuf pcmSuf
|
---|
[d7d2da3] | 58 |
|
---|
| 59 | set dict [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 |
|
---|
[0d60c9d] | 80 | puts -nonewline "${dictVar} += $suffix"
|
---|
[d7d2da3] | 81 | puts [join $dictSrcFiles $suffix]
|
---|
[af9008e] | 82 | puts {}
|
---|
[d7d2da3] | 83 |
|
---|
[0d60c9d] | 84 | puts -nonewline "${dictVar}_OBJ += $suffix"
|
---|
[d7d2da3] | 85 | puts [join $dictObjFiles $suffix]
|
---|
[af9008e] | 86 | puts {}
|
---|
[d7d2da3] | 87 |
|
---|
[5b5a56b] | 88 | puts -nonewline "${dictVar}_PCM += $suffix"
|
---|
| 89 | puts [join $dictPcmFiles $suffix]
|
---|
| 90 | puts {}
|
---|
[d7d2da3] | 91 | }
|
---|
| 92 |
|
---|
| 93 | proc sourceDeps {srcPrefix args} {
|
---|
| 94 |
|
---|
| 95 | global prefix suffix srcSuf objSuf
|
---|
[ded7435] | 96 |
|
---|
[d7d2da3] | 97 | set source [eval glob -nocomplain $args]
|
---|
[ded7435] | 98 |
|
---|
[d7d2da3] | 99 | set srcObjFiles {}
|
---|
[c41c262] | 100 | set srcObjFilesPythia8 {}
|
---|
[ded7435] | 101 |
|
---|
[d7d2da3] | 102 | foreach fileName $source {
|
---|
| 103 | regsub {\.cc} $fileName {} srcName
|
---|
| 104 | set srcObjName $prefix$srcName
|
---|
[b65ca6b] | 105 |
|
---|
[c41c262] | 106 | if {$fileName == "modules/PileUpMergerPythia8.cc"} {
|
---|
| 107 | lappend srcObjFilesPythia8 $srcObjName$objSuf
|
---|
| 108 | } else {
|
---|
| 109 | lappend srcObjFiles $srcObjName$objSuf
|
---|
| 110 | }
|
---|
[ded7435] | 111 |
|
---|
[d7d2da3] | 112 | dependencies $fileName "$srcObjName$objSuf:$suffix$srcName$srcSuf"
|
---|
| 113 | }
|
---|
| 114 |
|
---|
[af9008e] | 115 | puts -nonewline "${srcPrefix}_OBJ += $suffix"
|
---|
[d7d2da3] | 116 | puts [join $srcObjFiles $suffix]
|
---|
[af9008e] | 117 | puts {}
|
---|
[b65ca6b] | 118 |
|
---|
[c466459] | 119 | puts {ifeq ($(HAS_PYTHIA8),true)}
|
---|
[c41c262] | 120 | puts -nonewline "${srcPrefix}_OBJ += $suffix"
|
---|
| 121 | puts [join $srcObjFilesPythia8 $suffix]
|
---|
| 122 | puts {endif}
|
---|
[af9008e] | 123 | puts {}
|
---|
[d7d2da3] | 124 | }
|
---|
| 125 |
|
---|
| 126 | proc tclDeps {} {
|
---|
| 127 |
|
---|
| 128 | global prefix suffix srcSuf objSuf
|
---|
[ded7435] | 129 |
|
---|
[d7d2da3] | 130 | set source [glob -nocomplain {external/tcl/*.c}]
|
---|
[ded7435] | 131 |
|
---|
[d7d2da3] | 132 | set srcObjFiles {}
|
---|
[ded7435] | 133 |
|
---|
[d7d2da3] | 134 | foreach fileName $source {
|
---|
| 135 | if {$fileName == "tcl/tclc.c" || $fileName == "tcl/tcl.c"} continue
|
---|
[ded7435] | 136 |
|
---|
[d7d2da3] | 137 | regsub {\.c} $fileName {} srcName
|
---|
| 138 | set srcObjName $prefix$srcName
|
---|
[ded7435] | 139 |
|
---|
[d7d2da3] | 140 | lappend srcObjFiles $srcObjName$objSuf
|
---|
[ded7435] | 141 |
|
---|
[d7d2da3] | 142 | dependencies $fileName "$srcObjName$objSuf:$suffix$fileName"
|
---|
| 143 | }
|
---|
[ded7435] | 144 |
|
---|
[0d60c9d] | 145 | puts -nonewline "TCL_OBJ += $suffix"
|
---|
[d7d2da3] | 146 | puts [join $srcObjFiles $suffix]
|
---|
[af9008e] | 147 | puts {}
|
---|
[d7d2da3] | 148 | }
|
---|
| 149 |
|
---|
[af9008e] | 150 | proc executableDeps {args} {
|
---|
[d7d2da3] | 151 |
|
---|
| 152 | global prefix suffix objSuf exeSuf
|
---|
[ded7435] | 153 |
|
---|
[af9008e] | 154 | set executable [eval glob -nocomplain $args]
|
---|
[ded7435] | 155 |
|
---|
[d7d2da3] | 156 | set exeFiles {}
|
---|
[ded7435] | 157 |
|
---|
[d7d2da3] | 158 | foreach fileName $executable {
|
---|
| 159 | regsub {\.cpp} $fileName {} exeObjName
|
---|
| 160 | set exeObjName $prefix$exeObjName
|
---|
| 161 | set exeName [file tail $exeObjName]
|
---|
| 162 |
|
---|
| 163 | lappend exeFiles $exeName$exeSuf
|
---|
| 164 | lappend exeObjFiles $exeObjName$objSuf
|
---|
[ded7435] | 165 |
|
---|
[d7d2da3] | 166 | puts "$exeName$exeSuf:$suffix$exeObjName$objSuf"
|
---|
[af9008e] | 167 | puts {}
|
---|
[ded7435] | 168 |
|
---|
[d7d2da3] | 169 | dependencies $fileName "$exeObjName$objSuf:$suffix$fileName"
|
---|
| 170 | }
|
---|
[ded7435] | 171 |
|
---|
[d7d2da3] | 172 | if [info exists exeFiles] {
|
---|
[af9008e] | 173 | puts -nonewline "EXECUTABLE += $suffix"
|
---|
[d7d2da3] | 174 | puts [join $exeFiles $suffix]
|
---|
[af9008e] | 175 | puts {}
|
---|
[d7d2da3] | 176 | }
|
---|
| 177 | if [info exists exeObjFiles] {
|
---|
[af9008e] | 178 | puts -nonewline "EXECUTABLE_OBJ += $suffix"
|
---|
[d7d2da3] | 179 | puts [join $exeObjFiles $suffix]
|
---|
[af9008e] | 180 | puts {}
|
---|
[d7d2da3] | 181 | }
|
---|
| 182 | }
|
---|
| 183 |
|
---|
| 184 | proc headerDeps {} {
|
---|
| 185 | global suffix headerFiles
|
---|
[ded7435] | 186 |
|
---|
[d7d2da3] | 187 | foreach fileName [array names headerFiles] {
|
---|
| 188 | dependencies $fileName "$fileName:" 0 "\t@touch \$@"
|
---|
| 189 | }
|
---|
| 190 | }
|
---|
| 191 |
|
---|
| 192 | puts {
|
---|
| 193 | #
|
---|
| 194 | # Makefile for ExRootAnalysis
|
---|
| 195 | #
|
---|
| 196 | # Author: P. Demin - UCL, Louvain-la-Neuve
|
---|
| 197 | #
|
---|
| 198 | # multi-platform configuration is taken from ROOT (root/test/Makefile.arch)
|
---|
| 199 | #
|
---|
| 200 |
|
---|
| 201 | include doc/Makefile.arch
|
---|
| 202 |
|
---|
[5b5a56b] | 203 | ROOT_MAJOR := $(shell $(RC) --version | cut -d'.' -f1)
|
---|
[d7d2da3] | 204 |
|
---|
| 205 | SrcSuf = cc
|
---|
[5b5a56b] | 206 | PcmSuf = _rdict.pcm
|
---|
[d7d2da3] | 207 |
|
---|
| 208 | CXXFLAGS += $(ROOTCFLAGS) -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DDROP_CGAL -I. -Iexternal -Iexternal/tcl
|
---|
[00bcbe6] | 209 | DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS)
|
---|
[341c4db] | 210 | DISPLAY_LIBS = $(shell $(RC) --evelibs) -lGuiHtml $(SYSLIBS)
|
---|
[d7d2da3] | 211 |
|
---|
[af9008e] | 212 | ifneq ($(CMSSW_FWLITE_INCLUDE_PATH),)
|
---|
| 213 | HAS_CMSSW = true
|
---|
[41fec5e] | 214 | CXXFLAGS += -std=c++0x -I$(subst :, -I,$(CMSSW_FWLITE_INCLUDE_PATH))
|
---|
[6427420] | 215 | OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH)))
|
---|
[af9008e] | 216 | ifneq ($(CMSSW_RELEASE_BASE),)
|
---|
| 217 | CXXFLAGS += -I$(CMSSW_RELEASE_BASE)/src
|
---|
| 218 | endif
|
---|
| 219 | ifneq ($(LD_LIBRARY_PATH),)
|
---|
[6427420] | 220 | OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
|
---|
[af9008e] | 221 | endif
|
---|
[6427420] | 222 | OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils
|
---|
[af9008e] | 223 | endif
|
---|
| 224 |
|
---|
| 225 | ifneq ($(PROMC),)
|
---|
| 226 | HAS_PROMC = true
|
---|
[6427420] | 227 | CXXFLAGS += -I$(PROMC)/include -I$(PROMC)/src
|
---|
| 228 | OPT_LIBS += -L$(PROMC)/lib -lpromc -lprotoc -lprotobuf -lprotobuf-lite -lcbook -lz
|
---|
[af9008e] | 229 | endif
|
---|
| 230 |
|
---|
[c41c262] | 231 | ifneq ($(PYTHIA8),)
|
---|
[c466459] | 232 | HAS_PYTHIA8 = true
|
---|
[0d60c9d] | 233 | CXXFLAGS += -I$(PYTHIA8)/include
|
---|
[6427420] | 234 | OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -lLHAPDF -lgfortran -lz
|
---|
[c466459] | 235 | else
|
---|
| 236 | ifneq ($(PYTHIA8DATA),)
|
---|
| 237 | HAS_PYTHIA8 = true
|
---|
[0d60c9d] | 238 | CXXFLAGS += -I$(PYTHIA8DATA)/../include
|
---|
[6427420] | 239 | OPT_LIBS += -L$(PYTHIA8DATA)/../lib -lpythia8 -lLHAPDF -lgfortran -lz
|
---|
[c466459] | 240 | endif
|
---|
[c41c262] | 241 | endif
|
---|
| 242 |
|
---|
[6427420] | 243 | DELPHES_LIBS += $(OPT_LIBS)
|
---|
| 244 | DISPLAY_LIBS += $(OPT_LIBS)
|
---|
| 245 |
|
---|
[d7d2da3] | 246 | ###
|
---|
| 247 |
|
---|
[00bcbe6] | 248 | DELPHES = libDelphes.$(DllSuf)
|
---|
| 249 | DELPHESLIB = libDelphes.lib
|
---|
| 250 |
|
---|
| 251 | DISPLAY = libDelphesDisplay.$(DllSuf)
|
---|
| 252 | DISPLAYLIB = libDelphesDisplay.lib
|
---|
[d7d2da3] | 253 |
|
---|
| 254 | VERSION = $(shell cat VERSION)
|
---|
| 255 | DISTDIR = Delphes-$(VERSION)
|
---|
| 256 | DISTTAR = $(DISTDIR).tar.gz
|
---|
| 257 |
|
---|
| 258 | all:
|
---|
| 259 |
|
---|
| 260 | }
|
---|
| 261 |
|
---|
[af9008e] | 262 | executableDeps {converters/*.cpp} {examples/*.cpp}
|
---|
| 263 |
|
---|
| 264 | executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp}
|
---|
| 265 |
|
---|
| 266 | puts {ifeq ($(HAS_CMSSW),true)}
|
---|
| 267 | executableDeps {readers/DelphesCMSFWLite.cpp}
|
---|
| 268 | puts {endif}
|
---|
| 269 | puts {}
|
---|
| 270 |
|
---|
| 271 | puts {ifeq ($(HAS_PROMC),true)}
|
---|
| 272 | executableDeps {readers/DelphesProMC.cpp}
|
---|
| 273 | puts {endif}
|
---|
| 274 | puts {}
|
---|
| 275 |
|
---|
| 276 | puts {ifeq ($(HAS_PYTHIA8),true)}
|
---|
| 277 | executableDeps {readers/DelphesPythia8.cpp}
|
---|
[0d60c9d] | 278 | dictDeps {DELPHES_DICT} {modules/Pythia8LinkDef.h}
|
---|
[af9008e] | 279 | puts {endif}
|
---|
| 280 | puts {}
|
---|
[d7d2da3] | 281 |
|
---|
[0d60c9d] | 282 | dictDeps {DELPHES_DICT} {classes/ClassesLinkDef.h} {modules/ModulesLinkDef.h} {external/ExRootAnalysis/ExRootAnalysisLinkDef.h}
|
---|
[00bcbe6] | 283 |
|
---|
[0d60c9d] | 284 | dictDeps {DISPLAY_DICT} {display/DisplayLinkDef.h}
|
---|
[00bcbe6] | 285 |
|
---|
[ff8307a] | 286 | sourceDeps {DELPHES} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc} {external/fastjet/contribs/*/*.cc} {external/Hector/*.cc}
|
---|
[d7d2da3] | 287 |
|
---|
[00bcbe6] | 288 | sourceDeps {DISPLAY} {display/*.cc}
|
---|
[d7d2da3] | 289 |
|
---|
| 290 | tclDeps
|
---|
| 291 |
|
---|
| 292 | headerDeps
|
---|
| 293 |
|
---|
| 294 | puts {
|
---|
| 295 |
|
---|
| 296 | ###
|
---|
| 297 |
|
---|
[5b5a56b] | 298 | ifeq ($(ROOT_MAJOR),6)
|
---|
| 299 | all: $(DELPHES) $(DELPHES_DICT_PCM) $(EXECUTABLE)
|
---|
| 300 | display: $(DISPLAY) $(DISPLAY_DICT_PCM)
|
---|
| 301 | else
|
---|
[00bcbe6] | 302 | all: $(DELPHES) $(EXECUTABLE)
|
---|
| 303 | display: $(DISPLAY)
|
---|
[5b5a56b] | 304 | endif
|
---|
[00bcbe6] | 305 |
|
---|
| 306 | $(DELPHES): $(DELPHES_DICT_OBJ) $(DELPHES_OBJ) $(TCL_OBJ)
|
---|
[d7d2da3] | 307 | @mkdir -p $(@D)
|
---|
| 308 | @echo ">> Building $@"
|
---|
| 309 | ifeq ($(ARCH),aix5)
|
---|
[00bcbe6] | 310 | @$(MAKESHARED) $(OutPutOpt) $@ $(DELPHES_LIBS) -p 0 $^
|
---|
[d7d2da3] | 311 | else
|
---|
| 312 | ifeq ($(PLATFORM),macosx)
|
---|
| 313 | # We need to make both the .dylib and the .so
|
---|
[00bcbe6] | 314 | @$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
|
---|
[d7d2da3] | 315 | ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
|
---|
| 316 | ifeq ($(MACOSX_MINOR),4)
|
---|
| 317 | @ln -sf $@ $(subst .$(DllSuf),.so,$@)
|
---|
| 318 | endif
|
---|
| 319 | endif
|
---|
| 320 | else
|
---|
| 321 | ifeq ($(PLATFORM),win32)
|
---|
| 322 | @bindexplib $* $^ > $*.def
|
---|
[00bcbe6] | 323 | @lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DELPHESLIB)
|
---|
| 324 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DELPHES_LIBS) $(OutPutOpt)$@
|
---|
[d7d2da3] | 325 | @$(MT_DLL)
|
---|
| 326 | else
|
---|
[00bcbe6] | 327 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
|
---|
| 328 | @$(MT_DLL)
|
---|
| 329 | endif
|
---|
| 330 | endif
|
---|
| 331 | endif
|
---|
| 332 |
|
---|
| 333 | $(DISPLAY): $(DELPHES_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ)
|
---|
| 334 | @mkdir -p $(@D)
|
---|
| 335 | @echo ">> Building $@"
|
---|
| 336 | ifeq ($(ARCH),aix5)
|
---|
| 337 | @$(MAKESHARED) $(OutPutOpt) $@ $(DISPLAY_LIBS) -p 0 $^
|
---|
| 338 | else
|
---|
| 339 | ifeq ($(PLATFORM),macosx)
|
---|
| 340 | # We need to make both the .dylib and the .so
|
---|
| 341 | @$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
|
---|
| 342 | ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
|
---|
| 343 | ifeq ($(MACOSX_MINOR),4)
|
---|
| 344 | @ln -sf $@ $(subst .$(DllSuf),.so,$@)
|
---|
| 345 | endif
|
---|
| 346 | endif
|
---|
| 347 | else
|
---|
| 348 | ifeq ($(PLATFORM),win32)
|
---|
| 349 | @bindexplib $* $^ > $*.def
|
---|
| 350 | @lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DISPLAYLIB)
|
---|
| 351 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DISPLAY_LIBS) $(OutPutOpt)$@
|
---|
| 352 | @$(MT_DLL)
|
---|
| 353 | else
|
---|
| 354 | @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
|
---|
[d7d2da3] | 355 | @$(MT_DLL)
|
---|
| 356 | endif
|
---|
| 357 | endif
|
---|
| 358 | endif
|
---|
| 359 |
|
---|
| 360 | clean:
|
---|
[00bcbe6] | 361 | @rm -f $(DELPHES_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ) core
|
---|
| 362 | @rm -rf tmp
|
---|
[d7d2da3] | 363 |
|
---|
| 364 | distclean: clean
|
---|
[5b5a56b] | 365 | @rm -f $(DELPHES) $(DELPHESLIB) $(DELPHES_DICT_PCM) $(DISPLAY) $(DISPLAYLIB) $(DISPLAY_DICT_PCM) $(EXECUTABLE)
|
---|
[d7d2da3] | 366 |
|
---|
| 367 | dist:
|
---|
| 368 | @echo ">> Building $(DISTTAR)"
|
---|
| 369 | @mkdir -p $(DISTDIR)
|
---|
[8560904] | 370 | @cp -a CHANGELOG CREDITS README VERSION Makefile configure classes converters display doc examples external modules python readers $(DISTDIR)
|
---|
[d7d2da3] | 371 | @find $(DISTDIR) -depth -name .\* -exec rm -rf {} \;
|
---|
| 372 | @tar -czf $(DISTTAR) $(DISTDIR)
|
---|
| 373 | @rm -rf $(DISTDIR)
|
---|
| 374 |
|
---|
| 375 | ###
|
---|
| 376 |
|
---|
[5b5a56b] | 377 | .SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf) $(PcmSuf)
|
---|
[d7d2da3] | 378 |
|
---|
| 379 | %Dict.$(SrcSuf):
|
---|
| 380 | @mkdir -p $(@D)
|
---|
| 381 | @echo ">> Generating $@"
|
---|
[0d60c9d] | 382 | @rootcint -f $@ -c -Iexternal $<
|
---|
[d7d2da3] | 383 | @echo "#define private public" > $@.arch
|
---|
| 384 | @echo "#define protected public" >> $@.arch
|
---|
| 385 | @mv $@ $@.base
|
---|
| 386 | @cat $@.arch $< $@.base > $@
|
---|
| 387 | @rm $@.arch $@.base
|
---|
| 388 |
|
---|
[5b5a56b] | 389 | %Dict$(PcmSuf):
|
---|
| 390 | @echo ">> Copying $@"
|
---|
| 391 | @cp $< $@
|
---|
| 392 |
|
---|
[00bcbe6] | 393 | $(DELPHES_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
|
---|
| 394 | @mkdir -p $(@D)
|
---|
| 395 | @echo ">> Compiling $<"
|
---|
| 396 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 397 |
|
---|
| 398 | $(DISPLAY_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
|
---|
| 399 | @mkdir -p $(@D)
|
---|
| 400 | @echo ">> Compiling $<"
|
---|
| 401 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 402 |
|
---|
| 403 | $(DELPHES_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
|
---|
[d7d2da3] | 404 | @mkdir -p $(@D)
|
---|
| 405 | @echo ">> Compiling $<"
|
---|
| 406 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 407 |
|
---|
[00bcbe6] | 408 | $(DISPLAY_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
|
---|
[d7d2da3] | 409 | @mkdir -p $(@D)
|
---|
| 410 | @echo ">> Compiling $<"
|
---|
| 411 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 412 |
|
---|
| 413 | $(TCL_OBJ): tmp/%.$(ObjSuf): %.c
|
---|
| 414 | @mkdir -p $(@D)
|
---|
| 415 | @echo ">> Compiling $<"
|
---|
[9582d01] | 416 | @$(CC) $(patsubst -std=%,,$(CXXFLAGS)) -c $< $(OutPutOpt)$@
|
---|
[d7d2da3] | 417 |
|
---|
| 418 | $(EXECUTABLE_OBJ): tmp/%.$(ObjSuf): %.cpp
|
---|
| 419 | @mkdir -p $(@D)
|
---|
| 420 | @echo ">> Compiling $<"
|
---|
| 421 | @$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
|
---|
| 422 |
|
---|
[00bcbe6] | 423 | $(EXECUTABLE): %$(ExeSuf): $(DELPHES_DICT_OBJ) $(DELPHES_OBJ) $(TCL_OBJ)
|
---|
[d7d2da3] | 424 | @echo ">> Building $@"
|
---|
[00bcbe6] | 425 | @$(LD) $(LDFLAGS) $^ $(DELPHES_LIBS) $(OutPutOpt)$@
|
---|
[d7d2da3] | 426 |
|
---|
| 427 | ###
|
---|
| 428 |
|
---|
| 429 | }
|
---|