cake
/
libg1m
Archived
1
0
Fork 0

Corrected configuration tools

This commit is contained in:
Thomas Touhey 2017-02-20 00:00:16 +01:00
parent 08b7995ad2
commit 0c324a5ce0
4 changed files with 20 additions and 6 deletions

View File

@ -176,7 +176,8 @@ $(eval $(call make-moduleobj-rule,$(mod))))
$(call imsg,Installing the configuration tool.)
$(call qcmd,$(INST) -m 755 -d "$(IBINDIR)")
$(call qcmd,tools/write-config \
--name=$(NAME) --version=$(VERSION) \
--name=$(NAME) --version=$(VERSION) --target="$(TARGET)" \
--runlibs="$(RLIBS)" \
--maintainer="$(MAINTAINER_NAME) <$(MAINTAINER_MAIL)>" \
--incdir="$(OIINCDIR)/lib$(NAME)-$(VERSION)" --libdir="$(OILIBDIR)" \
>"$(IBINDIR)/lib$(NAME)-config" \
@ -185,7 +186,7 @@ $(eval $(call make-moduleobj-rule,$(mod))))
$(call imsg,Installing the pkg-config configuration.)
$(call qcmd,$(INST) -m 755 -d "$(IPKGDIR)")
$(call qcmd,tools/write-pkg-config \
--name=$(NAME) --version=$(VERSION) \
--name=$(NAME) --version=$(VERSION) --runlibs="$(RLIBS)" \
--description="$(DESCRIPTION)" \
--incdir="$(OIINCDIR)/lib$(NAME)-$(VERSION)" --libdir="$(OILIBDIR)" \
>"$(IPKGDIR)/lib$(NAME).pc" \

View File

@ -56,8 +56,11 @@
ANAME := $(if $(FOR_WINDOWS),lib$(NAME).lib,lib$(NAME).a)
ANAMES := lib$(NAME).lib lib$(NAME).a lib$(NAME).dll.a
# Required libs
LIBS := zlib libfontcharacter
# Runtime libs
RLIBS := libfontcharacter
# Compilation time libs
LIBS := zlib $(RLIBS)
#******************************************************************************#
# Binary utilities #

View File

@ -18,6 +18,8 @@ incdir=''
#******************************************************************************#
for arg ; do case "$arg" in
--name=*) name="${arg#*=}" ;;
--target=*) target="${arg#*=}" ;;
--runlibs=*) runlibs="${arg#*=}" ;;
--version=*) version="${arg#*=}" ;;
--maintainer=*) maintainer="${arg#*=}" ;;
--libdir=*) libdir="${arg#*=}" ;;
@ -74,8 +76,14 @@ for arg ; do case "\$arg" in
esac; done
# Put
[ \$put_cflags ] && echo "-I$incdir"
[ \$put_libs ] && echo "-L$libdir -l$name"
if [ \$put_cflags ]; then
echo "-I$incdir"
for rdep in ${runlibs}; do ${target}\${rdep}-config --cflags; done
fi
if [ \$put_libs ]; then
echo "-L$libdir -l$name"
for rdep in ${runlibs}; do ${target}\${rdep}-config --libs; done
fi
[ \$put_cflags\$put_libs ] || usage
# End of file

View File

@ -18,6 +18,7 @@ for arg ; do case "$arg" in
--name=*) name="${arg#*=}" ;;
--description=*) description="${arg#*=}" ;;
--version=*) version="${arg#*=}" ;;
--runlibs=*) runlibs="${arg#*=}" ;;
--libdir=*) libdir="${arg#*=}" ;;
--incdir=*) incdir="${arg#*=}" ;;
esac; done
@ -32,6 +33,7 @@ libdir=$libdir
Name: lib$name
Description: $description
Version: $version
Requires: $runlibs
Libs: -L\${libdir} -l$name
Cflags: -I\${includedir}
EOF