Rev 29 | Rev 37 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 1 | @echo off |
| 2 | |||
| 31 | pmbaty | 3 | rem echo Setting up the toolchain... |
| 1 | pmbaty | 4 | set THISDIR=%~dp0 |
| 5 | cd /d %~dp0\..\qnx800 |
||
| 31 | pmbaty | 6 | call qnxsdp-env.bat > nul || goto :eof |
| 1 | pmbaty | 7 | cd /d "%THISDIR%" |
| 8 | |||
| 31 | pmbaty | 9 | set BINARIES=%~1 |
| 10 | if "%BINARIES%"=="" set BINARIES=ifstool |
||
| 1 | pmbaty | 11 | |
| 31 | pmbaty | 12 | call :build_for aarch64-unknown-nto-qnx8.0.0 "%BINARIES%" || exit /b 1 |
| 13 | call :build_for x86_64-pc-nto-qnx8.0.0 "%BINARIES%" || exit /b 1 |
||
| 14 | goto :end |
||
| 1 | pmbaty | 15 | |
| 28 | pmbaty | 16 | |
| 31 | pmbaty | 17 | :build_for |
| 18 | set CC=%1-gcc-12.2.0 |
||
| 19 | set CPPFLAGS=-D_QNX_SOURCE -Ilibucl/include -Ilibucl/src -Ilibucl -Iliblzo |
||
| 20 | set LDFLAGS= |
||
| 21 | |||
| 22 | if not "%BINARIES:ifstool=%"=="%BINARIES%" del /f /q %1-ifstool > nul 2>&1 |
||
| 23 | del /f /s /q .build > nul 2>&1 |
||
| 24 | mkdir .build > nul 2>&1 |
||
| 25 | |||
| 26 | if not "%BINARIES:ifstool=%"=="%BINARIES%" ( |
||
| 27 | echo Building ifstool for %1... |
||
| 28 | "%CC%" %CPPFLAGS% ^ |
||
| 29 | liblzo/minilzo.c ^ |
||
| 30 | libucl/src/alloc.c ^ |
||
| 31 | libucl/src/n2b_99.c ^ |
||
| 32 | libucl/src/n2b_d.c ^ |
||
| 33 | libucl/src/n2b_ds.c ^ |
||
| 34 | libucl/src/n2b_to.c ^ |
||
| 35 | libucl/src/n2d_99.c ^ |
||
| 36 | libucl/src/n2d_d.c ^ |
||
| 37 | libucl/src/n2d_ds.c ^ |
||
| 38 | libucl/src/n2d_to.c ^ |
||
| 39 | libucl/src/n2e_99.c ^ |
||
| 40 | libucl/src/n2e_d.c ^ |
||
| 41 | libucl/src/n2e_ds.c ^ |
||
| 42 | libucl/src/n2e_to.c ^ |
||
| 43 | libucl/src/ucl_crc.c ^ |
||
| 44 | libucl/src/ucl_init.c ^ |
||
| 45 | libucl/src/ucl_ptr.c ^ |
||
| 46 | libucl/src/ucl_str.c ^ |
||
| 47 | libucl/src/ucl_util.c ^ |
||
| 48 | buffer.c ^ |
||
| 49 | dump.c ^ |
||
| 50 | ifstool.c ^ |
||
| 51 | sha512.c ^ |
||
| 52 | %LDFLAGS% -o %1-ifstool || goto :eof |
||
| 53 | |||
| 54 | if "%1"=="aarch64-unknown-nto-qnx8.0.0" ( |
||
| 55 | echo Deploying ifstool to QNX8 native aarch64le toolchain... |
||
| 56 | copy /b %1-ifstool ..\qnx800\target\qnx\aarch64le\usr\bin\ifstool || goto :eof |
||
| 57 | ) else if "%1"=="x86_64-pc-nto-qnx8.0.0" ( |
||
| 58 | echo Deploying ifstool to QNX8 native x86_64 toolchain... |
||
| 59 | copy /b %1-ifstool ..\qnx800\target\qnx\x86_64\usr\bin\ifstool || goto :eof |
||
| 60 | ) |
||
| 61 | ) |
||
| 62 | |||
| 63 | goto :eof |
||
| 64 | |||
| 65 | |||
| 66 | :end |
||
| 67 | if "%~1"=="" echo Done |
||
| 68 | if "%~1"=="" pause |