From f58400c634eea6f865db8486e7e174f67bb555ce Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Thu, 11 May 2023 17:25:52 +0200 Subject: Change the way how to build this library --- build-pc.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 build-pc.sh (limited to 'build-pc.sh') diff --git a/build-pc.sh b/build-pc.sh new file mode 100755 index 0000000..eb7dca8 --- /dev/null +++ b/build-pc.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +# See LICENSE file for copyright and license details. + +VERSION=0.0.1 + +while [ $# -gt 0 ] +do + case $1 in + -p|--prefix) + shift + PREFIX=$1 + ;; + -n|--name) + shift + NAME=$1 + ;; + -ln|--lib-name) + shift + LIBNAME=$1 + ;; + -d|--description) + shift + DESCR=$1 + ;; + -v|--version) + shift + VERSION=$1 + ;; + *) + TARGET=$1 + ;; + esac + shift +done + +if [ -z $PREFIX ]; then + echo 'prefix must be set' + exit 1 +elif [ -z $NAME ]; then + echo 'name must be set' + exit 1 +fi + +cat < $TARGET +prefix=$PREFIX +exec_prefix=\${prefix} +includedir=\${prefix}/include +libdir=\${exec_prefix}/lib + +Name: $NAME +Description: $LIBNAME - $DESCR +Version: $VERSION +Cflags: -I\${includedir} +Libs: -L\${libdir} -l$NAME +EOF -- cgit v1.2.3