blob: 46c108d39178ddffd1510ae08da14dee91366c8c [file] [log] [blame]
Nguyen Anh Quynhd03edf42014-03-02 10:20:37 +08001# This file contains all customized compile options for Capstone.
Nguyen Anh Quynh838b3782014-03-04 18:20:28 +08002# Modify it before building step. Consult docs/README for details.
Nguyen Anh Quynhd03edf42014-03-02 10:20:37 +08003
Nguyen Anh Quynhfc83a432014-02-22 23:26:27 +08004################################################################################
Nguyen Anh Quynh3b53fc42014-02-28 11:05:01 +08005# Specify which archs you want to compile in. By default, we build all archs.
Nguyen Anh Quynhcf4df4b2014-01-13 11:18:45 +08006# DO NOT touch the line below.
Nguyen Anh Quynh5219f642013-12-22 13:00:48 +08007CAPSTONE_ARCHS =
danghvu6f52bf92013-12-19 22:43:01 -06008
Nguyen Anh Quynhcf4df4b2014-01-13 11:18:45 +08009# Comment out the line below if you don't want to support ARM
Nguyen Anh Quynhf954f872013-12-22 18:49:22 +080010CAPSTONE_ARCHS += arm
Nguyen Anh Quynh5219f642013-12-22 13:00:48 +080011
Nguyen Anh Quynhcf4df4b2014-01-13 11:18:45 +080012# Comment out the line below if you don't want to support ARM64
Nguyen Anh Quynhf954f872013-12-22 18:49:22 +080013CAPSTONE_ARCHS += aarch64
Nguyen Anh Quynh5219f642013-12-22 13:00:48 +080014
Nguyen Anh Quynhcf4df4b2014-01-13 11:18:45 +080015# Comment out the line below if you don't want to support Mips
Nguyen Anh Quynhf954f872013-12-22 18:49:22 +080016CAPSTONE_ARCHS += mips
Nguyen Anh Quynh5219f642013-12-22 13:00:48 +080017
Nguyen Anh Quynhcf4df4b2014-01-13 11:18:45 +080018# Comment out the line below if you don't want to support PowerPC
Nguyen Anh Quynh0f9cb0f2013-12-28 14:12:54 +080019CAPSTONE_ARCHS += powerpc
Nguyen Anh Quynhf6060b82014-02-22 04:57:38 +080020
Nguyen Anh Quynh05e27132014-03-10 11:58:57 +080021# Comment out the line below if you don't want to support Sparc
22CAPSTONE_ARCHS += sparc
23
Nguyen Anh Quynh48a14ca2014-03-23 08:35:45 +080024# Comment out the line below if you don't want to support SystemZ
25CAPSTONE_ARCHS += systemz
26
Nguyen Anh Quynh7e5a6b52014-02-23 00:47:38 +080027# Comment out the line below if you don't want to support Intel (16/32/64-bit)
Nguyen Anh Quynhf6060b82014-02-22 04:57:38 +080028CAPSTONE_ARCHS += x86
Nguyen Anh Quynh7e5a6b52014-02-23 00:47:38 +080029
30
31################################################################################
Nguyen Anh Quynh951e8e52014-03-01 23:24:09 +080032# Comment out the line below ('USE_SYS_DYN_MEM = yes'), or change it to
Nguyen Anh Quynhb6ece8d2014-03-07 21:46:45 +080033# 'USE_SYS_DYN_MEM = no' if do NOT use malloc/calloc/realloc/free/vsnprintf()
Nguyen Anh Quynh951e8e52014-03-01 23:24:09 +080034# provided by system for internal dynamic memory management.
Nguyen Anh Quynh7e5a6b52014-02-23 00:47:38 +080035#
Nguyen Anh Quynhb6ece8d2014-03-07 21:46:45 +080036# NOTE: in that case, specify your own malloc/calloc/realloc/free/vsnprintf()
Nguyen Anh Quynh951e8e52014-03-01 23:24:09 +080037# functions in your program via API cs_option(), using CS_OPT_MEM option type.
Nguyen Anh Quynhd03edf42014-03-02 10:20:37 +080038
Nguyen Anh Quynh7e5a6b52014-02-23 00:47:38 +080039USE_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 Quynhd5ca1452014-02-24 22:13:29 +080045# This setup will remove the @mnemonic & @op_str data, plus semantic information
Nguyen Anh Quynh838b3782014-03-04 18:20:28 +080046# such as @regs_read/write & @group. The amount of binary size reduced is
47# up to 50% in some individual archs.
Nguyen Anh Quynh7e5a6b52014-02-23 00:47:38 +080048#
49# NOTE: we still keep all those related fileds @mnemonic, @op_str, @regs_read,
Nguyen Anh Quynhd5ca1452014-02-24 22:13:29 +080050# @regs_write, @groups, etc in fields in cs_insn structure regardless, but they
Nguyen Anh Quynh838b3782014-03-04 18:20:28 +080051# will not be updated (i.e empty), thus become irrelevant.
Nguyen Anh Quynhd03edf42014-03-02 10:20:37 +080052
Nguyen Anh Quynh7e5a6b52014-02-23 00:47:38 +080053CAPSTONE_DIET = no
Nguyen Anh Quynh95181482014-03-25 23:20:41 +080054
55
56################################################################################
Nguyen Anh Quynh59b54892014-03-27 10:54:44 +080057# Change 'CAPSTONE_X86_REDUCE = no' to 'CAPSTONE_X86_REDUCE = yes' to remove
Nguyen Anh Quynh6d3c7112014-03-27 15:38:23 +080058# non-critical instruction sets of X86, making the binary size smaller by ~60%.
Nguyen Anh Quynh95181482014-03-25 23:20:41 +080059# 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 Quynh01d8a492014-03-26 14:49:19 +080063# - 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 Quynh01d8a492014-03-26 14:49:19 +080070# - Transactional Synchronization Extensions (TSX)
Nguyen Anh Quynh95181482014-03-25 23:20:41 +080071#
72# Due to this removal, the related instructions are nolonger supported.
73#
Nguyen Anh Quynh59b54892014-03-27 10:54:44 +080074# By default, Capstone is compiled with 'CAPSTONE_X86_REDUCE = no',
Nguyen Anh Quynh5fbcc9e2014-03-26 16:20:25 +080075# thus supports complete X86 instructions.
Nguyen Anh Quynh95181482014-03-25 23:20:41 +080076
Nguyen Anh Quynh477c5682014-03-27 12:34:07 +080077CAPSTONE_X86_REDUCE = no