Generic lib.mk makefile for building libraries
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m32s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m32s
This commit is contained in:
@@ -1,33 +1,7 @@
|
||||
cc := clang
|
||||
o :=
|
||||
c :=
|
||||
cflags := -isystem . -isystem ../libmsl
|
||||
buildtype ?= release
|
||||
include ../make/ufuncs.mk
|
||||
|
||||
include src.mk
|
||||
include ../generic/flags.mk
|
||||
include ../$(platform)/flags.mk
|
||||
$(eval $(call add_include,libmsl))
|
||||
|
||||
all: build/libterminal.a
|
||||
libname := libterminal
|
||||
|
||||
build/libterminal.a: $(o)
|
||||
llvm-ar rcs $@ $^
|
||||
|
||||
%.o: %.c
|
||||
$(cc) -c -o $@ $(cflags) $<
|
||||
|
||||
%.o: %.S
|
||||
$(cc) -c -o $@ $(cflags) $<
|
||||
|
||||
clean:
|
||||
rm -f $(o) build/libterminal.a
|
||||
|
||||
format:
|
||||
clang-format -i $$(git ls-files '*.c' '*.h')
|
||||
|
||||
docs:
|
||||
clang-doc --format=md --output docs -p . $$(git ls-files '*.h')
|
||||
mkdir -p ../docs/libs/libterminal
|
||||
cp ./docs/GlobalNamespace/*.md ../docs/libs/libterminal
|
||||
|
||||
.PHONY: all clean format
|
||||
include ../make/lib.mk
|
||||
|
||||
Reference in New Issue
Block a user