1 | BIASDIR = ../
|
---|
2 | SOURCEDIR = ../..
|
---|
3 | include $(SOURCEDIR)/make_opts
|
---|
4 |
|
---|
5 | include ./bias_dependencies
|
---|
6 |
|
---|
7 | all: PY8_CKKW
|
---|
8 |
|
---|
9 | clean:
|
---|
10 | $(RM) *.o $(BIASLIBDIR)$(BIASLIBRARY)
|
---|
11 |
|
---|
12 | INCLUDES = $(BIASDIR)/bias.inc \
|
---|
13 | $(SOURCEDIR)/maxparticles.inc \
|
---|
14 | $(SOURCEDIR)/nexternal.inc \
|
---|
15 | $(SOURCEDIR)/run_config.inc \
|
---|
16 | $(SOURCEDIR)/lhe_event_infos.inc \
|
---|
17 | $(SOURCEDIR)/run.inc \
|
---|
18 | $(SOURCEDIR)/cuts.inc
|
---|
19 |
|
---|
20 | #
|
---|
21 | # Compilation of the module ptj_bias
|
---|
22 | #
|
---|
23 | PY8_CKKW.o: PY8_CKKW.f $(INCLUDES)
|
---|
24 | $(FC) $(FFLAGS) $(LDFLAGS) -c -o PY8_CKKW.o PY8_CKKW.f
|
---|
25 |
|
---|
26 | #
|
---|
27 | # Generate the copy of the relevant cards in the module C++ headers so that they are compiled
|
---|
28 | # directly in the executable and do not have to be read at run time.
|
---|
29 | #
|
---|
30 | param_card.h: ../../../Cards/param_card.dat
|
---|
31 | python -c "out=open('param_card.h','w'); out.write('const std::string ParamCard = \"%s\";'%'\\\n\"\n\"'.join([line for line in open('../../../Cards/param_card.dat').read().replace('\"',r'\"').split('\n')])); out.close();"
|
---|
32 |
|
---|
33 | run_card.h: ../../../Cards/run_card.dat
|
---|
34 | python -c "out=open('run_card.h','w'); out.write('const std::string RunCard = \"%s\";'%'\\\n\"\n\"'.join([line for line in open('../../../Cards/run_card.dat').read().replace('\"',r'\"').split('\n')])); out.close();"
|
---|
35 |
|
---|
36 | proc_card.h: ../../../Cards/proc_card_mg5.dat
|
---|
37 | python -c "out=open('proc_card.h','w'); out.write('const std::string ProcCard = \"%s\";'%'\\\n\"\n\"'.join([line for line in open('../../../Cards/proc_card_mg5.dat').read().replace('\"',r'\"').split('\n')])); out.close();"
|
---|
38 |
|
---|
39 | py8_mg5amc_bias_interface.o: py8_mg5amc_bias_interface.cc param_card.h run_card.h proc_card.h
|
---|
40 | $(DEFAULT_CPP_COMPILER) $(CXXFLAGS) $(PY8CXXFLAGS) $(LDFLAGS) $(PY8LIBS) -c -o py8_mg5amc_bias_interface.o py8_mg5amc_bias_interface.cc
|
---|
41 |
|
---|
42 | PY8_CKKW: PY8_CKKW.o py8_mg5amc_bias_interface.o
|
---|
43 | $(call CREATELIB, $(BIASLIBDIR)$(BIASLIBRARY), $^)
|
---|
44 |
|
---|
45 | #
|
---|
46 | # List of the requirements for this module.
|
---|
47 | # 'VALID' is the keyword that *must* be returned if everything is in order.
|
---|
48 | #
|
---|
49 | requirements:
|
---|
50 | ifeq ($(shell $(call CHECK_MG5AMC_VERSION,2.4.2)),True)
|
---|
51 | ifeq ($(PYTHIA8_PATH),NotInstalled)
|
---|
52 | @echo "Error: This module requires Pythia8. Consider installing it with the command 'install pythia8'."
|
---|
53 | else
|
---|
54 | @echo "VALID"
|
---|
55 | endif
|
---|
56 | else
|
---|
57 | @echo "Error:: MG5aMC is not recent enough (found "$(MG5AMC_VERSION)")"
|
---|
58 | @echo "FAIL"
|
---|
59 | endif
|
---|