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