Rev 37 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 1 | @echo off |
| 37 | pmbaty | 2 | setlocal enableextensions enabledelayedexpansion |
| 1 | pmbaty | 3 | |
| 31 | pmbaty | 4 | rem echo Setting up the toolchain... |
| 1 | pmbaty | 5 | set THISDIR=%~dp0 |
| 6 | cd /d %~dp0\..\qnx800 |
||
| 31 | pmbaty | 7 | call qnxsdp-env.bat > nul || goto :eof |
| 1 | pmbaty | 8 | cd /d "%THISDIR%" |
| 9 | |||
| 31 | pmbaty | 10 | set BINARIES=%~1 |
| 11 | if "%BINARIES%"=="" set BINARIES=ifstool |
||
| 1 | pmbaty | 12 | |
| 31 | pmbaty | 13 | call :build_for aarch64-unknown-nto-qnx8.0.0 "%BINARIES%" || exit /b 1 |
| 14 | call :build_for x86_64-pc-nto-qnx8.0.0 "%BINARIES%" || exit /b 1 |
||
| 15 | goto :end |
||
| 1 | pmbaty | 16 | |
| 28 | pmbaty | 17 | |
| 31 | pmbaty | 18 | :build_for |
| 19 | set CC=%1-gcc-12.2.0 |
||
| 20 | set CPPFLAGS=-D_QNX_SOURCE -Ilibucl/include -Ilibucl/src -Ilibucl -Iliblzo |
||
| 21 | set LDFLAGS= |
||
| 22 | |||
| 23 | if not "%BINARIES:ifstool=%"=="%BINARIES%" del /f /q %1-ifstool > nul 2>&1 |
||
| 24 | del /f /s /q .build > nul 2>&1 |
||
| 25 | mkdir .build > nul 2>&1 |
||
| 26 | |||
| 27 | if not "%BINARIES:ifstool=%"=="%BINARIES%" ( |
||
| 28 | echo Building ifstool for %1... |
||
| 44 | pmbaty | 29 | set SRCLIST= |
| 30 | for /f usebackq^ tokens^=2^ delims^=^" %%f in (`findstr /c:"ClCompile Include" ifstool.vcxproj`) do set SRCLIST=!SRCLIST! %%f |
||
| 31 | set SRCLIST=!SRCLIST:\=/! |
||
| 37 | pmbaty | 32 | "%CC%" %CPPFLAGS% !SRCLIST! %LDFLAGS% -o %1-ifstool || goto :eof |
| 31 | pmbaty | 33 | |
| 34 | if "%1"=="aarch64-unknown-nto-qnx8.0.0" ( |
||
| 35 | echo Deploying ifstool to QNX8 native aarch64le toolchain... |
||
| 36 | copy /b %1-ifstool ..\qnx800\target\qnx\aarch64le\usr\bin\ifstool || goto :eof |
||
| 37 | ) else if "%1"=="x86_64-pc-nto-qnx8.0.0" ( |
||
| 38 | echo Deploying ifstool to QNX8 native x86_64 toolchain... |
||
| 39 | copy /b %1-ifstool ..\qnx800\target\qnx\x86_64\usr\bin\ifstool || goto :eof |
||
| 40 | ) |
||
| 41 | ) |
||
| 42 | |||
| 43 | goto :eof |
||
| 44 | |||
| 45 | |||
| 46 | :end |
||
| 47 | if "%~1"=="" echo Done |
||
| 48 | if "%~1"=="" pause |