Makefile.am 2.3 KB

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