forked from fortran-lang/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.manual
33 lines (25 loc) · 874 Bytes
/
Makefile.manual
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
# Fortran stdlib Makefile
FC ?= gfortran
# -fno-range-check needed for hash functions for gfortran-9
FFLAGS ?= -Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fno-range-check
ADD_FYPPFLAGS ?=
VERSION := $(subst ., ,$(file < VERSION))
VERSION_FYPPFLAGS += \
-DPROJECT_VERSION_MAJOR=$(word 1,$(VERSION)) \
-DPROJECT_VERSION_MINOR=$(word 2,$(VERSION)) \
-DPROJECT_VERSION_PATCH=$(word 3,$(VERSION))
FYPPFLAGS := $(ADD_FYPPFLAGS) $(VERSION_FYPPFLAGS)
export FC
export FFLAGS
export FYPPFLAGS
.PHONY: all clean test
all:
$(MAKE) -f Makefile.manual --directory=src
$(MAKE) -f Makefile.manual --directory=src/tests
test:
$(MAKE) -f Makefile.manual --directory=src/tests test
@echo
@echo "All tests passed."
clean:
$(MAKE) -f Makefile.manual clean --directory=src
$(MAKE) -f Makefile.manual clean --directory=src/tests