2016-12-20 21:59:26 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#******************************************************************************#
|
|
|
|
# Defaults #
|
|
|
|
#******************************************************************************#
|
|
|
|
# Project variables
|
2017-01-27 21:49:04 +01:00
|
|
|
name="name"
|
2016-12-20 21:59:26 +01:00
|
|
|
description="my description"
|
|
|
|
version="<unknown version>"
|
|
|
|
|
|
|
|
# Directories
|
|
|
|
libdir=''
|
|
|
|
incdir=''
|
|
|
|
|
|
|
|
#******************************************************************************#
|
|
|
|
# Read arguments #
|
|
|
|
#******************************************************************************#
|
|
|
|
for arg ; do case "$arg" in
|
|
|
|
--name=*) name="${arg#*=}" ;;
|
|
|
|
--description=*) description="${arg#*=}" ;;
|
|
|
|
--version=*) version="${arg#*=}" ;;
|
2017-03-01 12:36:32 +01:00
|
|
|
--deps=*) deps="${arg#*=}" ;;
|
|
|
|
--deps.private=*) privdeps="${arg#*=}" ;;
|
2016-12-20 21:59:26 +01:00
|
|
|
--libdir=*) libdir="${arg#*=}" ;;
|
|
|
|
--incdir=*) incdir="${arg#*=}" ;;
|
|
|
|
esac; done
|
|
|
|
#******************************************************************************#
|
|
|
|
# Write result #
|
|
|
|
#******************************************************************************#
|
|
|
|
cat <<EOF
|
|
|
|
includedir=$incdir
|
|
|
|
libdir=$libdir
|
|
|
|
|
|
|
|
Name: lib$name
|
|
|
|
Description: $description
|
|
|
|
Version: $version
|
2017-03-01 12:36:32 +01:00
|
|
|
Requires: $deps
|
|
|
|
Requires.private: $privdeps
|
2016-12-20 22:28:54 +01:00
|
|
|
Libs: -L\${libdir} -l$name
|
2017-03-01 12:36:32 +01:00
|
|
|
Libs.private: -lm
|
2016-12-20 22:28:54 +01:00
|
|
|
Cflags: -I\${includedir}
|
2016-12-20 21:59:26 +01:00
|
|
|
EOF
|