All checks were successful
Build documentation / build-and-deploy (push) Successful in 31s
36 lines
553 B
Makefile
36 lines
553 B
Makefile
cc := clang
|
|
o :=
|
|
c :=
|
|
ldflags :=
|
|
cflags :=
|
|
buildtype ?= release
|
|
|
|
include vars.mk
|
|
include flags.mk
|
|
include src.mk
|
|
|
|
all: build/kernel.elf
|
|
|
|
build/kernel.elf: $(o)
|
|
$(cc) -o $@ $(ldflags) -T $(platform)/link.ld $^
|
|
|
|
%.o: %.c
|
|
$(cc) -c -o $@ $(cflags) $<
|
|
|
|
%.o: %.S
|
|
$(cc) -c -o $@ $(cflags) $<
|
|
|
|
clean:
|
|
rm -f $(o) build/kernel.elf
|
|
|
|
format:
|
|
clang-format -i $$(git ls-files '*.c' '*.h' \
|
|
':!limine/limine.h' \
|
|
':!c_headers/include/**' \
|
|
':!uACPI/source/**' \
|
|
':!uACPI/include/**' \
|
|
':!uACPI/tests/**' \
|
|
':!libk/printf*')
|
|
|
|
.PHONY: all clean format
|