From: Jérémie Astor Date: Fri, 7 Aug 2020 19:00:15 +0000 (+0200) Subject: :wrench: install static library X-Git-Tag: nightly~1402 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=59df84609a64b8d12d97826b43b2ebca38db02dc;p=gwion.git :wrench: install static library --- diff --git a/Makefile b/Makefile index cce625de..d06d293d 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ CFLAGS += -Iinclude ifeq (${BUILD_ON_WINDOWS}, 1) ifeq (${CC}, gcc) -LDFLAGS += -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--out-implib=libgwion.dll.a +LDFLAGS += -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--out-implib=lib${PRG}.dll.a LDFLAGS += -lm endif else @@ -52,18 +52,17 @@ endif CFLAGS += -DGWION_BUILTIN -#GWLIBS = libgwion.a ast/libgwion_ast.a ast/libgwion_grammar.a util/libgwion_util.a -GWLIBS = libgwion.a ast/libgwion_ast.a util/libgwion_util.a +GWLIBS = lib${PRG}.a ast/libgwion_ast.a util/libgwion_util.a _LDFLAGS = ${GWLIBS} ${LDFLAGS} -all: options-show util/libgwion_util.a ast/libgwion_ast.a libgwion.a src/main.o +all: options-show util/libgwion_util.a ast/libgwion_ast.a lib${PRG}.a src/main.o $(info link ${PRG}) @${CC} src/main.o -o ${PRG} ${_LDFLAGS} ${LIBS} options-show: @$(call _options) -libgwion.a: ${lib_obj} +lib${PRG}.a: ${lib_obj} @${AR} ${AR_OPT} util/libgwion_util.a: @@ -92,11 +91,12 @@ clean_core: clean: clean_core $(info cleaning ...) - @rm -f src/*.o src/*/*.o gwion libgwion.a src/*.gcno src/*.gcda + @rm -f src/*.o src/*/*.o gwion lib${PRG}.a src/*.gcno src/*.gcda install: ${PRG} $(info installing ${GWION_PACKAGE} in ${PREFIX}) @install ${PRG} ${DESTDIR}/${PREFIX}/bin + @install lib${PRG}.a ${DESTDIR}/${PREFIX}/lib @sed 's/PREFIX/$\{PREFIX\}/g' scripts/gwion-config > gwion-config @install gwion-config ${DESTDIR}/${PREFIX}/bin/gwion-config @install scripts/gwion-pkg ${DESTDIR}/${PREFIX}/bin/gwion-pkg