blob: 7a29c9e8cc30befde40606371760e83baa5cbabb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
AS = nasm
ASFLAGS = -felf
CC = i586-elf-gcc
CFLAGS = -ffreestanding -O2 -std=gnu99 -Wall -Wextra -I ./include
LD = i586-elf-gcc
LDFLAGS = -T linker.ld -ffreestanding -O2 -nostdlib -lgcc
OBJ = l0/loader.o l0/kmain.o
all: kernel.bin
kernel.bin: $(OBJ)
$(LD) $(LDFLAGS) -o $@ $^
%.o: %.s
$(AS) $(ASFLAGS) -o $@ $<
%.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)
|