Makefile.am 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. EXTRA_DIST += utils_base.h utils_disk.h
  38. INCLUDES = -I$(srcdir) -I$(top_srcdir)/intl -I$(top_srcdir)/plugins
  39. print_coreutil_files:
  40. @echo $(libcoreutils_a_SOURCES) $(other_coreutils_files) $(EXTRA_DIST)
  41. test:
  42. cd tests && make test
  43. # Below are from coreutil's lib/Makefile.am
  44. BUILT_SOURCES = $(STDBOOL_H)
  45. EXTRA_DIST += stdbool_.h
  46. MOSTLYCLEANFILES = stdbool.h stdbool.ht
  47. # Create stdbool.h on systems that lack a working one.
  48. stdbool.h: stdbool_.h
  49. sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t
  50. mv $@t $@
  51. BUILT_SOURCES += $(GETOPT_H)
  52. EXTRA_DIST += getopt_.h getopt_int.h
  53. # We need the following in order to create an <getopt.h> when the system
  54. # doesn't have one that works with the given compiler.
  55. all-local $(lib_OBJECTS): $(GETOPT_H)
  56. getopt.h: getopt_.h
  57. cp $(srcdir)/getopt_.h $@-t
  58. mv $@-t $@
  59. MOSTLYCLEANFILES += getopt.h getopt.h-t