-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile.rules
87 lines (51 loc) · 1.29 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
#
# Makefile rules for compiling examples.
#
vpath %.f90 $(VPATHS)
vpath %.c $(VPATHS)
vpath %.f $(VPATHS)
$(EXE): $(OBJ)
ifeq ($(MKVERBOSE),TRUE)
$(FC) $(FFLAGS) $(FFLAGS_EXTRA) $^ $(OUTPUT_OPTION) $(LDFLAGS)
else
@echo "Linking..."
@$(FC) $(FFLAGS) $(FFLAGS_EXTRA) $^ $(OUTPUT_OPTION) $(LDFLAGS)
endif
build/%.o build/%.mod: %.f90
@mkdir -p build
@mkdir -p include
ifeq ($(MKVERBOSE),TRUE)
$(FC) $(FFLAGS) $(FFLAGS_EXTRA) -c $< $(OUTPUT_OPTION)
else
@echo "Building $<..."
@$(FC) $(FFLAGS) $(FFLAGS_EXTRA) -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) $(FFLAGS_EXTRA) -c -w $< $(OUTPUT_OPTION)
else
@echo "Building $<..."
@$(FC) $(FFLAGS_EXTRA) -c -w $< $(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 $(FSRC) > .depend
include $(LIBPFASST)/.depend