Skip to content

Commit 293d89d

Browse files
committed
Added to the build system
1 parent 003b513 commit 293d89d

File tree

8 files changed

+16
-6
lines changed

8 files changed

+16
-6
lines changed

.#clean.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
set -e
33
. ./clean.sh # Clean the project before building again, otherwise we might get some funky errors
4-
. ./headers.sh
4+
. ./headers.sh $1 $2
55

66

77
for PROJECT in $PROJECTS; do

config.sh

+7
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,11 @@ if echo "$HOST" | grep -Eq -- '-elf($|-)'; then
3333
export CC="$CC -isystem=$INCLUDEDIR"
3434
fi
3535

36+
export HOSTARCH="i386"
37+
if [ "$1" != "" ]; then
38+
export HOSTARCH="$1"
39+
fi
3640

41+
if [ "$2" != "" ]; then
42+
export HOST="$2"
43+
fi

headers.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
set -e
3-
. ./config.sh
3+
. ./config.sh $1 $2
44

55
mkdir -p sysroot
66

iso.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
set -e
3-
. ./build.sh
3+
. ./build.sh $1 $2
44

55
mkdir -p isodir
66
mkdir -p isodir/boot

kernel/.#Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

kernel/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
HOST?=i686-elf
2-
HOSTARCH:=i386
1+
HOST?=$(HOST)
2+
HOSTARCH:=$(HOSTARCH)
33

44
CFLAGS?=-O2 -g
55
CPPFLAGS?=

launch.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/sh
22

33
set -e
4-
. ./iso.sh
4+
. ./iso.sh $1 $2
5+
clear
56

67
qemu-system-i386 -cdrom devos.iso

0 commit comments

Comments
 (0)