Post-quantum cryptography tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.0KB

  1. #!/bin/bash
  2. # simple autogen script that generates basic layout for autotools.
  3. NAME="ccr"
  4. OUT=Makefile.am
  5. touch NEWS AUTHORS ChangeLog
  6. echo > $OUT
  7. DISTDIRS=""
  8. echo "AUTOMAKE_OPTIONS = subdir-objects" >>$OUT
  9. echo "ACLOCAL_AMFLAGS = -I m4" >>$OUT
  10. echo "dist_man_MANS = man/${NAME}.1" >>$OUT
  11. echo "dist_noinst_SCRIPTS = autogen.sh" `for i in $DISTDIRS ; do find \$i -type f ; done | tr "\n" " " ` >>$OUT
  12. echo "bin_PROGRAMS = ${NAME}" >>$OUT
  13. echo "${NAME}_SOURCES = `( find src/ -type f -name \*.c ; find src/ -type f -name \*.cpp ) |tr \"\n\" \" \" ` " >>$OUT
  14. echo "noinst_HEADERS = `find src/ -type f -name \*.h |tr \"\n\" \" \" `" >>$OUT
  15. echo "AM_CPPFLAGS = -I\$(top_srcdir)" >>$OUT
  16. echo "AM_CFLAGS = -Wall" >>$OUT
  17. echo "${NAME}_CPPFLAGS = \$(FFTW3_CFLAGS) \$(CRYPTOPP_CFLAGS)" >>$OUT
  18. echo "${NAME}_LDADD = \$(FFTW3_LIBS) \$(CRYPTOPP_LIBS)" >>$OUT
  19. if [[ "$OSTYPE" == "darwin"* ]]; then
  20. glibtoolize --force && aclocal && autoconf && automake --add-missing
  21. else
  22. libtoolize --force && aclocal && autoconf && automake --add-missing
  23. fi