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