annotate cos/Makefile @ 12:fcdae30b2782

Fixup of variable argument things
author windel
date Mon, 14 Nov 2011 21:31:27 +0100
parents 607898120eb1
children a58904747019
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
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
3 all: bootdisk.img Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
4
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
5 bootdisk.img: lcfosc.elf grub/menu.lst Makefile
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 \
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
19 -mcmodel=large \
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
20 -Iinclude
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
21
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
22 OBJECTS = \
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
23 kernel/video.o \
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
24 kernel/snprintf.o \
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
25 kernel/kernel.o
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
26
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
27 lcfosc.elf: $(CRT0) $(OBJECTS) linker.ld
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
28 ld -T linker.ld -o lcfosc.elf $(CRT0) $(OBJECTS)
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
29
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
30 %.o : %.asm Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
31 nasm -f elf64 -o $@ $<
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
32
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
33 %.o : %.c Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
34 gcc $(CFLAGS) -o $@ -c $< -Wall -Wextra -Werror
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
35
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
36 clean:
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
37 rm $(OBJECTS) $(CRT0) lcfosc.bin lcfosc.elf
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
38