annotate cos/Makefile @ 18:6129643f5c34

Fixed interrupt issue, ds, es, ss, fs and gs were not initialized to 0
author windel
date Sun, 20 Nov 2011 20:35:51 +0100
parents a58904747019
children b1fed2171e1a
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 \
18
6129643f5c34 Fixed interrupt issue, ds, es, ss, fs and gs were not initialized to 0
windel
parents: 14
diff changeset
18 -mno-red-zone \
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
19 -fno-builtin \
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
20 -mcmodel=large \
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
21 -Iinclude
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
22
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
23 OBJECTS = \
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
24 kernel/video.o \
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
25 kernel/snprintf.o \
14
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
26 kernel/kernel.o \
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
27 kernel/asmcode.o \
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
28 kernel/handlers.o
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
29
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
30
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
31 lcfosc.elf: $(CRT0) $(OBJECTS) linker.ld
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
32 ld -T linker.ld -o lcfosc.elf $(CRT0) $(OBJECTS)
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
33
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
34 %.o : %.asm Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
35 nasm -f elf64 -o $@ $<
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
36
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
37 %.o : %.c Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
38 gcc $(CFLAGS) -o $@ -c $< -Wall -Wextra -Werror
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
39
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
40 clean:
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
41 rm $(OBJECTS) $(CRT0) lcfosc.bin lcfosc.elf
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
42