Mercurial > hg > Members > taiki > original_os
changeset 15:e7ab5a0911d4
separate directory.
author | Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 Sep 2012 16:12:47 +0900 |
parents | acdc2c21996a |
children | ae3984023229 |
files | withGRUB2Kernel/Makefile |
diffstat | 1 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/withGRUB2Kernel/Makefile Wed Sep 05 11:49:15 2012 +0900 +++ b/withGRUB2Kernel/Makefile Mon Sep 24 16:12:47 2012 +0900 @@ -26,22 +26,29 @@ -Ttext 0x100000 \ --oformat elf32-i386 \ -o - LDFLAGS = $(LDFLAGS32) BITFLAG = -m32 +BOOT_DIR = boot +BOOT_SRCS = $(BOOT_DIR)/bootstrap.S +BOOT_OBJ = $(BOOT_DIR)/bootstrap.o + +KERNEL_DIR = kernel +KERNEL_SRCS = $(KERNEL_DIR)/kernel.cbc +KERNEL_OBJ = $(KERNEL_DIR)/kernel.o + TARGET=cbc_os.elf all: $(TARGET) -kernel.o: kernel.cbc +$(KERNEL_OBJ): $(KERNEL_SRCS) $(CBC) $(BITFLAG) $(CBCFLAGS) $@ $^ -bootstrap.o: bootstrap.S +$(BOOT_OBJ): $(BOOT_SRCS) $(CBC) $(BITFLAG) $(CBCFLAGS) $@ $^ -$(TARGET): bootstrap.o kernel.o +$(TARGET): $(KERNEL_OBJ) $(BOOT_OBJ) $(LD) $(LDFLAGS) $@ $^ clean: - rm -rf *.o *.elf + rm -rf **/*.o *.elf