summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJake Mannens <jake72360@gmail.com>2018-06-24 02:27:22 +1000
committerJake Mannens <jake72360@gmail.com>2018-06-24 02:27:22 +1000
commit97d3551106495fa18969e2690720b621ba5a9c0b (patch)
tree76967873f1f4209b940eadc77753bd67ef65e0b1 /Makefile
parentacba87c1e946118f0ba4308a7211199cf9b7cbb2 (diff)
Re-structured the source tree and modified makefiles accordingly.
Hopefully further separation will help to keep the code readable and understandable.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 18 insertions, 4 deletions
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: