mirror of
https://github.com/capstone-engine/capstone
synced 2026-08-11 16:26:07 -04:00
* Basic changes of new arch - BPF * Define some constants * defined some API methods * Able to print MISC instruction * Follow Linux coding style * Ability to show ALU insn names * decode return * Add suite/MC/BPF * decode jump * decode store * decode load * print instruction done * try to implement BPF_reg_access * Implements explicit accessed registers and fix some tiny bugs * Fix unhandled ja case * Added BPF_REG_OFF do fix wrong display in jump class * Great I'm able to decode cBPF with eyes * Fix: misunderstood the 16-byte instruction's imm * Add ldxdw * Add extended-all.cs * Implements cstest/bpf_getdetail.c * Fix memory leak * Add BPF to fuzz * Implemented regs_read and regs_write * Fix missing write-access on ALU's dst * Updated cstool/, test_basic.c, test_detail.c, and test_iter.c * Updated docs * Fix type of cs_bpf#operands * Implements python bindings * Fix some bugs found by self code review * Remove dummy tests * remove typeof * Address comments * Fix MSVC's warnings and add test_bpf.py to bindings/python/Makefile * Fix: call is not offset
82 lines
2.1 KiB
Makefile
82 lines
2.1 KiB
Makefile
PYTHON2 = python
|
|
PYTHON3 = python3
|
|
|
|
.PHONY: gen_const install install3 install_cython sdist sdist3 bdist bdist3 clean check
|
|
|
|
gen_const:
|
|
cd .. && $(PYTHON2) const_generator.py python
|
|
|
|
install:
|
|
rm -rf src/
|
|
if test -n "${DESTDIR}"; then \
|
|
$(PYTHON2) setup.py build install --root="${DESTDIR}"; \
|
|
else \
|
|
$(PYTHON2) setup.py build install; \
|
|
fi
|
|
|
|
install3:
|
|
rm -rf src/
|
|
if test -n "${DESTDIR}"; then \
|
|
$(PYTHON3) setup.py build install --root="${DESTDIR}"; \
|
|
else \
|
|
$(PYTHON3) setup.py build install; \
|
|
fi
|
|
|
|
# NOTE: Newer cython can be installed by: sudo pip install --upgrade cython
|
|
install_cython:
|
|
rm -rf src/
|
|
if test -n "${DESTDIR}"; then \
|
|
$(PYTHON2) setup_cython.py build install --root="${DESTDIR}"; \
|
|
else \
|
|
$(PYTHON2) setup_cython.py build install; \
|
|
fi
|
|
|
|
install3_cython:
|
|
rm -rf src/
|
|
if test -n "${DESTDIR}"; then \
|
|
$(PYTHON3) setup_cython.py build install --root="${DESTDIR}"; \
|
|
else \
|
|
$(PYTHON3) setup_cython.py build install; \
|
|
fi
|
|
|
|
# build & upload PyPi package with source code of the core
|
|
sdist:
|
|
rm -rf src/ dist/
|
|
$(PYTHON2) setup.py sdist register upload
|
|
|
|
# build & upload PyPi package with source code of the core
|
|
sdist3:
|
|
rm -rf src/ dist/
|
|
$(PYTHON3) setup.py sdist register upload
|
|
|
|
# build & upload PyPi package with prebuilt core
|
|
bdist:
|
|
rm -rf src/ dist/
|
|
$(PYTHON2) setup.py bdist_wheel register upload
|
|
|
|
# build & upload PyPi package with prebuilt core
|
|
bdist3:
|
|
rm -rf src/ dist/
|
|
$(PYTHON3) setup.py bdist_wheel register upload
|
|
|
|
clean:
|
|
rm -rf build/ src/ dist/ *.egg-info
|
|
rm -rf capstone/lib capstone/include pyx/lib pyx/include
|
|
rm -f pyx/*.c pyx/__init__.py
|
|
for f in capstone/*.py; do rm -f pyx/$$(basename $$f)x; done
|
|
rm -f MANIFEST
|
|
rm -f *.pyc capstone/*.pyc
|
|
|
|
|
|
TESTS = test_basic.py test_detail.py test_arm.py test_arm64.py test_m68k.py test_mips.py
|
|
TESTS += test_ppc.py test_sparc.py test_systemz.py test_x86.py test_xcore.py test_tms320c64x.py
|
|
TESTS += test_m680x.py test_skipdata.py test_mos65xx.py test_bpf.py
|
|
TESTS += test_evm.py
|
|
|
|
check:
|
|
@for t in $(TESTS); do \
|
|
echo Check $$t ... ; \
|
|
./$$t > /dev/null; \
|
|
if [ $$? -eq 0 ]; then echo OK; else echo FAILED; exit 1; fi \
|
|
done
|
|
|