summaryrefslogtreecommitdiffstats
path: root/kernel/Makefile
blob: 725069688320a34315eef09c0a59c9ac983b5dfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
all: kernel.elf

OBJS=entry.o tty.o
HEADERS=tty.h

.SUFFIXES: .asm

.c.o :
	gcc -std=gnu99 -m32 -fno-builtin -ffreestanding -nostdlib -Wall -Wextra -c $< -o $@

.S.o :
	as -32 $< -o $@

.asm.o :
	nasm -felf32 $< -o $@


kernel.elf: kernel.o $(OBJS) $(HEADERS)
	ld -Tlinker.ld -melf_i386 $(OBJS) kernel.o -o kernel.elf

entry.o: entry.asm

tty.o: tty.c tty.h


clean:
	rm -f kernel.elf *.o