ARCH ?= x86_64 CFLAGS := \ -std=c99 -Wall -Werror -Wextra -pedantic-errors -MMD -MP -g \ -ffreestanding -fno-builtin -nostdlib -nostdinc -Iinclude LDFLAGS := \ -ffreestanding -nostdlib KERNEL_SRC := \ kernel/kernel.c BUILD := build/obj BUILD_BOOT := build/boot/$(ARCH) KERNEL_ELF := $(BUILD_BOOT)/kernel.elf .PHONY: all all: $(KERNEL_ELF) .PHONY: clean clean: rm -rf build/ .PHONY: compile_flags.txt compile_flags.txt: @echo $(CFLAGS) | tr ' ' '\n' | tee $@ include arch/$(ARCH)/Makefile include boot/$(ARCH)/Makefile