diff --git a/kernel/Makefile b/kernel/Makefile index ba0eed7..d8d33bb 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -17,6 +17,7 @@ endif export NASM := nasm WD := $(shell pwd) +export HOS_TOPLEVEL := $(WD) LDSCRIPT := link.ld KERNEL := hos export CPPFLAGS := -I$(WD)/include @@ -34,7 +35,7 @@ $(KERNEL).gz: $(KERNEL) gzip -c $< > $@ $(KERNEL): $(SUBDIRS) - $(LD) $(LDFLAGS) -o $@ $(SUBDIRS:%=%/%.o) + $(LD) $(LDFLAGS) -o $@ $(foreach subdir,$(SUBDIRS),$(subdir)/$(subdir).o) .PHONY: $(SUBDIRS) $(SUBDIRS): diff --git a/kernel/boot/Makefile b/kernel/boot/Makefile new file mode 100644 index 0000000..cae81d7 --- /dev/null +++ b/kernel/boot/Makefile @@ -0,0 +1,2 @@ + +include $(HOS_TOPLEVEL)/subdir.mak diff --git a/kernel/boot.asm b/kernel/boot/boot.asm similarity index 100% rename from kernel/boot.asm rename to kernel/boot/boot.asm