-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (41 loc) · 1.33 KB
/
Makefile
File metadata and controls
48 lines (41 loc) · 1.33 KB
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
# Start of the makefile
# Defining variables
#ifneq (,$(filter Windows%,$(OS)))
ifeq ($(OS),Windows_NT)
EXT = .exe
else
EXT =
endif
TARGET = AerOpt$(EXT)
OBJECTS = Toolbox.o InputData.o ReadData.o CreateSnapshots.o FDGD.o Smoothing.o GenerateMesh.o CFD.o Optimization.o Main.o
# Find all sources
#SOURCES:=$(wildcard *.f90)
# Make targets out of them
#OBJECTS:=$(SOURCES:%.f90=%.o) #NOTE Order is important sometimes
# Set default output
default :
make -s comment
comment :
echo " "
echo " Makefile for mgns2d "
echo " -------------------------- "
echo " clean to remove object files "
echo " ifort to compile and link with intel compiler"
echo " gfort to compile and link with gfortran compiler"
echo " "
ifort : COMP = ifort
ifort : FLAGS += -r8 -O3 -static -static-intel -mkl -I$(MKL_INC)/em64t/lp64 -I$(MKL_INC)/include -check all,noarg_temp_created
ifort : $(OBJECTS)
$(COMP) $(FLAGS) $(OBJECTS) -o $(TARGET) -L$(MKL_LIB) -Wl, -mkl -lpthread -lm
gfort : COMP = gfortran
gfort : FLAGS = -fdefault-real-8 -O3 -static -static-libgfortran
gfort : $(OBJECTS)
$(COMP) $(FLAGS) $(OBJECTS) -o $(TARGET)
# List of object files
%.o : %.f90
$(COMP) $(FLAGS) -c $<
# Cleaning everything
clean :
find .. -name '*.o' -delete
find .. -name '*.mod' -delete
# End of the makefile