wm: teppich

Download patch

ref: ca563e03c774c1da22039ead4b64ef3322249f97
parent: c8770a0db8bbbf7a51b344595f05923dd576a6af
author: mkf <mkf@cloud9p.org>
date: Sun Nov 19 05:37:23 EST 2023

Makefile: tidy up a bit

--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,18 @@
 # teppich
+TARG = i686-linux-gnu
 
-CC=i686-linux-gnu-gcc-11
-LD=i686-linux-gnu-ld.bfd
-AS=i686-linux-gnu-as
+CC := $(TARG)-gcc-11
+LD := $(TARG)-ld.bfd
+AS := $(TARG)-as
 
-CFLAGS=-O0 -g -nostdinc -I./include/ -ffreestanding -fcommon -fno-pie
-ASFLAGS=-g
-LDFLAGS=-T linker.ld
+CFLAGS +=-O0 -g -nostdinc -I./include/ -ffreestanding -fcommon -fno-pie
+ASFLAGS += -g
+LDFLAGS += -T linker.ld
 
-QEMU=qemu-system-i386
-QFLAGS=-kernel teppich.elf -m 16M -serial stdio 
+QEMU ?= qemu-system-i386
+QFLAGS +=-m 2M -serial stdio -kernel teppich.elf
 
-L=\
+L = \
 	libc/strlen.o\
 	libc/strcmp.o\
 	libc/memcpy.o\
@@ -18,7 +19,7 @@
 	libc/memset.o\
 	libc/lladd.o \
 
-K=\
+K = \
 	pc/boot.o\
 	pc/x86.o\
 	pc/kern.o\
@@ -43,4 +44,4 @@
 	rm -f *.o *.elf ${K}
 
 qemu: teppich.elf
-	$(QEMU) $(QFLAGS) teppich.elf
+	$(QEMU) $(QFLAGS)