Code

80455690d1180d974b6866c08424eadd5280d86f
[nagiosplug.git] / lib / Makefile.am
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
45 EXTRA_DIST += utils_base.h utils_disk.h
47 INCLUDES = -I$(srcdir) -I$(top_srcdir)/intl -I$(top_srcdir)/plugins
49 print_coreutil_files:
50         @echo $(libcoreutils_a_SOURCES) $(other_coreutils_files) $(EXTRA_DIST)
52 test:
53         cd tests && make test
55 # Below are from coreutil's lib/Makefile.am
56 BUILT_SOURCES = $(STDBOOL_H)
57 EXTRA_DIST += stdbool_.h
58 MOSTLYCLEANFILES = stdbool.h stdbool.ht
59 # Create stdbool.h on systems that lack a working one.
60 stdbool.h: stdbool_.h
61         sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t
62         mv $@t $@
64 BUILT_SOURCES += $(GETOPT_H)
65 EXTRA_DIST += getopt_.h getopt_int.h
67 # We need the following in order to create an <getopt.h> when the system
68 # doesn't have one that works with the given compiler.
69 all-local $(lib_OBJECTS): $(GETOPT_H)
70 getopt.h: getopt_.h
71         cp $(srcdir)/getopt_.h $@-t 
72         mv $@-t $@ 
73 MOSTLYCLEANFILES += getopt.h getopt.h-t