Mercurial > hg > Members > taiki > original_os
changeset 6:ee6e0a17b894
conbine main kernel source.
author | Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 02 Aug 2012 18:59:26 +0900 |
parents | be1123717c14 |
children | 16ddcacdcb8f |
files | Makefile |
diffstat | 1 files changed, 44 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Fri Jul 27 21:06:56 2012 +0900 +++ b/Makefile Thu Aug 02 18:59:26 2012 +0900 @@ -1,12 +1,49 @@ -include ./Makefile.def +HOME = /Users/TaikiTAIRA +prefix = $(HOME)/cross/COMMON_INSTALL/bin +CBC = $(prefix)/elf-cbc-gcc-4.6.0 +LD = $(prefix)/x86_64-elf-ld -default: app +CBCFLAGS = -m32 \ + -ffreestanding \ + -fno-common \ + -fno-builtin \ + -fomit-frame-pointer \ + -Wall \ + -O2 \ + -c \ + -o + +LDFLAGS = -m elf_i386 \ + -nostdlib \ + -Ttext=0x100000 \ + --oformat elf32-i386 \ + -o + +TARGET=cbc_os.elf -os: - @$(MAKE) -f Makefile.os +all: $(TARGET) + +kernel_end.o: kernel_end.cbc + $(CBC) $(CBCFLAGS) $@ $^ + +kernel_main.o: kernel_main.cbc + $(CBC) $(CBCFLAGS) $@ $^ + +init.o: init.cbc + $(CBC) $(CBCFLAGS) $@ $^ -app: - @$(MAKE) -f Makefile.app +start.o: start.cbc + $(CBC) $(CBCFLAGS) $@ $^ + +kernel_start.o: kernel_start.cbc kernel_main.o + $(CBC) $(CBCFLAGS) $@ $^ + +bootstrap.o: bootstrap.S + $(CBC) $(CBCFLAGS) $@ $^ + +$(TARGET): bootstrap.o start.o + $(LD) $(LDFLAGS) $@ $^ + clean: - rm -rf *.o kernel kernel.elf + @rm -rf *.o *.elf