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
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:
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