Files
mop3/make/lib.mk
kamkow1 60c44f2939
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m44s
docs fix generation for libs
2026-03-15 22:26:49 +01:00

44 lines
799 B
Makefile

cc := clang
o :=
c :=
cflags += -isystem .
buildtype ?= release
include src.mk
include ../generic/flags.mk
include ../$(platform)/flags.mk
FORMAT ?= clang-format -i $$(git ls-files '*.c' '*.h')
DOCS_COLLECT ?= $$(git ls-files '*.c' '*.h')
DOCS ?= \
rm -rf docs; \
clang-doc --format=md --output docs -p . $(DOCS_COLLECT); \
for f in ./docs/GlobalNamespace/*.md; do sed -i '/^\# Global Namespace/d' "$$f"; done; \
rm -rf ../docs/libs/$(libname); \
mkdir -p ../docs/libs/$(libname); \
cp ./docs/GlobalNamespace/*.md ../docs/libs/$(libname);
all: build/$(libname).a
build/$(libname).a: $(o)
llvm-ar rcs $@ $^
%.o: %.c
$(cc) -c -o $@ $(cflags) $<
%.o: %.S
$(cc) -c -o $@ $(cflags) $<
clean:
rm -f $(o) build/$(libname).a
format:
$(FORMAT)
docs:
$(DOCS)
.PHONY: all clean format