Commit f9b9a84c authored by ulrich_y's avatar ulrich_y
Browse files

Added ifort

parent 3d3d01c3
......@@ -10,12 +10,11 @@ ifeq ($(HAVE_GINAC),1)
LD=g++
LFLAGS=-lgfortran
else
LD=gfortran
LD=$(FC)
endif
CFLAGS=-std=c99
FFLAGS=-fdefault-real-8 -cpp -pedantic-errors -std=f2008
ifeq ($(FC),gfortran)
FFLAGS=-fdefault-real-8 -cpp -pedantic-errors -std=f2008 -J build
FFLAGS+= -Werror -Wall -Wno-maybe-uninitialized -Wno-uninitialized
ifeq ($(MODE),RELEASE)
......@@ -29,11 +28,19 @@ ifeq ($(HAVE_GINAC),1)
FFLAGS += -DHAVE_GINAC
endif
else
FFLAGS=-autodouble -module build -fpp -stand f03 -O3 -xHost -fast
endif
CFLAGS=-std=c99
files=globals.o ieps.o utils.o shuffle.o maths_functions.o mpl_module.o gpl_module.o GPL.o
objects = $(addprefix build/,$(files))
ifeq ($(FC),gfortran)
all: libgpl.a gpl eval test
else
all: libgpl.a eval test
endif
libgpl.a:$(objects)
@echo "AR $@"
......@@ -42,7 +49,7 @@ libgpl.a:$(objects)
# rules to make object files into /build
build/%.o: src/%.f90
@echo "F90 $@"
@$(FC) $(FFLAGS) -c $< -J build -o $@
@$(FC) $(FFLAGS) -c $< -o $@
build/%.o: src/%.cpp
@echo "C++ $@"
......@@ -50,6 +57,7 @@ build/%.o: src/%.cpp
# Mathlink related
ifeq ($(FC),gfortran)
build/mcc.internals.tmp:
@echo "MCC --internals"
@$(MCC) --internals > $@
......
......@@ -110,8 +110,11 @@ CONTAINS
RECURSIVE FUNCTION factorial(n) result(res)
integer, intent(in) :: n
integer :: res
res = merge(1,n*factorial(n-1),n==0)
integer :: res, i
res = 1
do i=n,1,-1
res = res*i
enddo
END FUNCTION factorial
FUNCTION shuffle_with_zero(a) result(res)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment