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