Makefile.am 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ## Process this file with automake to produce Makefile.in
  2. SUBDIRS = tests
  3. noinst_LIBRARIES = libcoreutils.a libnagiosplug.a
  4. # Will auto pick up fsusage.c mountlist.c
  5. libcoreutils_a_SOURCES = \
  6. cloexec.c cloexec.h \
  7. exit.h \
  8. full-read.c full-read.h \
  9. full-write.c full-write.h \
  10. gettext.h \
  11. safe-read.c safe-read.h \
  12. safe-write.c safe-write.h strcase.h xalloc-die.c
  13. # intprops.h required for getloadavg.c
  14. # This needs to be an EXTRA_DIST because the m4s
  15. # that have AC_LIBSOURCES for intprops.h are not necessary and
  16. # the getloadavg m4 is an autoconf one, so doesn't
  17. # know about intprops.h. Confused? You will be!
  18. EXTRA_DIST = intprops.h
  19. other_coreutils_files = \
  20. error.c error.h \
  21. fsusage.c \
  22. getloadavg.c \
  23. malloc.c \
  24. mountlist.c \
  25. realloc.c \
  26. strtod.c \
  27. exitfail.c exitfail.h \
  28. fsusage.h \
  29. getopt.c getopt1.c \
  30. mountlist.h \
  31. unlocked-io.h \
  32. xalloc.h \
  33. xmalloc.c
  34. libcoreutils_a_LIBADD = $(LIBOBJS)
  35. libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD)
  36. libnagiosplug_a_SOURCES = snprintf.c utils_base.c utils_disk.c
  37. INCLUDES = -I$(srcdir) -I$(top_srcdir)/intl -I$(top_srcdir)/plugins
  38. print_coreutil_files:
  39. @echo $(libcoreutils_a_SOURCES) $(other_coreutils_files) $(EXTRA_DIST)
  40. test:
  41. cd tests && make test
  42. # Below are from coreutil's lib/Makefile.am
  43. BUILT_SOURCES = $(STDBOOL_H)
  44. EXTRA_DIST += stdbool_.h
  45. MOSTLYCLEANFILES = stdbool.h stdbool.ht
  46. # Create stdbool.h on systems that lack a working one.
  47. stdbool.h: stdbool_.h
  48. sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t
  49. mv $@t $@
  50. BUILT_SOURCES += $(GETOPT_H)
  51. EXTRA_DIST += getopt_.h getopt_int.h
  52. # We need the following in order to create an <getopt.h> when the system
  53. # doesn't have one that works with the given compiler.
  54. all-local $(lib_OBJECTS): $(GETOPT_H)
  55. getopt.h: getopt_.h
  56. cp $(srcdir)/getopt_.h $@-t
  57. mv $@-t $@
  58. MOSTLYCLEANFILES += getopt.h getopt.h-t