comparison cos/Makefile @ 9:92ace1ca50a8

64 bits kernel without interrupts but with printf in C
author windel
date Sun, 13 Nov 2011 12:47:47 +0100
parents
children 607898120eb1
comparison
equal deleted inserted replaced
8:edd70006d3e4 9:92ace1ca50a8
1 # vim: set noexpandtab:
2
3 all: lcfosc.elf
4
5 bootdisk: lcfosc.elf grub/menu.lst
6 objcopy -O binary lcfosc.elf lcfosc.bin
7 cp grub/emptybootdisk.img bootdisk.img
8 mcopy -D o -i bootdisk.img lcfosc.bin ::
9 mcopy -D o -i bootdisk.img grub/menu.lst ::/grub
10 mdir -i bootdisk.img
11
12 CRT0 = kernel/goto64.o
13
14 CFLAGS = -m64 \
15 -nostdinc \
16 -nostdlib \
17 -nostartfiles \
18 -fno-builtin \
19 -Iinclude
20
21 OBJECTS = \
22 kernel/video.o \
23 kernel/snprintf.o \
24 kernel/kernel.o
25
26 lcfosc.elf: $(CRT0) $(OBJECTS) linker.ld
27 ld -T linker.ld -o lcfosc.elf $(CRT0) $(OBJECTS)
28
29 %.o : %.asm
30 nasm -f elf64 -o $@ $<
31
32 %.o : %.c
33 gcc $(CFLAGS) -o $@ -c $< -Wall -Wextra -Werror
34
35 clean:
36 rm $(OBJECTS) $(CRT0) lcfosc.bin lcfosc.elf
37