From bee97e0b630976b96798246a3ef4eea8964099cf Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sun, 30 Nov 2014 18:53:31 +0100 Subject: Bare bones. --- kernel/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 kernel/Makefile (limited to 'kernel/Makefile') diff --git a/kernel/Makefile b/kernel/Makefile new file mode 100644 index 0000000..7a29c9e --- /dev/null +++ b/kernel/Makefile @@ -0,0 +1,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) -- cgit v1.2.3