9
|
1 # vim: set noexpandtab:
|
|
2
|
29
|
3 all: lcfos.bin Makefile
|
9
|
4
|
28
|
5 CRT0 = goto64.o
|
9
|
6
|
28
|
7 CFLAGS = -m64 -nostdinc -nostdlib -nostartfiles -mno-red-zone \
|
|
8 -fno-builtin -mcmodel=large -Wall -Wextra -Werror
|
9
|
9
|
28
|
10 OBJECTS = video.o snprintf.o kernel.o asmcode.o handlers.o keyboard.o \
|
|
11 klib.o malloc.o task.o mm.o timer.o
|
14
|
12
|
29
|
13 lcfos.bin: $(CRT0) $(OBJECTS) link.ld
|
|
14 ld -T link.ld -s -o lcfos.bin $(CRT0) $(OBJECTS)
|
9
|
15
|
29
|
16 %.o : %.asm
|
9
|
17 nasm -f elf64 -o $@ $<
|
|
18
|
30
|
19 %.o : %.c kernel.h
|
28
|
20 gcc $(CFLAGS) -o $@ -c $<
|
9
|
21
|
|
22 clean:
|
20
|
23 rm $(OBJECTS) $(CRT0) lcfosc.bin
|
9
|
24
|