Mercurial > hg > Members > taiki > original_os
comparison 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 |
comparison
equal
deleted
inserted
replaced
13:812852f41fc0 | 14:acdc2c21996a |
---|---|
1 HOME = /Users/taira | |
2 prefix = $(HOME)/cross/COMMON_INSTALL/bin | |
3 CBC = $(prefix)/elf-cbc-gcc-4.6.0 | |
4 LD = $(prefix)/x86_64-elf-ld | |
5 | |
6 CBCFLAGS = -ffreestanding \ | |
7 -fno-common \ | |
8 -fno-builtin \ | |
9 -fomit-frame-pointer \ | |
10 -nodefaultlibs \ | |
11 -g \ | |
12 -Wall \ | |
13 -O2 \ | |
14 -c \ | |
15 -o | |
16 | |
17 LDFLAGS64 = -melf_x86_64 \ | |
18 -nostdlib \ | |
19 -Ttext 0x100000 \ | |
20 --oformat elf64-x86-64 \ | |
21 -o | |
22 | |
23 | |
24 LDFLAGS32 = -melf_i386 \ | |
25 -nostdlib \ | |
26 -Ttext 0x100000 \ | |
27 --oformat elf32-i386 \ | |
28 -o | |
29 | |
30 LDFLAGS = $(LDFLAGS32) | |
31 BITFLAG = -m32 | |
32 | |
33 TARGET=cbc_os.elf | |
34 | |
35 all: $(TARGET) | |
36 | |
37 kernel.o: kernel.cbc | |
38 $(CBC) $(BITFLAG) $(CBCFLAGS) $@ $^ | |
39 | |
40 bootstrap.o: bootstrap.S | |
41 $(CBC) $(BITFLAG) $(CBCFLAGS) $@ $^ | |
42 | |
43 $(TARGET): bootstrap.o kernel.o | |
44 $(LD) $(LDFLAGS) $@ $^ | |
45 | |
46 clean: | |
47 rm -rf *.o *.elf |