blob: 431c01ac3d6a446daadaee9fa09eeecbcc46a874 (
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
28
29
|
all: kernel.elf
OBJS=entry.o stdlib.o tty.o
HEADERS=stdlib.h 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
stdlib.o: stdlib.c stdlib.h
tty.o: tty.c tty.h
clean:
rm -f kernel.elf *.o
|