forked from scikit-hep/pyjet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (31 loc) · 978 Bytes
/
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
# simple makefile to simplify repetitive build env management tasks under posix
PYTHON := $(shell which python)
CYTHON := $(shell which cython)
NOSETESTS := $(shell which nosetests)
CYTHON_PYX := pyjet/src/_libpyjet.pyx
CYTHON_CPP := $(CYTHON_PYX:.pyx=.cpp)
all: clean inplace
clean-pyc:
@find . -name "*.pyc" -exec rm {} \;
clean-so:
@find pyjet -name "*.so" -exec rm {} \;
clean-build:
@rm -rf build
clean: clean-build clean-pyc clean-so
.SECONDEXPANSION:
%.cpp: %.pyx $$(filter-out $$@,$$(wildcard $$(@D)/*))
@echo "compiling $< ..."
$(CYTHON) -a --cplus --fast-fail --line-directives $<
cython: $(CYTHON_CPP)
clean-cython:
@rm -f $(CYTHON_CPP)
in: inplace # just a shortcut
inplace:
@$(PYTHON) setup.py build_ext -i
test: inplace
@$(NOSETESTS) -s -v pyjet
sdist: clean
@$(PYTHON) setup.py sdist
valgrind: inplace
valgrind --log-file=valgrind.log --tool=memcheck --leak-check=full \
--suppressions=etc/valgrind-python.supp $(NOSETESTS) -s -v pyjet