Added include folder with hos_types.h and hos_defines.h

Added mm build subdir with mm.c
Updated subdir.mak to build $(subdir)_all.o instead of $(subdir).o
Updated main Makefile to pass SUBDIR in to subdirectory builds, add $(HOS_TOPLEVEL)/include to compiler include path, and made the linker write a map file
Updated boot.asm to use the page_directory symbol from the .bss section defined in mm.o as its temporary stack area

git-svn-id: svn://anubis/hos/trunk@22 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
josh committed 2009-06-29 19:55:50 +00:00
1 parent fb807847bf
commit 90e03d4f95
8 files changed
+53 -12

No files matched your search

+5 -5
View File
@@ -20,12 +20,12 @@ WD := $(shell pwd)
export HOS_TOPLEVEL := $(WD)
LDSCRIPT := link.ld
KERNEL := hos
export CPPFLAGS := -I$(WD)/include
export CPPFLAGS := -I$(HOS_TOPLEVEL) -I$(HOS_TOPLEVEL)/include
export CFLAGS := -Wall -O2
export CXXFLAGS := -Wall -O2
export LDFLAGS := -T $(LDSCRIPT)
export LDFLAGS := -T $(LDSCRIPT) -Map $(KERNEL).map
SUBDIRS := boot
SUBDIRS := boot mm
SUBDIRS_clean := $(SUBDIRS:%=%.clean)
.PHONY: all
@@ -35,11 +35,11 @@ $(KERNEL).gz: $(KERNEL)
gzip -c $< > $@
$(KERNEL): $(SUBDIRS)
$(LD) $(LDFLAGS) -o $@ $(foreach subdir,$(SUBDIRS),$(subdir)/$(subdir).o)
$(LD) $(LDFLAGS) -o $@ $(foreach subdir,$(SUBDIRS),$(subdir)/$(subdir)_all.o)
.PHONY: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
$(MAKE) -C $@ SUBDIR=$@
.PHONY: clean
clean: $(SUBDIRS_clean)