-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
56 lines (43 loc) · 1.37 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
################################################################################
#
# Makefile for PyDQED
#
################################################################################
F90=gfortran
CFLAGS=-fPIC -O3
all: DQED cython
cython:
python setup.py build_ext --build-lib . --build-temp build --pyrex-c-in-temp
install:
python setup.py install
DQED: libdqed.a
libdqed.a: build/dqed.o
ar rcs libdqed.a build/dqed.o
build/dqed.o: dqed.f90
mkdir -p build
$(F90) $(CFLAGS) -c dqed.f90 -o build/dqed.o
clean: clean-DQED clean-cython
rm -rf build
clean-DQED:
rm build/dqed.o libdqed.a
clean-cython:
python setup.py clean --build-temp build
rm -f *.so *.pyc
help:
@echo ""
@echo "This makefile can be used to build PyDQED and its dependencies."
@echo ""
@echo "Typing \`make\` with no arguments will compile DQED to a static library"
@echo "and compile the PyDQED Python module that provides the Python interface"
@echo "to DQED."
@echo ""
@echo "Typing \`make clean\` will delete all of the intermediate build files,"
@echo "compiled libraries, and compiled Python modules for DQED and the PyDQED"
@echo "modules."
@echo ""
@echo "Individual dependencies can be specified using \`make <target>\`, where"
@echo "<target> is one of:"
@echo ""
@echo " DQED to compile the DQED code"
@echo " cython to compile the PyDQED Python wrapper modules"
@echo ""