diff Makefile @ 11:26b76ada8c13

add README.txt. This file contain TODO and how to way boot cbc_os.
author Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
date Thu, 30 Aug 2012 21:31:23 +0900
parents 50e4b9ca4867
children b045d733207e
line wrap: on
line diff
--- a/Makefile	Mon Aug 27 23:45:31 2012 +0900
+++ b/Makefile	Thu Aug 30 21:31:23 2012 +0900
@@ -1,10 +1,9 @@
-HOME		= /Users/TaikiTAIRA
+HOME		= /Users/taira
 prefix		= $(HOME)/cross/COMMON_INSTALL/bin
 CBC			= $(prefix)/elf-cbc-gcc-4.6.0
 LD			= $(prefix)/x86_64-elf-ld
 
-CBCFLAGS	= -m32 \
-			  -ffreestanding \
+CBCFLAGS	= -ffreestanding \
 			  -fno-common \
 			  -fno-builtin \
 			  -fomit-frame-pointer \
@@ -14,10 +13,10 @@
 			  -c \
 			  -o
 
-LDFLAGS		= -m elf_i386 \
+LDFLAGS		= -m elf_x86_64 \
 			  -nostdlib \
 			  -Ttext 0x100000 \
-			  --oformat elf32-i386 \
+			  --oformat elf64-x86-64 \
 			  -o 
 
 TARGET=cbc_os.elf
@@ -25,14 +24,16 @@
 all: $(TARGET)
 
 kernel.o: kernel.cbc 
-	$(CBC) $(CBCFLAGS) $@ $^ 
+	$(CBC) -m64 $(CBCFLAGS) $@ $^ 
 
 bootstrap.o: bootstrap.S 
-	$(CBC) $(CBCFLAGS) $@  $^
+	$(CBC) -m64 $(CBCFLAGS) $@ $^
 
-$(TARGET): bootstrap.o kernel.o
+head32.o: head32.S
+	$(CBC) -m64 $(CBCFLAGS) $@ $^ 
+
+$(TARGET): bootstrap.o kernel.o head32.o
 	$(LD) $(LDFLAGS) $@ $^
 
-
 clean:
 	rm -rf *.o *.elf