Mercurial > lcfOS
comparison cos/Makefile @ 20:b1fed2171e1a
Now working with 2 MB pages
author | windel |
---|---|
date | Mon, 28 Nov 2011 20:54:40 +0100 |
parents | 6129643f5c34 |
children | 69bc6d477b38 |
comparison
equal
deleted
inserted
replaced
19:f454e3c592dd | 20:b1fed2171e1a |
---|---|
1 # vim: set noexpandtab: | 1 # vim: set noexpandtab: |
2 | 2 |
3 all: bootdisk.img Makefile | 3 all: bootdisk.img Makefile |
4 | 4 |
5 bootdisk.img: lcfosc.elf grub/menu.lst Makefile | 5 bootdisk.img: lcfosc.bin grub/menu.lst Makefile |
6 objcopy -O binary lcfosc.elf lcfosc.bin | |
7 cp grub/emptybootdisk.img bootdisk.img | 6 cp grub/emptybootdisk.img bootdisk.img |
8 mcopy -D o -i bootdisk.img lcfosc.bin :: | 7 mcopy -D o -i bootdisk.img lcfosc.bin :: |
9 mcopy -D o -i bootdisk.img grub/menu.lst ::/grub | 8 mcopy -D o -i bootdisk.img grub/menu.lst ::/grub |
10 mdir -i bootdisk.img | |
11 | 9 |
12 CRT0 = kernel/goto64.o | 10 CRT0 = kernel/goto64.o |
13 | 11 |
14 CFLAGS = -m64 \ | 12 CFLAGS = -m64 \ |
15 -nostdinc \ | 13 -nostdinc \ |
26 kernel/kernel.o \ | 24 kernel/kernel.o \ |
27 kernel/asmcode.o \ | 25 kernel/asmcode.o \ |
28 kernel/handlers.o | 26 kernel/handlers.o |
29 | 27 |
30 | 28 |
31 lcfosc.elf: $(CRT0) $(OBJECTS) linker.ld | 29 lcfosc.bin: $(CRT0) $(OBJECTS) linker.ld |
32 ld -T linker.ld -o lcfosc.elf $(CRT0) $(OBJECTS) | 30 ld -T linker.ld -o lcfosc.bin $(CRT0) $(OBJECTS) |
33 | 31 |
34 %.o : %.asm Makefile | 32 %.o : %.asm Makefile |
35 nasm -f elf64 -o $@ $< | 33 nasm -f elf64 -o $@ $< |
36 | 34 |
37 %.o : %.c Makefile | 35 %.o : %.c Makefile |
38 gcc $(CFLAGS) -o $@ -c $< -Wall -Wextra -Werror | 36 gcc $(CFLAGS) -o $@ -c $< -Wall -Wextra -Werror |
39 | 37 |
40 clean: | 38 clean: |
41 rm $(OBJECTS) $(CRT0) lcfosc.bin lcfosc.elf | 39 rm $(OBJECTS) $(CRT0) lcfosc.bin |
42 | 40 |