-
Notifications
You must be signed in to change notification settings - Fork 1
/
0_1_build_userland.bat
37 lines (28 loc) · 1.17 KB
/
0_1_build_userland.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
set KERNEL_NAME=\"Q-STEP\"
set KERNEL_VERSION=\"0.0.1\"
set ASSEMBLER=ToolChain\fasm.exe
set COMPILER=ToolChain\fbc.exe
set CFLAGS=-c -nodeflibs -lang fb -arch 486 -i userland/include -i shared
set LINKER=Toolchain\bin\linux\ld.exe
set AFLAGS=
echo compile userland apps
if not exist obj mkdir obj
if not exist bin mkdir bin
if not exist bin\userland mkdir bin\userland
if not exist bin\sys mkdir bin\sys
%ASSEMBLER% userland/userland_header.asm obj/userland_header.o
for /r %%j in (userland\*.bas) do (
echo %COMPILER% %CFLAGS% userland/%%~nj.bas -o obj/%%~nj.o
%COMPILER% %CFLAGS% userland/%%~nj.bas -o obj/%%~nj.o
echo %LINKER% obj/userland_header.o obj/%%~nj.o -T userland/userland.ld -o bin/userland/%%~nj.bin
%LINKER% obj/userland_header.o obj/%%~nj.o -T userland/userland.ld -o bin/userland/%%~nj.bin
)
echo compile system binaries
for /r %%j in (sys\*.bas) do (
echo %COMPILER% %CFLAGS% sys/%%~nj.bas -o obj/%%~nj.o
%COMPILER% %CFLAGS% sys/%%~nj.bas -o obj/%%~nj.o
echo %LINKER% obj/userland_header.o obj/%%~nj.o -T userland/userland.ld -o bin/sys/%%~nj.bin
%LINKER% obj/userland_header.o obj/%%~nj.o -T userland/userland.ld -o bin/sys/%%~nj.bin
)
pause