Rev 29 | Rev 37 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 29 | Rev 31 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | @echo off |
1 | @echo off |
2 | 2 | ||
3 |
|
3 | rem echo Setting up the toolchain... |
4 | set THISDIR=%~dp0 |
4 | set THISDIR=%~dp0 |
5 | cd /d %~dp0\..\qnx800 |
5 | cd /d %~dp0\..\qnx800 |
6 | call qnxsdp-env.bat || goto :eof |
6 | call qnxsdp-env.bat > nul || goto :eof |
7 | cd /d "%THISDIR%" |
7 | cd /d "%THISDIR%" |
8 | 8 | ||
9 |
|
9 | set BINARIES=%~1 |
10 |
|
10 | if "%BINARIES%"=="" set BINARIES=ifstool |
11 | 11 | ||
12 |
|
12 | call :build_for aarch64-unknown-nto-qnx8.0.0 "%BINARIES%" || exit /b 1 |
13 | x86_64-pc-nto-qnx8.0.0 |
13 | call :build_for x86_64-pc-nto-qnx8.0.0 "%BINARIES%" || exit /b 1 |
14 | -D_QNX_SOURCE ^ |
- | |
15 | -Ilibucl/include ^ |
- | |
16 | -Ilibucl/src ^ |
- | |
17 | -Ilibucl ^ |
- | |
18 | -Iliblzo ^ |
- | |
19 | liblzo/minilzo.c ^ |
- | |
20 | libucl/src/alloc.c ^ |
- | |
21 | libucl/src/n2b_99.c ^ |
- | |
22 | libucl/src/n2b_d.c ^ |
- | |
23 | libucl/src/n2b_ds.c ^ |
- | |
24 | libucl/src/n2b_to.c ^ |
- | |
25 | libucl/src/n2d_99.c ^ |
- | |
26 | libucl/src/n2d_d.c ^ |
- | |
27 | libucl/src/n2d_ds.c ^ |
- | |
28 | libucl/src/n2d_to.c ^ |
- | |
29 | libucl/src/n2e_99.c ^ |
- | |
30 | libucl/src/n2e_d.c ^ |
- | |
31 | libucl/src/n2e_ds.c ^ |
- | |
32 | libucl/src/n2e_to.c ^ |
- | |
33 | libucl/src/ucl_crc.c ^ |
- | |
34 | libucl/src/ucl_init.c ^ |
- | |
35 | libucl/src/ucl_ptr.c ^ |
- | |
36 | libucl/src/ucl_str.c ^ |
- | |
37 | libucl/src/ucl_util.c ^ |
- | |
38 | buffer.c ^ |
- | |
39 | dump.c ^ |
- | |
40 |
|
14 | goto :end |
41 | sha512.c ^ |
- | |
42 | -o ifstool || goto :eof |
- | |
43 | 15 | ||
44 | if exist ..\qnx800\host\qnx8\x86_64\usr\bin\. ( |
- | |
45 | echo Deploying to QNX8 toolchain... |
- | |
46 | copy /b ifstool ..\qnx800\host\qnx8\x86_64\usr\bin\ifstool |
- | |
47 | ) |
- | |
48 | 16 | ||
- | 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 | ||
49 | : |
66 | :end |
- | 67 | if "%~1"=="" echo Done |
|
50 | pause |
68 | if "%~1"=="" pause |