forked from UMEP-dev/SUEWS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (50 loc) · 1.23 KB
/
Copy pathMakefile
File metadata and controls
70 lines (50 loc) · 1.23 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# SUEWS Makefile - read the README file before editing
.PHONY: main clean test pip supy docs
# OS-specific configurations
ifeq ($(OS),Windows_NT)
PYTHON_exe = python.exe
# F2PY_PY= /c/Users/sunt05/Anaconda2/Scripts/f2py.py
# F2PY_EXE = $(PYTHON) $(F2PY_PY)
TARGET=$(MODULE).pyd
else
UNAME_S := $(shell uname -s)
TARGET=$(MODULE).so
ifeq ($(UNAME_S),Linux) # Linux
PYTHON_exe=python
# F2PY_EXE = f2py
endif
ifeq ($(UNAME_S),Darwin) # macOS
PYTHON_exe=python
# F2PY_EXE = f2py
endif
endif
MODULE=SUEWS_driver
suews_dir = src/suews
docs_dir = docs
test_dir= test
release_dir = Release
makefile = Makefile.gfortran
supy_dir = src/supy
PYTHON := $(if $(PYTHON_exe),$(PYTHON_exe),python)
all: test
# make suews driver library
suews:
$(MAKE) -C $(suews_dir) libdriver; # make SUEWS library
# -rm -rf *.o *.mod *.f95 *.a *.dSYM
# make supy dist and test
test:
$(MAKE) -C $(supy_dir) test
# make supy wheels using cibuild
wheel:
$(MAKE) -C $(supy_dir) wheel
# documentation
docs:
$(MAKE) -B -C $(docs_dir) html
# live html documentation
livehtml:
$(MAKE) -B -C $(docs_dir) livehtml
# If wanted, clean all *.o files after build
clean:
$(MAKE) -C $(suews_dir) clean
$(MAKE) -C $(supy_dir) clean
$(MAKE) -C $(docs_dir) clean