annotate cos/Makefile @ 14:a58904747019

Added asm interrupt handler things, not yet working
author windel
date Mon, 14 Nov 2011 22:45:55 +0100
parents fcdae30b2782
children 6129643f5c34
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 \
14
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
25 kernel/kernel.o \
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
26 kernel/asmcode.o \
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
27 kernel/handlers.o
a58904747019 Added asm interrupt handler things, not yet working
windel
parents: 12
diff changeset
28
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
29
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
30 lcfosc.elf: $(CRT0) $(OBJECTS) linker.ld
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
31 ld -T linker.ld -o lcfosc.elf $(CRT0) $(OBJECTS)
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 : %.asm Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
34 nasm -f elf64 -o $@ $<
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
35
12
fcdae30b2782 Fixup of variable argument things
windel
parents: 11
diff changeset
36 %.o : %.c Makefile
9
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
37 gcc $(CFLAGS) -o $@ -c $< -Wall -Wextra -Werror
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
38
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
39 clean:
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
40 rm $(OBJECTS) $(CRT0) lcfosc.bin lcfosc.elf
92ace1ca50a8 64 bits kernel without interrupts but with printf in C
windel
parents:
diff changeset
41