• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.PHONY: gen_const install install3 install_cython sdist sdist3 bdist bdist3 clean check
2
3gen_const:
4	cd .. && python const_generator.py python
5
6install:
7	rm -rf src/
8	if test -n "${DESTDIR}"; then \
9		python setup.py build install --root="${DESTDIR}"; \
10	else \
11		python setup.py build install; \
12	fi
13
14install3:
15	rm -rf src/
16	if test -n "${DESTDIR}"; then \
17		python3 setup.py build install --root="${DESTDIR}"; \
18	else \
19		python3 setup.py build install; \
20	fi
21
22# NOTE: Newer cython can be installed by: sudo pip install --upgrade cython
23install_cython:
24	rm -rf src/
25	if test -n "${DESTDIR}"; then \
26		python setup_cython.py build install --root="${DESTDIR}"; \
27	else \
28		python setup_cython.py build install; \
29	fi
30
31install3_cython:
32	rm -rf src/
33	if test -n "${DESTDIR}"; then \
34		python3 setup_cython.py build install --root="${DESTDIR}"; \
35	else \
36		python3 setup_cython.py build install; \
37	fi
38
39# build & upload PyPi package with source code of the core
40sdist:
41	rm -rf src/ dist/
42	python setup.py sdist register upload
43
44# build & upload PyPi package with source code of the core
45sdist3:
46	rm -rf src/ dist/
47	python3 setup.py sdist register upload
48
49# build & upload PyPi package with prebuilt core
50bdist:
51	rm -rf src/ dist/
52	python setup.py bdist_wheel register upload
53
54# build & upload PyPi package with prebuilt core
55bdist3:
56	rm -rf src/ dist/
57	python3 setup.py bdist_wheel register upload
58
59clean:
60	rm -rf build/ src/ dist/ *.egg-info
61	rm -rf capstone/lib capstone/include pyx/lib pyx/include
62	rm -f pyx/*.c pyx/__init__.py
63	for f in capstone/*.py; do rm -f pyx/$$(basename $$f)x; done
64	rm -f MANIFEST
65
66
67TESTS = test_basic.py test_detail.py test_arm.py test_arm64.py test_mips.py test_ppc.py
68TESTS += test_sparc.py test_systemz.py test_x86.py test_xcore.py test_skipdata.py
69check:
70	@for t in $(TESTS); do \
71		echo Check $$t ... ; \
72		./$$t > /dev/null && echo OK || echo FAILED; \
73	done
74
75