You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
941 B

:: Keystone assembler engine (
:: Build Keystone static library (keystone.lib) on Windows with CMake & Nmake
:: By Nguyen Anh Quynh, 2016
:: This generates .\llvm\lib\keystone.lib
:: Usage: nmake-dll.bat [x86 arm aarch64 m68k mips sparc], default build all.
@echo off
set allparams=
set str=%1
if "%str%"=="" (
goto end
set allparams=%allparams% %str%
shift /0
goto loop
if "%allparams%"=="" (
goto eof
:: remove left, right blank
if "%allparams:~0,1%"==" " set "allparams=%allparams:~1%" & goto intercept_left
if "%allparams:~-1%"==" " set "allparams=%allparams:~0,-1%" & goto intercept_right
if "%allparams%"=="" (
cmake "%flags%" -DLLVM_TARGETS_TO_BUILD="all" -G "NMake Makefiles" ..
) else (
cmake "%flags%" "-DLLVM_TARGETS_TO_BUILD=%allparams%" -G "NMake Makefiles" ..