radare2/meson.bat

59 lines
1.3 KiB
Batchfile
Raw Normal View History

2017-05-05 02:49:29 +02:00
@ECHO OFF
2017-06-23 12:09:39 +02:00
SET BACKEND=ninja
SET REGEN=
SET RELEASE=
SET BUILDDIR=build
SET DEFAULT_LIBRARY=--default-library static
2017-06-23 12:09:39 +02:00
:PARSEARGS
IF NOT "%1"=="" (
IF "%1"=="-p" (
SET BACKEND=vs2015
)
IF "%1"=="-p2" (
SET BACKEND=vs2017
)
IF "%1"=="-r" (
SET REGEN=1
)
IF "%1"=="--release" (
SET RELEASE=--buildtype=release
)
SHIFT
GOTO PARSEARGS
)
2017-05-29 22:35:59 +02:00
IF EXIST shlr\capstone GOTO START
2017-05-31 13:38:47 +02:00
ECHO [ R2 MESON CLONING CAPSTONE ]
2017-05-29 22:35:59 +02:00
git clone -b next --depth 10 http://github.com/aquynh/capstone.git shlr\capstone
2017-06-03 04:43:46 +02:00
cd shlr\capstone
rem FOR /r %%p IN (..\capstone-patches\*) DO git apply %%p
git apply ..\capstone-patches\add-mips2.patch
cd ..\..
2017-06-08 05:32:17 +02:00
2017-05-29 22:35:59 +02:00
:START
2017-06-23 12:09:39 +02:00
IF NOT "%RELEASE%"=="" ECHO [ R2 MESON BUILD: RELEASE ]
IF "%REGEN%"=="1" GOTO REBUILD
IF NOT "%BACKEND%"=="ninja" GOTO BUILDPROJECT
IF EXIST %BUILDDIR% GOTO BUILD
python meson.py --prefix=%CD% %BUILDDIR% %RELEASE% %DEFAULT_LIBRARY%
2017-06-08 05:32:17 +02:00
2017-05-05 02:49:29 +02:00
:BUILD
2017-05-31 13:38:47 +02:00
ECHO [ R2 MESON NINJA BUILD ]
2017-05-29 22:35:59 +02:00
copy shlr\spp\config.def.h shlr\spp\config.h
2017-06-23 12:09:39 +02:00
ninja -C %BUILDDIR%
2017-06-08 05:32:17 +02:00
exit /b %errorlevel%
2017-05-31 13:38:47 +02:00
:BUILDPROJECT
2017-06-23 12:09:39 +02:00
ECHO [ R2 MESON BUILDING %BACKEND% SLN]
IF EXIST %BUILDDIR% rd /s /q %BUILDDIR%
python meson.py --prefix=%CD% %BUILDDIR% --backend=%BACKEND% %RELEASE% %DEFAULT_LIBRARY%
GOTO EXIT
2017-05-31 13:38:47 +02:00
:REBUILD
python.exe meson.py --internal regenerate %CD% "%CD%\%BUILDDIR%" --backend %BACKEND% %RELEASE% %DEFAULT_LIBRARY%
2017-06-08 05:32:17 +02:00
2017-06-03 04:43:46 +02:00
:EXIT