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 | 05e2713 | 2014-03-10 11:58:57 +0800 | [diff] [blame] | 21 | # Comment out the line below if you don't want to support Sparc |
| 22 | CAPSTONE_ARCHS += sparc |
| 23 | |
Nguyen Anh Quynh | 48a14ca | 2014-03-23 08:35:45 +0800 | [diff] [blame] | 24 | # Comment out the line below if you don't want to support SystemZ |
| 25 | CAPSTONE_ARCHS += systemz |
| 26 | |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 27 | # 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] | 28 | CAPSTONE_ARCHS += x86 |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 29 | |
| 30 | |
| 31 | ################################################################################ |
Nguyen Anh Quynh | 951e8e5 | 2014-03-01 23:24:09 +0800 | [diff] [blame] | 32 | # 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] | 33 | # '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] | 34 | # provided by system for internal dynamic memory management. |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 35 | # |
Nguyen Anh Quynh | b6ece8d | 2014-03-07 21:46:45 +0800 | [diff] [blame] | 36 | # 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] | 37 | # 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] | 38 | |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 39 | USE_SYS_DYN_MEM = yes |
| 40 | |
| 41 | |
| 42 | ################################################################################ |
| 43 | # Change 'CAPSTONE_DIET = no' to 'CAPSTONE_DIET = yes' to make the library |
| 44 | # more compact: use less memory & smaller in binary size. |
Nguyen Anh Quynh | d5ca145 | 2014-02-24 22:13:29 +0800 | [diff] [blame] | 45 | # 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] | 46 | # such as @regs_read/write & @group. The amount of binary size reduced is |
| 47 | # up to 50% in some individual archs. |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 48 | # |
| 49 | # 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] | 50 | # @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] | 51 | # will not be updated (i.e empty), thus become irrelevant. |
Nguyen Anh Quynh | d03edf4 | 2014-03-02 10:20:37 +0800 | [diff] [blame] | 52 | |
Nguyen Anh Quynh | 7e5a6b5 | 2014-02-23 00:47:38 +0800 | [diff] [blame] | 53 | CAPSTONE_DIET = no |
Nguyen Anh Quynh | 9518148 | 2014-03-25 23:20:41 +0800 | [diff] [blame] | 54 | |
| 55 | |
| 56 | ################################################################################ |
Nguyen Anh Quynh | 59b5489 | 2014-03-27 10:54:44 +0800 | [diff] [blame] | 57 | # Change 'CAPSTONE_X86_REDUCE = no' to 'CAPSTONE_X86_REDUCE = yes' to remove |
Nguyen Anh Quynh | 6d3c711 | 2014-03-27 15:38:23 +0800 | [diff] [blame] | 58 | # non-critical instruction sets of X86, making the binary size smaller by ~60%. |
Nguyen Anh Quynh | 9518148 | 2014-03-25 23:20:41 +0800 | [diff] [blame] | 59 | # This is desired in special cases, such as OS kernel, where these kind of |
| 60 | # instructions are not used. |
| 61 | # |
| 62 | # The list of instruction sets to be removed includes: |
Nguyen Anh Quynh | 01d8a49 | 2014-03-26 14:49:19 +0800 | [diff] [blame] | 63 | # - Floating Point Unit (FPU) |
| 64 | # - MultiMedia eXtension (MMX) |
| 65 | # - Streaming SIMD Extensions (SSE) |
| 66 | # - 3DNow |
| 67 | # - Advanced Vector Extensions (AVX) |
| 68 | # - Fused Multiply Add Operations (FMA) |
| 69 | # - eXtended Operations (XOP) |
Nguyen Anh Quynh | 01d8a49 | 2014-03-26 14:49:19 +0800 | [diff] [blame] | 70 | # - Transactional Synchronization Extensions (TSX) |
Nguyen Anh Quynh | 9518148 | 2014-03-25 23:20:41 +0800 | [diff] [blame] | 71 | # |
| 72 | # Due to this removal, the related instructions are nolonger supported. |
| 73 | # |
Nguyen Anh Quynh | 59b5489 | 2014-03-27 10:54:44 +0800 | [diff] [blame] | 74 | # By default, Capstone is compiled with 'CAPSTONE_X86_REDUCE = no', |
Nguyen Anh Quynh | 5fbcc9e | 2014-03-26 16:20:25 +0800 | [diff] [blame] | 75 | # thus supports complete X86 instructions. |
Nguyen Anh Quynh | 9518148 | 2014-03-25 23:20:41 +0800 | [diff] [blame] | 76 | |
Nguyen Anh Quynh | 477c568 | 2014-03-27 12:34:07 +0800 | [diff] [blame] | 77 | CAPSTONE_X86_REDUCE = no |