~maddevelopers/mg5amcnlo/2.7.0_gpu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
STDLIB = -lc++
STDLIB_FLAG = -stdlib=libc++
MACFLAG = -mmacosx-version-min=10.7
DEFAULT_F_COMPILER = gfortran
DEFAULT_F2PY_COMPILER = f2py
DEFAULT_CPP_COMPILER = g++
#end_of_make_opts_variables

# Rest of the makefile
ifeq ($(origin FFLAGS),undefined)
  #FFLAGS= -O -w
  FFLAGS = -O -fno-automatic
  #FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall
endif

# REMOVE MACFLAG IF NOT ON MAC 
UNAME := $(shell uname -s)
ifneq ($(UNAME), Darwin)
    MACFLAG=  
endif


ifeq ($(origin CXXFLAGS),undefined)
  #CXXFLAGS= -g 
  CXXFLAGS = -O $(STDLIB_FLAG) $(MACFLAG)
endif

ifeq ($(origin CFLAGS),undefined)
  #CFLAGS= -g 
  CFLAGS = -O  $(STDLIB_FLAG) $(MACFLAG)
endif

# REMOVE MACFLAG IF IN F2PY mode
ifdef f2pymode
    MACFLAG= 
endif

# Increase the number of allowed charcters in a Fortran line
FFLAGS+= -ffixed-line-length-132

# Set FC unless it's defined by an environment variable
ifeq ($(origin FC),default)
#  FC=g77
  FC=$(DEFAULT_F_COMPILER)
endif
# Set F2PY unless it's defined by an environment variable
ifeq ($(origin F2PY),undefined)
  F2PY=$(DEFAULT_F2PY_COMPILER)
endif

UNAME := $(shell uname -s)
ifeq ($(origin LDFLAGS), undefined)
     LDFLAGS=$(STDLIB) $(MACFLAG)
endif
# Options: dynamic, lhapdf

UNAME := $(shell uname)

# Option dynamic

ifdef dynamic
  ifeq ($(UNAME), Darwin)
    libext=dylib
    FFLAGS+= -fno-common
    LDFLAGS += -bundle
    define CREATELIB
      $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2)
    endef
  else
    libext=so
    FFLAGS+= -fPIC
    LDFLAGS += -shared
    define CREATELIB
      $(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2)
    endef
  endif
else
  libext=a
  define CREATELIB
    $(AR) cru $(1) $(2)
    ranlib $(1)
  endef
endif

# Option lhapdf

ifneq ($(lhapdf),)
  CXXFLAGS += $(shell $(lhapdf) --cppflags)
  ifeq ($(lhapdfversion),6)
    alfas_functions=alfas_functions_lhapdf6
  else
    alfas_functions=alfas_functions_lhapdf
  endif
  llhapdf = $(shell $(lhapdf) --libs)
  reweight_xsec_events_pdf_dummy=
else
  alfas_functions=alfas_functions
  llhapdf=
  reweight_xsec_events_pdf_dummy=reweight_xsec_events_pdf_dummy.o
endif

# Set CXX unless it's defined by an environment variable
ifeq ($(origin CXX),default)
   CXX=$(DEFAULT_CPP_COMPILER) -std=c++11
endif


# Option APPLGrid
ifneq ($(applgrid),)
  APPLLIBS=$(shell applgrid-config --ldcflags) $(shell amcfast-config --ldflags)
  applgrid_interface=appl_interface.o
else
  APPLLIBS=
  applgrid_interface=appl_interface_dummy.o
endif

# Madloop
ifdef madloop
  ifeq (,$(wildcard parton_lum_0.f)) # this is to skip ML for LOonly
   libmadloop=libMadLoop.a
   libcuttools=-lcts %(link_tir_libs)s
  endif 
else
  libmadloop=
  libcuttools=
endif

# OLP (virtuals) necessary link
libOLP=