source: PSPA/madxPSPA/make/compiler.ifort @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 2.4 KB
Line 
1# |
2# o---------------------------------------------------------------------o
3# |
4# | MAD makefile - ifort compiler settings
5# |
6# o---------------------------------------------------------------------o
7# |
8# | Methodical Accelerator Design
9# |
10# | Copyright (c) 2011+ CERN, mad@cern.ch
11# |
12# | For more information, see http://cern.ch/mad
13# |
14# o---------------------------------------------------------------------o
15# |
16# | $Id$
17# |
18
19#####################
20# IFORT specific
21#
22
23#
24# preprocessor flags
25#
26
27CPPFLAGS += -D_IFORT
28
29################
30# Unix Settings
31#
32ifneq ($(OSTYPE),Windows)
33
34#
35# makedep
36#
37
38# fortran dependencies computation requires mod files (i.e. loops)
39# FDEP = $(FC) -gen-dep -module $(OBJDIR) $(addprefix -I,$(FC_DIR))
40
41#
42# compiler flags
43#
44
45FFLAGS = -m$(ARCH) -O$(NOPT) -warn all -warn nounused -c
46
47#
48# options flags
49#
50
51ifeq ($(DEBUG),yes)
52FFLAGS += -g -gdwarf-2 -check all
53endif
54
55ifeq ($(PROFILE),yes)
56FFLAGS += -p
57endif
58
59ifeq ($(SHARED),yes)
60FFLAGS += -fPIC
61endif
62
63#
64# extra flags
65#
66
67FFLAGS += -mp1 -fp-model strict -assume noold_unit_star \
68          -module $(OBJDIR) $(addprefix -I,$(FC_DIR))
69
70ifneq ($(CXXNAME),)
71FFLAGS += -fexceptions
72endif
73
74ifeq ($(OSTYPE),Darwin)
75FFLAGS += -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5
76endif
77
78endif # Unix Settings
79
80# |
81# o---------------------------------------------------------------------o
82# |
83
84###################
85# Windows Settings
86#
87ifeq ($(OSTYPE),Windows)
88
89#
90# makedep
91#
92
93# fortran dependencies computation requires mod files (i.e. loops)
94# FDEP = $(FC) -gen-dep -module $(OBJDIR) $(addprefix -I,$(FC_DIR))
95
96#
97# compiler flags
98#
99
100FFLAGS = /O$(NOPT) /warn:all /warn:nounused /c
101
102# Trig too many warnings for the moment!
103# FFLAGS  = /stand:f95 /warn all /c
104
105#
106# options flags
107#
108
109ifeq ($(DEBUG),yes)
110FFLAGS += /debug:full /check:all
111endif
112
113ifeq ($(PROFILE),yes)
114FFLAGS += /Qprof-use
115endif
116
117#
118# extra flags
119#
120
121FFLAGS += /nologo /Qprec /fp:source /fpp \
122          /names:lowercase /assume:underscore /assume:noold_unit_star \
123          /module:$(OBJDIR) $(addprefix /I,$(FC_DIR))
124
125#
126# command translator
127#
128
129IFORT_FC1 := -D%  -I%  /O0
130IFORT_FC2 := /D%  /I%  /Od
131
132FC_tr = $(strip $(subst $(SPACE)-o , /Fo,$(call trans,$(IFORT_FC1),$(IFORT_FC2),$1)))
133
134endif # Windows Settings
135
136# end of makefile
Note: See TracBrowser for help on using the repository browser.