annotate 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
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
20
b1fed2171e1a Now working with 2 MB pages
windel
parents: 18
diff changeset
5 bootdisk.img: lcfosc.bin grub/menu.lst Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
6 cp grub/emptybootdisk.img bootdisk.img
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
7 mcopy -D o -i bootdisk.img lcfosc.bin ::
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
8 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
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
10 CRT0 = kernel/goto64.o
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 CFLAGS = -m64 \
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
13 -nostdinc \
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
14 -nostdlib \
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
15 -nostartfiles \
18
6129643f5c34 Fixed interrupt issue, ds, es, ss, fs and gs were not initialized to 0
windel
parents: 14
diff changeset
16 -mno-red-zone \
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
17 -fno-builtin \
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
18 -mcmodel=large \
9
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 \
14
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
24 kernel/kernel.o \
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
25 kernel/asmcode.o \
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
26 kernel/handlers.o
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
27
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
28
20
b1fed2171e1a Now working with 2 MB pages
windel
parents: 18
diff changeset
29 lcfosc.bin: $(CRT0) $(OBJECTS) linker.ld
b1fed2171e1a Now working with 2 MB pages
windel
parents: 18
diff changeset
30 ld -T linker.ld -o lcfosc.bin $(CRT0) $(OBJECTS)
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
31
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
32 %.o : %.asm Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
33 nasm -f elf64 -o $@ $<
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
34
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
35 %.o : %.c Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
36 gcc $(CFLAGS) -o $@ -c $< -Wall -Wextra -Werror
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
37
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
38 clean:
20
b1fed2171e1a Now working with 2 MB pages
windel
parents: 18
diff changeset
39 rm $(OBJECTS) $(CRT0) lcfosc.bin
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
40