260 Commits

Author SHA1 Message Date
Albert Long
6f4fcff0e7 make.sh: fix ./make.sh ios issue (#1354) 2019-01-25 12:36:37 +08:00
Marius Melzer
171f28e1d4 Add missing-prototypes warning option (#1347) 2019-01-22 09:01:13 +08:00
rwmjones
ff11fa2805 Fix include path in pkg-config for Makefile too (#1339). (#1340)
Commit 0a39b785d3 fixed the pkg-config include path when using cmake.
However it didn't fix it for the Makefile.  This fixes the Makefile
path.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
2019-01-13 21:40:29 +08:00
Nguyen Anh Quynh
81e424c50a Merge branch 'master' into next 2018-12-20 02:58:23 +08:00
Sergei Trofimovich
f1d6952898 Makefile: fix 'make uninstall DESTDIR=foo' for #1311 (#1314)
Uninstall was prepending `$(DESTDIR)` twice to libdir:

```Makefile
LIBDIR = $(DESTDIR)$(PREFIX)/$(LIBDIRARCH)
...
uninstall:
    ...
    rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).*
```

The change drops prefixing on `uninstall` site.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2018-12-19 15:52:20 +08:00
Catena cyber
4f6e6045e9 Testing whole corpus only if present (#1313) 2018-12-19 15:43:31 +08:00
Nguyen Anh Quynh
08a2b5d931 Merge branch 'master' into next 2018-12-19 11:16:56 +07:00
Nguyen Anh Quynh
f8552dbd2b Makefile: more fix for #1312 2018-12-19 09:25:04 +07:00
Nguyen Anh Quynh
4d8d3573dc fix merge conflicts 2018-12-19 09:23:14 +07:00
Nguyen Anh Quynh
9ecc20f1bb Makefile: more fix for #1312 2018-12-19 09:21:07 +07:00
Nguyen Anh Quynh
4568e7c1cb fix #1311 & #1312 2018-12-19 09:41:34 +08:00
Nguyen Anh Quynh
3933674e62 mos65xx: solve conflicts 2018-12-16 20:09:28 +08:00
Catena cyber
3a0467cfea Use whole corpus for regression testing (#1302)
* Use whole corpus for regression testing

* differetial fuzzing against llvm-mc

* Download corpus from another repo
2018-12-11 09:33:31 +07:00
Sebastian Macke
87221fa742 Add support for the MOS65XX family such as the MOS 6502.
Signed-off-by: Sebastian Macke <sebastian@macke.de>
2018-12-06 22:53:33 +01:00
Catena cyber
a69f7880a8 Continuous integration for fuzzing (#1297)
* Continuous integration for fuzzing

* Simplify fuzz testing output

* Makefile for suite fuzz

* fixup

* Code review taken into acount

* More readable fuzz harness

Inputs specify only on first line the mode
2018-12-04 15:02:16 +07:00
amirgon
29893c63e3 Recognize MSYS compiler as MINGW compiler (#1290) 2018-11-21 00:46:12 +08:00
blacktop
0999ad1b5e Remove i386 from Makefile (#1260) 2018-10-03 15:21:54 +08:00
Nguyen Anh Quynh
44bcb2fa38 MacOS: do not build in Universal format by default 2018-07-28 00:24:14 +08:00
Nguyen Anh Quynh
afffa5d741 merge next to master 2018-07-20 12:36:50 +08:00
Stephen
9361378e85 Cleanup build process (#1140)
* Cleanup build process

avoiding bash subshells (which happen in for loops) because they
like to selectively inherit environment variables

* address restrictions of osx sip

see https://github.com/nteract/nteract/issues/1523#issuecomment-284027093
2018-05-25 20:59:30 +08:00
Stephen
99ecb1e287 Move functionality from make.sh to Makefile (#1142)
simplifies builds, prevents overriding of options
2018-05-17 16:30:05 +08:00
Stephen
5e184ec3c7 Move functionality from make.sh to Makefile (#1138)
simplifies builds, prevents overriding of options
2018-05-17 07:55:44 +08:00
Stephen
8c8089ed06 Cleanup build process (#1023)
avoiding bash subshells (which happen in for loops) because they
like to selectively inherit environment variables
2018-05-17 07:54:46 +08:00
Stephen
ecdaa6059c Cleanup makefile (#1132) 2018-05-12 11:37:16 +08:00
Stephen
4d3880024b Cleanup makefile (#1132) 2018-05-12 11:36:10 +08:00
Nguyen Anh Quynh
ed1246d79b add Ethereum VM architecture 2018-03-31 17:29:22 +08:00
Richard Henderson
22ead3e0bf Constify backend data (#1040)
* Constify string literals

Use -Wwrite-strings to force string literals to be of
type "const char[]", then fix up all warning fallout.

* Constify common infrastructure

Step one in allowing backend data to be readonly.
Minimal changes to backends for now; just set all pointers
in common structs that aren't modified to const.

* Constify AArch64 backend

Section size changes within libcapstone.so are

-.rodata               602587
-.data.rel.ro          228416
-.data                1003746
+.rodata               769051
+.data.rel.ro          241120
+.data                 824578

* Constify ARM backend

Section size changes within libcapstone.so are

-.rodata               769051
-.data.rel.ro          241120
-.data                 824578
+.rodata               959835
+.data.rel.ro          245120
+.data                 629506

* Constify Mips backend

Section size changes within libcapstone.so are

-.rodata               959835
-.data.rel.ro          245120
-.data                 629506
+.rodata              1069851
+.data.rel.ro          256416
+.data                 508194

* Constify PowerPC backend

Section size changes within libcapstone.so are

-.rodata              1069851
-.data.rel.ro          256416
-.data                 508194
+.rodata              1142715
+.data.rel.ro          272224
+.data                 419490

* Constify Sparc backend

Section size changes within libcapstone.so are

-.rodata              1142715
-.data.rel.ro          272224
-.data                 419490
+.rodata              1175227
+.data.rel.ro          277536
+.data                 381666

* Constify SystemZ backend

Section size changes within libcapstone.so are

-.rodata              1175227
-.data.rel.ro          277536
-.data                 381666
+.rodata              1221883
+.data.rel.ro          278016
+.data                 334498

* Constify X86 backend

Section size changes within libcapstone.so are

-.rodata              1221883
-.data.rel.ro          278016
-.data                 334498
+.rodata              1533531
+.data.rel.ro          281184
+.data                  19714

* Constify XCore backend

Section size changes within libcapstone.so are

-.rodata              1533531
-.data.rel.ro          281184
-.data                  19714
+.rodata              1553026
+.data.rel.ro          281280
+.data                     40
2017-10-22 08:45:40 +08:00
Nguyen Anh Quynh
d7281e9ea7 cleanup Makefile for M680K. also include its INC files in dependency 2017-10-21 14:05:02 +07:00
Stephen
1ec3060d08 more makefile cleanup (#1039)
* more makefile cleanup

* fix spelling mistake
2017-10-21 21:47:38 +08:00
Wolfgang Schwotzer
22b4d0eb41 M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301

* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT

* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.

* M680X: Add python bindings. Added python tests.

* M680X: Added cpu types to usage message.

* cstool: Avoid segfault for invalid <arch+mode>.

* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.

* M680X: Update CMake/make for m680x support. Update .gitignore.

* M680X: Reduce compiler warnings.

* M680X: Reduce compiler warnings.

* M680X: Reduce compiler warnings.

* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).

* M680X: Add ocaml bindings and tests.

* M680X: Add java bindings and tests.

* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml

* M680X: Naming, use page1 for PAGE1 instructions (without prefix).

* M680X: Naming, use page1 for PAGE1 instructions (without prefix).

* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.

* M680X: Added access property to cs_m680x_op.

* M680X: Added operand size.

* M680X: Remove compiler warnings.

* M680X: Added READ/WRITE access property per operator.

* M680X: Make reg_inherent_hdlr independent of CPU type.

* M680X: Add HD6309 support + bug fixes

* M680X: Remove errors and warning.

* M680X: Add Bcc/LBcc to group BRAREL (relative branch).

* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.

* M680X: Remove LBRN from group BRAREL.

* M680X: Refactored cpu_type initialization for better readability.

* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.

* M680X: Remove typo in cstool.c

* M680X: Some format improvements in changed_regs.

* M680X: Remove insn id string list from tests (C/python/java/ocaml).

* M680X: SEXW, set access of reg. D to WRITE.

* M680X: Sort changed_regs in increasing m680x_insn order.

* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.

* M680X: cstool, also write '(in mnemonic)' for second reg. operand.

* M680X: Add BRN/LBRN to group JUMP and BRAREL.

* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.

* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.

* M680X: Rename some instruction handlers.

* M680X: Add M68HC05 support.

* M680X: Dont print prefix '<' for direct addr. mode.

* M680X: Add M68HC08 support + resorted tables + bug fixes.

* M680X: Add Freescale HCS08 support.

* M680X: Changed group names, avoid spaces.

* M680X: Refactoring, rename addessing mode handlers.

* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.

* M680X: Rename some M6809/HD6309 specific functions.

* M680X: Add CPU12 (68HC12/HCS12) support.

* M680X: Correctly display illegal instruction as FCB .

* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.

* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.

* M680X: Better support for changing insn id within handler for addessing mode.

* M680X: Remove warnings.

* M680X: In set_changed_regs_read_write_counts use own access_mode.

* M680X: Split cpu specific tables into separate *.inc files.

* M680X: Remove warnings.

* M680X: Removed address_mode. Addressing mode is available in operand.type

* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.

* M680X: Remove register TMP1. It is first visible in CPU12X.

* M680X: Performance improvement + bug fixes.

* M680X: Performance improvement, make cpu_tables const static.

* M680X: Simplify operand decoding by using two handlers.

* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.

* M680X: Format with astyle.

* M680X: Update documentation.

* M680X: Corrected author for m680x specific files.

* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
Stephen
572a4ae56a cleanup makefile (#1038)
use wildcards
2017-10-20 23:17:30 +08:00
Jonas
7a274e24fb Add posibility to disable universal build for osx 2017-09-05 21:51:07 +07:00
Jonas
60f17f5b70 Add posibility to disable universal build for osx. (#1004)
Fixes #1003
2017-09-05 21:45:48 +07:00
Adrian Herrera
1910fd5635 mingw build: cstool fails to build with mingw (#941)
The correct compiler was not being passed to cstool/Makefile. The expected name
for the capstone lib was also incorrect - there is no "lib" prefix when
compiling with mingw.
2017-06-02 21:49:59 +08:00
Adrian Herrera
229593dc3f mingw build: cstool fails to build with mingw (#941)
The correct compiler was not being passed to cstool/Makefile. The expected name
for the capstone lib was also incorrect - there is no "lib" prefix when
compiling with mingw.
2017-06-02 21:49:10 +08:00
Nick Briggs
ce3f0d0935 Rename test.c to test_basic.c with corresponding executable name change. (#923)
* Rename test.c to test_basic.c with corresponding executable name change.

* Fix Makefile, tests/Makefile to comprehend renamed test program. See issue #922

* Fix XCode project to comprehend renamed test program.  See issue #922

* Rename python test.py to test_basic.py to parallel C test name.  See issue #922

* Rename ocaml test.ml to test_basic.ml to parallel C test name.  See issue #922

* Fix MSVC project definitions to comprehend renamed test program.  See issue #922
2017-05-11 22:58:12 +07:00
Nguyen Anh Quynh
cbc1c038de Makefile: do not delete capstone.pc.in 2017-05-05 09:47:19 +08:00
Nguyen Anh Quynh
f4c5d5ef3c Makefile: do not delete capstone.pc.in 2017-05-05 09:46:46 +08:00
Fotis Loukos
0850d55211 Added support for the TMS320C64x architecture. 2017-04-14 17:00:40 +03:00
Nguyen Anh Quynh
d46a4f2a25 Makefile install works even when pkg-config is missing 2017-04-14 18:43:06 +08:00
pancake
5a4dabdeb4 Silent CC warnings 2017-02-06 13:24:33 +01:00
Hank Leininger
1b4d8058f2
Make sure bindir exists before installing to it.
Without this, installing to a temporary directory tree (as done by
some package managers) installs cstool as the file /usr/bin.

This brings next in line with the behavior of master.
2016-12-10 20:52:08 -05:00
Nguyen Anh Quynh
3ba8c4d2d9 improve dependency on header files *.h, and remove clean from make.sh. see PR #793 2016-10-23 02:09:14 +08:00
Nguyen Anh Quynh
648b39839e improve dependency on header files *.h, and remove clean from make.sh. see PR #793 2016-10-23 02:00:47 +08:00
Nguyen Anh Quynh
ce7c9a8ec5 Makefile: remove extra / letter for install target 2016-10-13 20:45:24 +08:00
Nguyen Anh Quynh
f36b3f426e cstool: compile/clean/install/uninstall from Makefile 2016-10-11 00:01:29 +08:00
Nguyen Anh Quynh
346032797a cstool: compile/clean/install/uninstall from Makefile 2016-10-10 22:54:16 +08:00
Akihiko Odaki
ec4075377e Fix check target for Unix-like environment
# Conflicts:
#	Makefile
2016-09-11 09:00:32 +09:00
Akihiko Odaki
798821f5b5 Fix check target for Unix-like environment 2016-09-03 10:55:19 +09:00
Pranith Kumar
54f8925884 Fix linking step for new lib name 2016-05-03 11:02:28 -04:00