-
Notifications
You must be signed in to change notification settings - Fork 0
/
0_1_build_userland.bat
31 lines (22 loc) · 1.11 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
@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
%ASSEMBLER% userland/userland_header.asm obj/userland_header.o
for /d %%j in (userland\apps\*.*) do (
if exist userland\apps\%%~nj\main.bas echo %COMPILER% %CFLAGS% userland/apps/%%~nj/main.bas -o obj/%%~nj.o
if exist userland\apps\%%~nj\main.bas %COMPILER% %CFLAGS% userland/apps/%%~nj/main.bas -o obj/%%~nj.o
if exist userland\apps\%%~nj\main.bas echo %LINKER% obj/%%~nj.o -T userland/userland.ld -o bin/userland/%%~nj
if exist userland\apps\%%~nj\main.bas %LINKER% obj/%%~nj.o -T userland/userland.ld -o bin/userland/%%~nj
if exist userland\apps\%%~nj\main.asm echo %ASSEMBLER% userland/apps/%%~nj/main.asm bin/userland/%%~nj
if exist userland\apps\%%~nj\main.asm %ASSEMBLER% userland/apps/%%~nj/main.asm bin/userland/%%~nj
)
pause