changeset 0:fd70ec978d9f

add Makefile
author Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
date Sat, 05 May 2012 20:36:39 +0900
parents
children d89b6aa4f359
files Makefile
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Sat May 05 20:36:39 2012 +0900
@@ -0,0 +1,25 @@
+TARGET = kernel.efi
+HOME = /Users/TaikiTAIRA
+
+prefix_gcc = $(HOME)/thesis/os/build-tools/gcc/bin
+prefix_cbc = $(HOME)/hg/CbC/build-CbC/INSTALL_DIR/bin
+prefix_ld = $(HOME)/thesis/os/build-tools/binutils/bin
+
+CC = $(prefix_gcc)/gcc
+CBC = $(prefix_cbc)/cbc-gcc-4.6.0
+LD = $(prefix_ld)/x86_64-os-elf-ld
+
+LDFLAGS = -nostdlib -Ttext=0x100000 --oformat efi-x86-64
+CFLAGS = -pipe -ffreestanding -fno-common -fno-builtin -fomit-frame-pointer -g -Wall -O2
+
+$(TARGET): kernel.o head.o
+	$(LD) $(LDFLAGS) kernel.o head.o 
+
+kernel.o: kernel.cbc
+	$(CBC) $(CFLAGS) kernel.cbc
+
+head.o: head.S multiboot.h
+	$(CBC) $(CFLAGS) head.S
+
+clean:
+	rm -rf *.o kernel.efi