From 97d3551106495fa18969e2690720b621ba5a9c0b Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Sun, 24 Jun 2018 02:27:22 +1000 Subject: Re-structured the source tree and modified makefiles accordingly. Hopefully further separation will help to keep the code readable and understandable. --- Makefile | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 919e5f1..15f76ec 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,24 @@ +TARGET = kernel.elf + +LDFLAGS = -m elf_i386 -T link.ld + +LD = ld $(LDFLAGS) + all: build -build: - $(MAKE) -C kernel +build: $(TARGET) -run: - $(MAKE) -C kernel run +$(TARGET): .FORCE + $(MAKE) -C kernel + $(MAKE) -C usrbin + $(LD) -o $(TARGET) kernel/kernel.o usrbin/usrbin_blob.o clean: $(MAKE) -C kernel clean + $(MAKE) -C usrbin clean + rm -f $(TARGET) + +run: + qemu-system-x86_64 -s -kernel $(TARGET) + +.FORCE: -- cgit v1.3