summaryrefslogtreecommitdiffstats
path: root/lib/Makefile.am
blob: 35663b19eb9608cb96aa3a1c437fdadb3a6263f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
## Process this file with automake to produce Makefile.in

noinst_LIBRARIES = libcoreutils.a libnagiosplug.a

# Will auto pick up fsusage.c mountlist.c
libcoreutils_a_SOURCES = \
  cloexec.c cloexec.h \
  exit.h \
  full-read.c full-read.h \
  full-write.c full-write.h \
  gettext.h \
  safe-read.c safe-read.h \
  safe-write.c safe-write.h strcase.h xalloc-die.c

# intprops.h required for getloadavg.c
other_coreutils_files = \
  error.c error.h \
  fsusage.c \
  getloadavg.c \
  intprops.h \
  malloc.c \
  mountlist.c \
  realloc.c \
  strtod.c \
  exitfail.c exitfail.h \
  fsusage.h \
  getopt.c getopt1.c \
  mountlist.h \
  unlocked-io.h \
  xalloc.h \
  xmalloc.c


libcoreutils_a_LIBADD = $(LIBOBJS)
libcoreutils_a_DEPENDENCIES = $(libcoreutils_a_LIBADD)

libnagiosplug_a_SOURCES = snprintf.c

INCLUDES = -I$(srcdir) -I$(top_srcdir)/intl

print_coreutil_files:
	@echo $(libcoreutils_a_SOURCES) $(other_coreutils_files) $(EXTRA_DIST)

# Below are from coreutil's lib/Makefile.am
BUILT_SOURCES = $(STDBOOL_H)
EXTRA_DIST = stdbool_.h
MOSTLYCLEANFILES = stdbool.h stdbool.ht
# Create stdbool.h on systems that lack a working one.
stdbool.h: stdbool_.h
	sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' $(srcdir)/stdbool_.h > $@t
	mv $@t $@

BUILT_SOURCES += $(GETOPT_H)
EXTRA_DIST += getopt_.h getopt_int.h

# We need the following in order to create an <getopt.h> when the system
# doesn't have one that works with the given compiler.
all-local $(lib_OBJECTS): $(GETOPT_H)
getopt.h: getopt_.h
	cp $(srcdir)/getopt_.h $@-t 
	mv $@-t $@ 
MOSTLYCLEANFILES += getopt.h getopt.h-t