~maddevelopers/mg5amcnlo/WWW5_caching

« back to all changes in this revision

Viewing changes to users/mardelcourt/PROC_141512/PROC_141512/Source/make_opts

  • Committer: John Doe
  • Date: 2013-03-25 20:27:02 UTC
  • Revision ID: john.doe@gmail.com-20130325202702-5sk3t1r8h33ca4p4
first clean version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Environment variables
 
2
 
 
3
ifeq ($(origin FFLAGS),undefined)
 
4
  FFLAGS= -O -w
 
5
  #FFLAGS+= -g -fbounds-check -ffpe-trap=invalid,zero,overflow,underflow,denormal -Wall
 
6
endif
 
7
FFLAGS+= -ffixed-line-length-132
 
8
 
 
9
# Set FC unless it's defined by an environment variable
 
10
ifeq ($(origin FC),default)
 
11
  FC=gfortran
 
12
endif
 
13
 
 
14
# Options: dynamic, lhapdf
 
15
 
 
16
UNAME := $(shell uname)
 
17
 
 
18
# Option dynamic
 
19
 
 
20
ifdef dynamic
 
21
  ifeq ($(UNAME), Darwin)
 
22
    libext=dylib
 
23
    FFLAGS+= -fno-common
 
24
    LDFLAGS += -bundle
 
25
    define CREATELIB
 
26
      $(FC) -dynamiclib -undefined dynamic_lookup -o $(1) $(2)
 
27
    endef
 
28
  else
 
29
    libext=so
 
30
    FFLAGS+= -fPIC
 
31
    LDFLAGS += -shared
 
32
    define CREATELIB
 
33
      $(FC) $(FFLAGS) $(LDFLAGS) -o $(1) $(2)
 
34
    endef
 
35
  endif
 
36
else
 
37
  libext=a
 
38
  define CREATELIB
 
39
    $(AR) cru $(1) $(2)
 
40
    ranlib $(1)
 
41
  endef
 
42
endif
 
43
 
 
44
# Option lhapdf
 
45
 
 
46
ifdef lhapdf
 
47
  alfas_functions=alfas_functions_lhapdf
 
48
  lhapdf=-lLHAPDF -lstdc++
 
49
else
 
50
  alfas_functions=alfas_functions
 
51
  lhapdf=
 
52
endif