mirror of
https://github.com/keystone-engine/keystone
synced 2026-06-08 15:15:30 +00:00
3e67c1d488
When compiling on linux, use GNUInstallDirs to automatically determine the appropriate libdir path for multi-arch builds instead of hardcoding lib/ or lib64/. GNUInstallDirs should follow the FHS appropriately for non-debian platforms that place libs in lib64/. This also removes the need to specify `lib64` on the command line when building for a non-debian system that follows the linux FHS. When compiling with cmake directly on debian and specifying `-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_LIBRARY_ARCHITECTURE=<arch>`, the libdir should be set to /usr/lib/<arch>/.
23 lines
759 B
Bash
Executable File
23 lines
759 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
# Build static library of Keystone Engine
|
|
# syntax: make-lib.sh [debug] [macos-no-universal] [lib32] [lib_only]
|
|
|
|
usage()
|
|
{
|
|
echo ""
|
|
echo "Syntax: make-lib.sh [debug] [macos-universal] [lib64]"
|
|
echo ""
|
|
echo " debug: build with debug info"
|
|
echo " macos-no-universal: do not build MacOS universal binaries"
|
|
echo " lib_only: skip kstool & only build libraries"
|
|
echo " lib32: build 32bit libraries on 64bit system"
|
|
echo ""
|
|
}
|
|
|
|
. "$(dirname "$0")"/make-common.sh
|
|
|
|
cmake -DBUILD_LIBS_ONLY=$BUILD_LIBS_ONLY -DLLVM_BUILD_32_BITS="$LLVM_BUILD_32_BITS" -DCMAKE_OSX_ARCHITECTURES="$ARCH" -DCMAKE_BUILD_TYPE=$BUILDTYPE -DBUILD_SHARED_LIBS=OFF -DLLVM_TARGETS_TO_BUILD="all" -G "Unix Makefiles" ..
|
|
|
|
time make -j8
|