Skip to content

Commit 8204c17

Browse files
committed
add static library build
1 parent 7a6904a commit 8204c17

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ifdef DEBUG
112112
CFLAGS += -g
113113
endif
114114

115-
all: libhl hl libs
115+
all: libhl hl libs libhl.a
116116

117117
install:
118118
$(UNAME)==Darwin && make uninstall
@@ -163,6 +163,9 @@ mysql: ${MYSQL} libhl
163163
mesa:
164164
(cd libs/mesa && make)
165165

166+
libhl.a: ${LIB} ${FMT} ${SDL} ${SSL} ${OPENAL} ${UI} ${UV} ${MYSQL}
167+
ar rcs $@ $^
168+
166169
release: release_version release_$(RELEASE_NAME)
167170

168171
release_version:
@@ -223,10 +226,13 @@ codesign_osx:
223226
.c.o :
224227
${CC} ${CFLAGS} -o $@ -c $<
225228

229+
clean_a:
230+
rm -f libhl.a
231+
226232
clean_o:
227233
rm -f ${STD} ${BOOT} ${RUNTIME} ${PCRE} ${HL} ${FMT} ${SDL} ${SSL} ${OPENAL} ${UI} ${UV} ${HL_DEBUG}
228234

229-
clean: clean_o
235+
clean: clean_o clean_a
230236
rm -f hl hl.exe libhl.$(LIBEXT) *.hdll
231237

232238
.PHONY: libhl hl hlc fmt sdl libs release

0 commit comments

Comments
 (0)