Nguyen Anh Quynh | d03edf4 | 2014-03-02 10:20:37 +0800 | [diff] [blame] | 1 | # This file contains all customized compile options for Capstone. |
Nguyen Anh Quynh | 838b378 | 2014-03-04 18:20:28 +0800 | [diff] [blame] | 2 | # Modify it before building step. Consult docs/README for details. |
Nguyen Anh Quynh | d03edf4 | 2014-03-02 10:20:37 +0800 | [diff] [blame] | 3 | |
Nguyen Anh Quynh | fc83a43 | 2014-02-22 23:26:27 +0800 | [diff] [blame] | 4 | ################################################################################ |
Nguyen Anh Quynh | 3b53fc4 | 2014-02-28 11:05:01 +0800 | [diff] [blame] | 5 | # Specify which archs you want to compile in. By default, we build all archs. |
Nguyen Anh Quynh | cf4df4b | 2014-01-13 11:18:45 +0800 | [diff] [blame] | 6 | # DO NOT touch the line below. |
Nguyen Anh Quynh | 5219f64 | 2013-12-22 13:00:48 +0800 | [diff] [blame] | 7 | CAPSTONE_ARCHS = |
danghvu | 6f52bf9 | 2013-12-19 22:43:01 -0600 | [diff] [blame] | 8 | |
Nguyen Anh Quynh | cf4df4b | 2014-01-13 11:18:45 +0800 | [diff] [blame] | 9 | # Comment out the line below if you don't want to support ARM |
Nguyen Anh Quynh | f954f87 | 2013-12-22 18:49:22 +0800 | [diff] [blame] | 10 | CAPSTONE_ARCHS += arm |
Nguyen Anh Quynh | 5219f64 | 2013-12-22 13:00:48 +0800 | [diff] [blame] | 11 | |
Nguyen Anh Quynh | cf4df4b | 2014-01-13 11:18:45 +0800 | [diff] [blame] | 12 | # Comment out the line below if you don't want to support ARM64 |
Nguyen Anh Quynh | f954f87 | 2013-12-22 18:49:22 +0800 | [diff] [blame] | 13 | CAPSTONE_ARCHS += aarch64 |
Nguyen Anh Quynh | 5219f64 | 2013-12-22 13:00:48 +0800 | [diff] [blame] | 14 | |
Nguyen Anh Quynh | cf4df4b | 2014-01-13 11:18:45 +0800 | [diff] [blame] | 15 | # Comment out the line below if you don't want to support Mips |
Nguyen Anh Quynh | f954f87 | 2013-12-22 18:49:22 +0800 | [diff] [blame] | 16 | CAPSTONE_ARCHS += mips |
Nguyen Anh Quynh | 5219f64 | 2013-12-22 13:00:48 +0800 | [diff] [blame] | 17 | |
Nguyen Anh Quynh | cf4df4b | 2014-01-13 11:18:45 +0800 | [diff] [blame] | 18 | # Comment out the line below if you don't want to support PowerPC |
Nguyen Anh Quynh | 0f9cb0f | 2013-12-28 14:12:54 +0800 | [diff] [blame] | 19 | CAPSTONE_ARCHS += powerpc |
Nguyen Anh Quynh | f6060b8 | 2014-02-22 04:57:38 +0800 | [diff] [blame] | 20 | |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 21 | # Comment out the line below if you don't want to support Intel (16/32/64-bit) |
Nguyen Anh Quynh | f6060b8 | 2014-02-22 04:57:38 +0800 | [diff] [blame] | 22 | CAPSTONE_ARCHS += x86 |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 23 | |
| 24 | |
| 25 | ################################################################################ |
Nguyen Anh Quynh | 951e8e5 | 2014-03-01 23:24:09 +0800 | [diff] [blame] | 26 | # Comment out the line below ('USE_SYS_DYN_MEM = yes'), or change it to |
Nguyen Anh Quynh | b6ece8d | 2014-03-07 21:46:45 +0800 | [diff] [blame] | 27 | # 'USE_SYS_DYN_MEM = no' if do NOT use malloc/calloc/realloc/free/vsnprintf() |
Nguyen Anh Quynh | 951e8e5 | 2014-03-01 23:24:09 +0800 | [diff] [blame] | 28 | # provided by system for internal dynamic memory management. |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 29 | # |
Nguyen Anh Quynh | b6ece8d | 2014-03-07 21:46:45 +0800 | [diff] [blame] | 30 | # NOTE: in that case, specify your own malloc/calloc/realloc/free/vsnprintf() |
Nguyen Anh Quynh | 951e8e5 | 2014-03-01 23:24:09 +0800 | [diff] [blame] | 31 | # functions in your program via API cs_option(), using CS_OPT_MEM option type. |
Nguyen Anh Quynh | d03edf4 | 2014-03-02 10:20:37 +0800 | [diff] [blame] | 32 | |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 33 | USE_SYS_DYN_MEM = yes |
| 34 | |
| 35 | |
| 36 | ################################################################################ |
| 37 | # Change 'CAPSTONE_DIET = no' to 'CAPSTONE_DIET = yes' to make the library |
| 38 | # more compact: use less memory & smaller in binary size. |
Nguyen Anh Quynh | d5ca145 | 2014-02-24 22:13:29 +0800 | [diff] [blame] | 39 | # This setup will remove the @mnemonic & @op_str data, plus semantic information |
Nguyen Anh Quynh | 838b378 | 2014-03-04 18:20:28 +0800 | [diff] [blame] | 40 | # such as @regs_read/write & @group. The amount of binary size reduced is |
| 41 | # up to 50% in some individual archs. |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 42 | # |
| 43 | # NOTE: we still keep all those related fileds @mnemonic, @op_str, @regs_read, |
Nguyen Anh Quynh | d5ca145 | 2014-02-24 22:13:29 +0800 | [diff] [blame] | 44 | # @regs_write, @groups, etc in fields in cs_insn structure regardless, but they |
Nguyen Anh Quynh | 838b378 | 2014-03-04 18:20:28 +0800 | [diff] [blame] | 45 | # will not be updated (i.e empty), thus become irrelevant. |
Nguyen Anh Quynh | d03edf4 | 2014-03-02 10:20:37 +0800 | [diff] [blame] | 46 | |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 47 | CAPSTONE_DIET = no |