Files
mop3/make/user.mk
kamkow1 955dbc7614
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m16s
Use LLVM linker, Dockerfile now works without GCC
2026-03-07 10:41:35 +01:00

31 lines
528 B
Makefile

cc := clang
ld := ld.lld
o :=
c :=
ldflags += -L ../libsystem/build -l:libsystem.a -L ../liballoc/build -l:liballoc.a
cflags += -isystem ../libsystem -isystem ../liballoc
include src.mk
include app.mk
include ../generic/flags.mk
include ../$(platform)/flags.mk
all: $(app)
$(app): $(o)
$(ld) -o $@ $(ldflags) -T ../$(platform)/link.ld $^
%.o: %.c
$(cc) -c -o $@ $(cflags) $<
%.o: %.S
$(cc) -c -o $@ $(cflags) $<
clean:
rm -f $(o) $(app)
format:
clang-format -i $$(git ls-files '*.c' '*.h')
.PHONY: all clean format