[430] | 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 | |
---|
| 27 | CPPFLAGS += -D_IFORT |
---|
| 28 | |
---|
| 29 | ################ |
---|
| 30 | # Unix Settings |
---|
| 31 | # |
---|
| 32 | ifneq ($(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 | |
---|
| 45 | FFLAGS = -m$(ARCH) -O$(NOPT) -warn all -warn nounused -c |
---|
| 46 | |
---|
| 47 | # |
---|
| 48 | # options flags |
---|
| 49 | # |
---|
| 50 | |
---|
| 51 | ifeq ($(DEBUG),yes) |
---|
| 52 | FFLAGS += -g -gdwarf-2 -check all |
---|
| 53 | endif |
---|
| 54 | |
---|
| 55 | ifeq ($(PROFILE),yes) |
---|
| 56 | FFLAGS += -p |
---|
| 57 | endif |
---|
| 58 | |
---|
| 59 | ifeq ($(SHARED),yes) |
---|
| 60 | FFLAGS += -fPIC |
---|
| 61 | endif |
---|
| 62 | |
---|
| 63 | # |
---|
| 64 | # extra flags |
---|
| 65 | # |
---|
| 66 | |
---|
| 67 | FFLAGS += -mp1 -fp-model strict -assume noold_unit_star \ |
---|
| 68 | -module $(OBJDIR) $(addprefix -I,$(FC_DIR)) |
---|
| 69 | |
---|
| 70 | ifneq ($(CXXNAME),) |
---|
| 71 | FFLAGS += -fexceptions |
---|
| 72 | endif |
---|
| 73 | |
---|
| 74 | ifeq ($(OSTYPE),Darwin) |
---|
| 75 | FFLAGS += -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 |
---|
| 76 | endif |
---|
| 77 | |
---|
| 78 | endif # Unix Settings |
---|
| 79 | |
---|
| 80 | # | |
---|
| 81 | # o---------------------------------------------------------------------o |
---|
| 82 | # | |
---|
| 83 | |
---|
| 84 | ################### |
---|
| 85 | # Windows Settings |
---|
| 86 | # |
---|
| 87 | ifeq ($(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 | |
---|
| 100 | FFLAGS = /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 | |
---|
| 109 | ifeq ($(DEBUG),yes) |
---|
| 110 | FFLAGS += /debug:full /check:all |
---|
| 111 | endif |
---|
| 112 | |
---|
| 113 | ifeq ($(PROFILE),yes) |
---|
| 114 | FFLAGS += /Qprof-use |
---|
| 115 | endif |
---|
| 116 | |
---|
| 117 | # |
---|
| 118 | # extra flags |
---|
| 119 | # |
---|
| 120 | |
---|
| 121 | FFLAGS += /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 | |
---|
| 129 | IFORT_FC1 := -D% -I% /O0 |
---|
| 130 | IFORT_FC2 := /D% /I% /Od |
---|
| 131 | |
---|
| 132 | FC_tr = $(strip $(subst $(SPACE)-o , /Fo,$(call trans,$(IFORT_FC1),$(IFORT_FC2),$1))) |
---|
| 133 | |
---|
| 134 | endif # Windows Settings |
---|
| 135 | |
---|
| 136 | # end of makefile |
---|