summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmeta/new.sh2
-rwxr-xr-xmeta/sync.sh2
-rw-r--r--userland/test/Makefile4
-rw-r--r--userland/windowserver/Makefile8
4 files changed, 9 insertions, 7 deletions
diff --git a/meta/new.sh b/meta/new.sh
index deb0774..24d1b1d 100755
--- a/meta/new.sh
+++ b/meta/new.sh
@@ -3,6 +3,8 @@
# completly reset it
scriptdir="$(dirname "$0")"
cd "$scriptdir"
+# Include /sbin to the PATH since mkfs.ext2 exists only in sbin on debian :/
+export PATH="$PATH:/sbin"
rm ext2.img
mkfs.ext2 ext2.img 20M
./sync.sh
diff --git a/meta/sync.sh b/meta/sync.sh
index 036ad18..ab56757 100755
--- a/meta/sync.sh
+++ b/meta/sync.sh
@@ -2,6 +2,8 @@
scriptdir="$(dirname "$0")"
cd "$scriptdir"
+[ -f ./ext2.img ] || (./new.sh ; exit)
+
# Sync the sysroot with the bootable image
mkdir ./mount
sudo mount ext2.img mount
diff --git a/userland/test/Makefile b/userland/test/Makefile
index 0e3b495..76cf844 100644
--- a/userland/test/Makefile
+++ b/userland/test/Makefile
@@ -1,12 +1,10 @@
CC="i686-sb-gcc"
CFLAGS = -O2 -Wall -Wextra -pedantic -Wimplicit-fallthrough -static
-LIB=-L../json -L../json/hashmap -ljson -lhashmap
-INC=-I../json/
BINS=test
all: $(BINS)
test.o: test.c
- $(CC) $(CFLAGS) $(INC) $(LIB) -o $@ -c $<
+ $(CC) $(CFLAGS) -o $@ -c $<
test: test.o
$(CC) $(CFLAGS) -o $@ $^ $(LIB)
diff --git a/userland/windowserver/Makefile b/userland/windowserver/Makefile
index 65a50f6..7f80f2e 100644
--- a/userland/windowserver/Makefile
+++ b/userland/windowserver/Makefile
@@ -1,8 +1,8 @@
CC="i686-sb-gcc"
-CFLAGS = -ggdb -ffreestanding -O2 -Wall -Wextra -pedantic -mgeneral-regs-only -Wimplicit-fallthrough -fsanitize=shift,signed-integer-overflow,bounds
+CFLAGS = -ggdb -ffreestanding -O2 -Wall -Wextra -pedantic -mgeneral-regs-only -Wimplicit-fallthrough
BIN=ws
-LIB=-L../json -ljson -L../json/hashmap -lhashmap -L../libc -lc -lgcc
-INC=-I../json/ -I../libgui/
+LIB=-lgcc
+INC=-I../libgui/
all: $(BIN)
OBJ=ws.o draw.o
@@ -13,4 +13,4 @@ clean:
rm $(OBJ) ws
$(BIN): $(OBJ)
- $(CC) -o $(BIN) -ffreestanding -nostdlib $(CFLAGS) $(OBJ) $(LIB)
+ $(CC) -o $(BIN) $(CFLAGS) $(OBJ) $(LIB)