Rizin
unix-like reverse engineering framework and cli tools
|
This documentation explains how to compile Capstone for:
To build Capstone for a different platform, please refer to COMPILE.TXT
.
We support the following scenario regarding the build machine:
Before building Capstone for Windows CE 7 (respectively, Windows CE 8), the build script windowsce/make_windowsce7-armv7.bat
(respectively, windowsce/make_windowsce8-armv7.bat
) needs to be modified. The variables specified in the rest of this section are set in this script file.
The following information need to be specified in the build script in order to perform the build:
set WINCE_TOOLCHAIN_ROOT=
is the path of the root directory of the Windows CE toolchain. To build for Windows CE 7, this should be set to the Windows Embedded Compact 7 toolchain. To build for Windows CE 8, this should be set to the device toolchain. Examples:set TOOLCHAIN=
is a semicolon-separated list of the paths of the directories containing the binaries of the Windows CE toolchain. For example: set INCLUDE=
is a semicolon-separated list of the paths of the directories containing the C header files of the Windows CE device SDK. To build for Windows CE 7, this should also include the directories containing the C header files of the Windows Embedded Compact 7 toolchain. Examples:set LIBPATH=
is a semicolon-separated list of the paths of the directories containing the library (i.e., .LIB
) files of the Windows CE 7 device SDK. Examples:set LIBS=
is a space-separated list of linker directives controlling library search. Examples:By default, the build script produces a dynamic link library (i.e., .DLL
). In order to produce a static library (i.e., .LIB
) instead, the SHARED
variable needs to be set to 0
, i.e.:
Capstone supports the following architectures: ARM, ARM64 (AArch64), M68K, MIPS, PowerPC, Sparc, SystemZ, x86 and XCore. However, Capstone can be configured in order to select which architectures need to be supported at runtime. This is controlled via the variable DISASM_ARCH_LIST
, which is a space-separated list that is a combination of the following names:
ARM
ARM64
M68K
MIPS
POWERPC
SPARC
SYSZ
X86
XCORE
.By default, DISASM_ARCH_LIST
includes support for all architectures supported by Capstone. For example:
will produce a Capstone binary that supports the following architectures: ARM, ARM64 and x86.
Capstone has a list of features that can be controlled when needed. Each feature is controlled through setting a variable from the following list:
0
.malloc()
, realloc()
, free()
) for its internal memory management. However, Capstone can instead be configured to call custom memory management functions provided by client applications. In order to enable this behavior, set the following: x86
architecture can be more limited. In order to do so, set the following: 0
.x86
architecture is never needed at runtime, then disabling support for it can produce a smaller Capstone binary. To do this, please set the following: 0
.Please refer to docs/README
for more details on these features.