blob: e83741593d275973b442cf3a8c24929712ebc339 [file] [log] [blame]
JornVerneee5d71202019-04-29 12:28:21 +02001# Capstone disassembler engine (www.capstone-engine.org)
2# Build Capstone libs for specified architecture, or all if none is specified (libcapstone.so & libcapstone.a) on *nix with CMake & make
3# By Nguyen Anh Quynh, Jorn Vernee, 2019
4
5FLAGS="-DCMAKE_BUILD_TYPE=Release"
6# Uncomment below line to compile in Diet mode
7# FLAGS+=" -DCAPSTONE_BUILD_DIET=ON"
8
9case $1 in
10 ARM)
11 ARCH=ARM
12 ;;
13 ARM64)
14 ARCH=ARM64
15 ;;
16 M68K)
17 ARCH=M68K
18 ;;
19 MIPS)
20 ARCH=MIPS
21 ;;
22 PowerPC)
23 ARCH=PPC
24 ;;
25 Sparc)
26 ARCH=SPARC
27 ;;
28 SystemZ)
29 ARCH=SYSZ
30 ;;
31 XCore)
32 ARCH=XCORE
33 ;;
34 x86)
35 ARCH=X86
36 ;;
37 TMS320C64x)
38 ARCH=TMS320C64X
39 ;;
40 M680x)
41 ARCH=M680X
42 ;;
43 EVM)
44 ARCH=EVM
45 ;;
46 MOS65XX)
47 ARCH=MOS65XX
48 ;;
49 *)
50 ;;
51esac
52
53if test "x$ARCH" = "x"; then
54 FLAGS+=" -DCAPSTONE_ARCHITECTURE_DEFAULT=OFF -DCAPSTONE_$ARCH_SUPPORT=ON"
55fi
56
57cmake $FLAGS ..
58
59make -j8