-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (36 loc) · 966 Bytes
/
Makefile
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
# Defining Dummy Makefile for multiple compilation (ifort/gfotran)
#
#
binaries = image_consumer
CC = gcc
CFLAGS = -g -c -fPIC -Wall -std=gnu99
LDFLAGS = -shared -fPIC
LDOPTS = -lc
FORTRAN = ifort
ifeq ($(FORTRAN),ifort)
FC = /opt/intel/bin/ifort
FFLAGS = -c -free -fPIC -heap-arrays -O3 -g -traceback -Tf
FLDFLAGS = -g
FLDFLAGS_SHARED = -g -shared
FLDOPTS = -ldl
else
FC = gfortran
FFLAGS = -c -fPIC -fcray-pointer -O3 -g
FLDFLAGS = -g
FLDFLAGS_SHARED = -g -shared
FLDOPTS = -ldl
endif
all: image_consumer
image_consumer: generic_data_plugin.o image_consumer.o
$(FC) $(FLDFLAGS) -o $@ $^ $(FLDOPTS)
image_consumer.o: image_consumer.f90
$(FC) $(FFLAGS) $^ -o $@
generic_data_plugin.o: generic_data_plugin.f90
$(FC) $(FFLAGS) $^ -o $@
# Cleaning everything
clean:
rm -rf $(binaries)
rm -rf *.o
# rm -rf *.so
rm -rf *.mod
# End of the makefile