unicorn/bindings/python/Makefile

85 lines
2.2 KiB
Makefile
Raw Normal View History

2015-08-21 07:04:50 +00:00
# Python binding for Unicorn engine. Nguyen Anh Quynh <aquynh@gmail.com>
.PHONY: gen_const install install3 clean sdist sdist3 bdist bdist3 sdist_win bdist_win
2015-08-21 07:04:50 +00:00
gen_const:
cd .. && python const_generator.py python
install:
rm -rf src/ dist/
2015-08-21 07:04:50 +00:00
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
if test -n "${DESTDIR}"; then \
python setup.py install --root="${DESTDIR}"; \
2015-08-21 07:04:50 +00:00
else \
python setup.py install; \
2015-08-21 07:04:50 +00:00
fi
install3:
rm -rf src/ dist/
2015-08-21 07:04:50 +00:00
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
if test -n "${DESTDIR}"; then \
python3 setup.py install --root="${DESTDIR}"; \
2015-08-21 07:04:50 +00:00
else \
python3 setup.py install; \
2015-08-21 07:04:50 +00:00
fi
# build & upload PyPi package with source code of the core
sdist:
rm -rf src/ dist/
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
python setup.py sdist register upload
# build & upload PyPi package with source code of the core
sdist3:
rm -rf src/ dist/
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
python3 setup.py sdist register upload
# build & upload PyPi package with precompiled core
bdist:
rm -rf src/ dist/
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
python setup.py bdist_wheel register upload
# build & upload PyPi package with precompiled core
bdist3:
rm -rf src/ dist/
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
python3 setup.py bdist_wheel register upload
2015-08-21 07:04:50 +00:00
# build & upload PyPi package with prebuilt core
# NOTE: be sure to have precompiled core under prebuilt/win*/ beforehand
sdist_win:
rm -rf src/ dist/
python setup.py sdist register upload
# build & upload PyPi package with prebuilt core
# NOTE: be sure to have precompiled core under prebuilt/win*/ beforehand
sdist3_win:
rm -rf src/ dist/
python3 setup.py sdist register upload
clean:
rm -rf src/ dist/ build/ MANIFEST
2015-08-21 07:04:50 +00:00
rm -rf prebuilt/win64/unicorn.dll
rm -rf prebuilt/win32/unicorn.dll
rm -rf unicorn/lib unicorn/include
rm -rf unicorn/*.pyc
rm -rf unicorn.egg-info
2015-08-21 07:04:50 +00:00
SAMPLES = sample_arm.py sample_arm64.py sample_mips.py
SAMPLES += sample_sparc.py sample_m68k.py sample_x86.py
check:
@for t in $(SAMPLES); do \
echo Check $$t ... ; \
./$$t > /dev/null && echo OK || echo FAILED; \
done