From f0ecdcd9c950d6996bc0544b0e825708f53c6771 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Mon, 28 May 2018 14:11:02 +0200 Subject: [PATCH] autogen.sh: produce better Makefile.am --- autogen.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/autogen.sh b/autogen.sh index 2f7d9d5..590ae14 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,11 +3,6 @@ # simple autogen script that generates basic layout for autotools. NAME="ccr" -COMMON_CPPFLAGS="-I/usr/local/include" -COMMON_CFLAGS="-Wall" -COMMON_CXXFLAGS="${COMMON_CFLAGS} -std=c++11" -COMMON_LDFLAGS="-L/usr/local/lib" -COMMON_LDADD="" OUT=Makefile.am touch NEWS AUTHORS ChangeLog @@ -21,14 +16,12 @@ echo "dist_man_MANS = man/${NAME}.1" >>$OUT echo "dist_noinst_SCRIPTS = autogen.sh" `for i in $DISTDIRS ; do find \$i -type f ; done | tr "\n" " " ` >>$OUT echo "bin_PROGRAMS = ${NAME}" >>$OUT -echo "${NAME}dir = src/" >>$OUT echo "${NAME}_SOURCES = `( find src/ -type f -name \*.c ; find src/ -type f -name \*.cpp ) |tr \"\n\" \" \" ` " >>$OUT echo "noinst_HEADERS = `find src/ -type f -name \*.h |tr \"\n\" \" \" `" >>$OUT -echo "${NAME}_CPPFLAGS = -I\$(srcdir)/$i/ ${COMMON_CPPFLAGS}" >>$OUT -echo "${NAME}_CFLAGS = ${COMMON_CFLAGS}" >>$OUT -echo "${NAME}_CXXFLAGS = ${COMMON_CXXFLAGS}" >>$OUT -echo "${NAME}_LDFLAGS = ${COMMON_LDFLAGS} \$(CRYPTOPP_CFLAGS) " >>$OUT -echo "${NAME}_LDADD = -lgmp -lfftw3 -lm \$(CRYPTOPP_LIBS) ${COMMON_LDADD} \$(EXTRA_LIBS) " >>$OUT +echo "AM_CPPFLAGS = -I\$(top_srcdir)" >>$OUT +echo "AM_CFLAGS = -Wall" >>$OUT +echo "${NAME}_CPPFLAGS = \$(FFTW3_CFLAGS) \$(CRYPTOPP_CFLAGS)" >>$OUT +echo "${NAME}_LDADD = \$(FFTW3_LIBS) \$(CRYPTOPP_LIBS)" >>$OUT if [[ "$OSTYPE" == "darwin"* ]]; then glibtoolize --force && aclocal && autoconf && automake --add-missing