#!/bin/sh

prefix="/usr"
exec_prefix="${prefix}"
VERSION="1.7.0"
CFLAGS="-Wunused-function -Wstrict-prototypes -Wwrite-strings -W -Wall -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4"
CPPFLAGS="-D_FORTIFY_SOURCE=2  "
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro  "
LIBS="  -lcrypto"
LIBDIR="${exec_prefix}/lib"
INCLUDEDIR="${prefix}/include"
LIBVERSION="2:0:0"

for arg in $@
do
    if [ $arg = "--cflags" ]
    then
        echo "-I${INCLUDEDIR}"
    fi
    if [ $arg = "--libs" ]
    then
        echo "${LDFLAGS} -L${LIBDIR} ${LIBS} -lldns"
    fi
    if [ $arg = "-h" ] || [ $arg = "--help" ]
    then
        echo "Usage: $0 [--cflags] [--libs] [--version]"
    fi
    if [ $arg = "--version" ]
    then
        echo "${VERSION}"
    fi
    if [ $arg = "--libversion" ]
    then
        echo "${LIBVERSION}"
    fi
done
