forked from libpfasst/LibPFASST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.rules
97 lines (60 loc) · 1.51 KB
/
Makefile.rules
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Makefile rules for compiling examples.
#
vpath %.f90 $(VPATHS)
vpath %.c $(VPATHS)
vpath %.f $(VPATHS)
$(EXE): $(OBJ)
ifeq ($(MKVERBOSE),TRUE)
$(FC) $(FFLAGS) $^ $(OUTPUT_OPTION) $(LDFLAGS)
else
@echo "Linking..."
@$(FC) $(FFLAGS) $^ $(OUTPUT_OPTION) $(LDFLAGS)
endif
build/%.o build/%.mod: %.f90
@mkdir -p build
@mkdir -p include
ifeq ($(MKVERBOSE),TRUE)
$(FC) $(FFLAGS) -c $< $(OUTPUT_OPTION)
else
@echo "Building $<..."
@$(FC) $(FFLAGS) -c $< $(OUTPUT_OPTION)
endif
build/%.o: %.c
@mkdir -p build
@mkdir -p include
ifeq ($(MKVERBOSE),TRUE)
$(CC) $(CFLAGS) -c $< $(OUTPUT_OPTION)
else
@echo "Building $<..."
@$(CC) $(CFLAGS) -c $< $(OUTPUT_OPTION)
endif
build/%.o: %.f
@mkdir -p build
@mkdir -p include
ifeq ($(MKVERBOSE),TRUE)
$(FC) -c $< $(OUTPUT_OPTION)
else
@echo "Building $<..."
@$(FC) -c $< $(OUTPUT_OPTION)
endif
.PHONY: clean depend
clean:
\rm -f *.exe
\rm -rf build
\rm -f fort.* *.slog2 *.edf *.trc gmon.out
\rm -rf include
\rm -f lib/*.a
# We can use this to build a new dependency file if makedepf90 is installed type "make depend"
depend $(PWD)/.depend:
makedepf90 -b ./build $(addprefix src/,$(FSRC)) > .depend
#
# LIBPFASST dependencies
#
include $(LIBPFASST)/.depend
# Outdated dependencies
#ifdef NOMPI
# build/pfasst.o: build/pf_parallel.o build/pf_pfasst.o build/pf_imexQ.o build/pf_imexQ_oc.o build/pf_rks#tepper.o
#else
#build/pfasst.o: build/pf_parallel.o build/pf_pfasst.o build/pf_mpi.o build/pf_imexQ.o build/pf_rk#stepper.o
#endif