annotate cos/Makefile @ 11:607898120eb1

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