Makefile.am.build 1022 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/usr/bin/perl
  2. print<<HEADER;
  3. ##################################################################
  4. #
  5. # uEcho for C
  6. #
  7. # Copyright (C) Satoshi Konno 2015
  8. #
  9. # This is licensed under BSD-style license, see file COPYING.
  10. #
  11. ##################################################################
  12. TESTS = uechotest
  13. check_PROGRAMS = uechotest
  14. AM_CPPFLAGS = -I\$(top_srcdir)/include -I\$(top_srcdir)/src -I../
  15. HEADER
  16. my @find_files = `find ../ -name *.h`;
  17. my @include_files;
  18. foreach $file (@find_files) {
  19. $file =~ s/\n//;
  20. $file = "\t" . $file;
  21. push @include_files, $file;
  22. }
  23. print join(" \\\n", @include_files) . "\n";
  24. print<<SOURCES;
  25. uechotest_SOURCES = \\
  26. SOURCES
  27. my @find_files = `find ../ -name *.cpp -or -name *.c`;
  28. my @source_files;
  29. foreach $file (@find_files) {
  30. $file =~ s/\n//;
  31. $file = "\t" . $file;
  32. push @source_files, $file;
  33. }
  34. print join(" \\\n", @source_files) . "\n";
  35. print<<FOTTER;
  36. #if HAVE_LIBTOOL
  37. #uechotest_LDADD = ../../lib/unix/libuecho.la
  38. #else
  39. uechotest_LDADD = ../../lib/unix/libuecho.a
  40. #endif
  41. FOTTER