-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
54 lines (42 loc) · 1.04 KB
/
Makefile.in
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
# Setting commands and paths.
CARGO=@CARGO@
RUSTC=@RUSTC@
PYTHON=@PYTHON@
PIP=@PIP@
MATURIN=@MATURIN@
WHEELS_DIR=./target/wheels
# Build
.PHONY: python_native_extension
python_native_extension:
${MATURIN} build --release
if [ -f "`pwd`/src/fibonacci_number.so" ]; then \
rm -f "`pwd`/examples/fibonacci_number.so"; \
fi;
ln -s "`pwd`/target/release/libfibonacci_number.so" ./examples/fibonacci_number.so;
# Profiling
.PHONY: profiling
profiling:
cd examples && ${PYTHON} -m cProfile fibonacci_accelerate.py profiling
cd examples && ${PYTHON} -m cProfile fibonacci_pure_python.py profiling
# Install .whl
.PHONY: install
install:
${PIP} install --user ${WHEELS_DIR}/*.whl
# Uninstall .whl
.PHONY: uninstall
uninstall:
${PIP} uninstall fibonacci_number
# Cleanup working dir.
.PHONY: clean
clean:
${CARGO} clean;
-rm -f "`pwd`/examples/fibonacci_number.so"
.PHONY: distclean
distclean:
${CARGO} clean
-rm -f "`pwd`/examples/fibonacci_number.so"
-rm -fr autom4te.cache
-rm -f config.log
-rm -f config.status
-rm -f configure
-rm -f Makefile