annotate withGRUB2Kernel/Makefile @ 14:acdc2c21996a

chage directory structure
author Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
date Wed, 05 Sep 2012 11:49:15 +0900
parents
children e7ab5a0911d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 HOME = /Users/taira
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 prefix = $(HOME)/cross/COMMON_INSTALL/bin
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 CBC = $(prefix)/elf-cbc-gcc-4.6.0
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 LD = $(prefix)/x86_64-elf-ld
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 CBCFLAGS = -ffreestanding \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 -fno-common \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 -fno-builtin \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 -fomit-frame-pointer \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 -nodefaultlibs \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 -g \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 -Wall \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 -O2 \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 -c \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 -o
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 LDFLAGS64 = -melf_x86_64 \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 -nostdlib \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 -Ttext 0x100000 \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 --oformat elf64-x86-64 \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 -o
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 LDFLAGS32 = -melf_i386 \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 -nostdlib \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 -Ttext 0x100000 \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 --oformat elf32-i386 \
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 -o
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 LDFLAGS = $(LDFLAGS32)
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 BITFLAG = -m32
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 TARGET=cbc_os.elf
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 all: $(TARGET)
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 kernel.o: kernel.cbc
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 $(CBC) $(BITFLAG) $(CBCFLAGS) $@ $^
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 bootstrap.o: bootstrap.S
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 $(CBC) $(BITFLAG) $(CBCFLAGS) $@ $^
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 $(TARGET): bootstrap.o kernel.o
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 $(LD) $(LDFLAGS) $@ $^
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 clean:
acdc2c21996a chage directory structure
Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 rm -rf *.o *.elf