| 1 | # This file contains all customized compile options for Capstone. |
| 2 | # Consult COMPILE.TXT & docs/README for details. |
| 3 | |
| 4 | ################################################################################ |
| 5 | # Specify which archs you want to compile in. By default, we build all archs. |
| 6 | |
| 7 | CAPSTONE_ARCHS ?= arm aarch64 m68k mips powerpc sparc systemz x86 xcore tms320c64x m680x evm riscv mos65xx wasm bpf sh tricore |
| 8 | |
| 9 | |
| 10 | ################################################################################ |
| 11 | # Comment out the line below ('CAPSTONE_USE_SYS_DYN_MEM = yes'), or change it to |
| 12 | # 'CAPSTONE_USE_SYS_DYN_MEM = no' if do NOT use malloc/calloc/realloc/free/ |
| 13 | # vsnprintf() provided by system for internal dynamic memory management. |
| 14 | # |
| 15 | # NOTE: in that case, specify your own malloc/calloc/realloc/free/vsnprintf() |
| 16 | # functions in your program via API cs_option(), using CS_OPT_MEM option type. |
| 17 | |
| 18 | CAPSTONE_USE_SYS_DYN_MEM ?= yes |
| 19 | |
| 20 | |
| 21 | ################################################################################ |
| 22 | # Change 'CAPSTONE_DIET = no' to 'CAPSTONE_DIET = yes' to make the library |
| 23 | # more compact: use less memory & smaller in binary size. |
| 24 | # This setup will remove the @mnemonic & @op_str data, plus semantic information |
| 25 | # such as @regs_read/write & @group. The amount of binary size reduced is |
| 26 | # up to 50% in some individual archs. |
| 27 | # |
| 28 | # NOTE: we still keep all those related fileds @mnemonic, @op_str, @regs_read, |
| 29 | # @regs_write, @groups, etc in fields in cs_insn structure regardless, but they |
| 30 | # will not be updated (i.e empty), thus become irrelevant. |
| 31 | |
| 32 | CAPSTONE_DIET ?= no |
| 33 | |
| 34 | |
| 35 | ################################################################################ |
| 36 | # Change 'CAPSTONE_X86_REDUCE = no' to 'CAPSTONE_X86_REDUCE = yes' to remove |
| 37 | # non-critical instruction sets of X86, making the binary size smaller by ~60%. |
| 38 | # This is desired in special cases, such as OS kernel, where these kind of |
| 39 | # instructions are not used. |
| 40 | # |
| 41 | # The list of instruction sets to be removed includes: |
| 42 | # - Floating Point Unit (FPU) |
| 43 | # - MultiMedia eXtension (MMX) |
| 44 | # - Streaming SIMD Extensions (SSE) |
| 45 | # - 3DNow |
| 46 | # - Advanced Vector Extensions (AVX) |
| 47 | # - Fused Multiply Add Operations (FMA) |
| 48 | # - eXtended Operations (XOP) |
| 49 | # - Transactional Synchronization Extensions (TSX) |
| 50 | # |
| 51 | # Due to this removal, the related instructions are nolonger supported. |
| 52 | # |
| 53 | # By default, Capstone is compiled with 'CAPSTONE_X86_REDUCE = no', |
| 54 | # thus supports complete X86 instructions. |
| 55 | |
| 56 | CAPSTONE_X86_REDUCE ?= no |
| 57 | |
| 58 | ################################################################################ |
| 59 | # Change 'CAPSTONE_X86_ATT_DISABLE = no' to 'CAPSTONE_X86_ATT_DISABLE = yes' to |
| 60 | # disable AT&T syntax on x86 to reduce library size. |
| 61 | |
| 62 | CAPSTONE_X86_ATT_DISABLE ?= no |
| 63 | |
| 64 | ################################################################################ |
| 65 | # Change 'CAPSTONE_STATIC = yes' to 'CAPSTONE_STATIC = no' to avoid building |
| 66 | # a static library. |
| 67 | |
| 68 | CAPSTONE_STATIC ?= yes |
| 69 | |
| 70 | |
| 71 | ################################################################################ |
| 72 | # Change 'CAPSTONE_SHARED = yes' to 'CAPSTONE_SHARED = no' to avoid building |
| 73 | # a shared library. |
| 74 | |
| 75 | CAPSTONE_SHARED ?= yes |
| 76 | |
| 77 | ################################################################################ |
| 78 | # Change 'CAPSTONE_HAS_OSXKERNEL = no' to 'CAPSTONE_HAS_OSXKERNEL = yes' to |
| 79 | # enable OS X kernel embedding support. If 'CAPSTONE_USE_SYS_DYN_MEM = yes', |
| 80 | # then kern_os_* functions are used for memory management. |
| 81 | |
| 82 | CAPSTONE_HAS_OSXKERNEL ?= no |