3 include $(top_srcdir)/Makefile.am.common
5 ACLOCAL_AMFLAGS = -I ../../cf
7 CLEANFILES = roken.h make-roken.c $(XHEADERS)
9 lib_LTLIBRARIES = libroken.la
11 libroken_la_LDFLAGS = -version-info 19:0:1
12 libroken_la_CPPFLAGS = -DBUILD_ROKEN_LIB
15 libroken_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
18 AM_CPPFLAGS += $(libroken_la_CPPFLAGS)
20 AM_CPPFLAGS += -I$(DBHEADER)
23 noinst_PROGRAMS = snprintf-test resolve-test rkpty
38 TESTS = $(check_PROGRAMS)
43 noinst_LTLIBRARIES = libtest.la
44 libtest_la_SOURCES = strftime.c strptime.c snprintf.c tsearch.c
45 libtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME
47 parse_reply_test_SOURCES = parse_reply-test.c resolve.c
48 parse_reply_test_CFLAGS = -DTEST_RESOLVE
50 test_readenv_SOURCES = test-readenv.c test-mem.c
52 rkpty_LDADD = $(LIB_openpty) $(LDADD)
54 parse_time_test_SOURCES = parse_time-test.c test-mem.c
56 strpftime_test_SOURCES = strpftime-test.c strpftime-test.h
57 strpftime_test_LDADD = libtest.la $(LDADD)
58 strpftime_test_CFLAGS = -DTEST_STRPFTIME
59 snprintf_test_SOURCES = snprintf-test.c
60 snprintf_test_LDADD = libtest.la $(LDADD)
61 snprintf_test_CFLAGS = -DTEST_SNPRINTF
62 tsearch_test_SOURCES = tsearch-test.c
63 tsearch_test_LDADD = libtest.la $(LDADD)
64 tsearch_test_CFLAGS = -DTEST_TSEARCH
66 resolve_test_SOURCES = resolve-test.c
68 libroken_la_SOURCES = \
80 getaddrinfo_hostspec.c \
81 get_default_username.c \
84 getnameinfo_verified.c \
123 EXTRA_libroken_la_SOURCES = \
131 libroken_la_LIBADD = @LTLIBOBJS@ $(LIB_crypt)
133 $(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS)
135 BUILT_SOURCES = roken.h
146 fnmatch_h = fnmatch.h
158 ifaddrs_h = ifaddrs.h
173 ## these are controlled by configure
174 XHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(search_h) $(vis_h)
175 CLEANFILES += err.h fnmatch.h glob.h ifaddrs.h search.h vis.h
177 dist_include_HEADERS = \
189 if have_socket_wrapper
190 libroken_la_SOURCES += socket_wrapper.c socket_wrapper.h
191 dist_include_HEADERS += socket_wrapper.h
194 build_HEADERZ = test-mem.h $(XHEADERS)
196 nodist_include_HEADERS = roken.h
197 rokenincludedir = $(includedir)/roken
198 nodist_rokeninclude_HEADERS = $(XHEADERS)
200 man_MANS = getarg.3 parse_time.3 rtbl.3 ecalloc.3
206 # Make make-roken deprecated in 1.4 when we know that roken-h-process.pl works
209 noinst_PROGRAMS += make-roken
210 BUILT_SOURCES += make-roken.c
212 nodist_make_roken_SOURCES = make-roken.c
214 roken.h: make-roken$(EXEEXT)
215 @./make-roken$(EXEEXT) > tmp.h ;\
216 if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
217 else rm -f roken.h; mv tmp.h roken.h; fi
219 make-roken.c: roken.h.in roken.awk
220 $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
224 roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in
225 perl $(top_srcdir)/cf/roken-h-process.pl \
226 -c $(top_builddir)/include/config.h \
227 -p $(srcdir)/roken.h.in -o roken.h
234 roken.awk roken.h.in \