From 4c94063fc08ffdcbd250e99f7c24c44be1f40023 Mon Sep 17 00:00:00 2001 From: Matt Molyneaux Date: Sat, 2 Oct 2021 22:41:14 +0100 Subject: [PATCH] add static library build --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 50dfb4d27..4f1a907a0 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ ifdef DEBUG CFLAGS += -g endif -all: libhl hl libs +all: libhl hl libs libhl.a install: $(UNAME)==Darwin && make uninstall @@ -163,6 +163,9 @@ mysql: ${MYSQL} libhl mesa: (cd libs/mesa && make) +libhl.a: ${LIB} ${FMT} ${SDL} ${SSL} ${OPENAL} ${UI} ${UV} ${MYSQL} + ar rcs $@ $^ + release: release_version release_$(RELEASE_NAME) release_version: @@ -223,10 +226,13 @@ codesign_osx: .c.o : ${CC} ${CFLAGS} -o $@ -c $< +clean_a: + rm -f libhl.a + clean_o: rm -f ${STD} ${BOOT} ${RUNTIME} ${PCRE} ${HL} ${FMT} ${SDL} ${SSL} ${OPENAL} ${UI} ${UV} ${HL_DEBUG} -clean: clean_o +clean: clean_o clean_a rm -f hl hl.exe libhl.$(LIBEXT) *.hdll .PHONY: libhl hl hlc fmt sdl libs release