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 noinst_PROGRAMS = snprintf-test resolve-test rkpty
34 TESTS = $(check_PROGRAMS)
39 noinst_LTLIBRARIES = libtest.la
40 libtest_la_SOURCES = strftime.c strptime.c snprintf.c
41 libtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME
43 parse_reply_test_SOURCES = parse_reply-test.c resolve.c
44 parse_reply_test_CFLAGS = -DTEST_RESOLVE
46 test_readenv_SOURCES = test-readenv.c test-mem.c
48 rkpty_LDADD = $(LIB_openpty) $(LDADD)
50 parse_time_test_SOURCES = parse_time-test.c test-mem.c
52 strpftime_test_SOURCES = strpftime-test.c strpftime-test.h
53 strpftime_test_LDADD = libtest.la $(LDADD)
54 strpftime_test_CFLAGS = -DTEST_STRPFTIME
55 snprintf_test_SOURCES = snprintf-test.c
56 snprintf_test_LDADD = libtest.la $(LDADD)
57 snprintf_test_CFLAGS = -DTEST_SNPRINTF
59 resolve_test_SOURCES = resolve-test.c
61 libroken_la_SOURCES = \
73 getaddrinfo_hostspec.c \
74 get_default_username.c \
77 getnameinfo_verified.c \
114 EXTRA_libroken_la_SOURCES = \
121 libroken_la_LIBADD = @LTLIBOBJS@ $(LIB_crypt)
123 $(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS)
125 BUILT_SOURCES = roken.h
136 fnmatch_h = fnmatch.h
148 ifaddrs_h = ifaddrs.h
157 ## these are controlled by configure
158 XHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(vis_h)
159 CLEANFILES += err.h fnmatch.h glob.h ifaddrs.h vis.h
161 dist_include_HEADERS = \
173 if have_socket_wrapper
174 libroken_la_SOURCES += socket_wrapper.c socket_wrapper.h
175 dist_include_HEADERS += socket_wrapper.h
178 build_HEADERZ = test-mem.h $(XHEADERS)
180 nodist_include_HEADERS = roken.h
181 rokenincludedir = $(includedir)/roken
182 nodist_rokeninclude_HEADERS = $(XHEADERS)
184 man_MANS = getarg.3 parse_time.3 rtbl.3 ecalloc.3
190 # Make make-roken deprecated in 1.4 when we know that roken-h-process.pl works
193 noinst_PROGRAMS += make-roken
194 BUILT_SOURCES += make-roken.c
196 nodist_make_roken_SOURCES = make-roken.c
198 roken.h: make-roken$(EXEEXT)
199 @./make-roken$(EXEEXT) > tmp.h ;\
200 if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \
201 else rm -f roken.h; mv tmp.h roken.h; fi
203 make-roken.c: roken.h.in roken.awk
204 $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c
208 roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in
209 perl $(top_srcdir)/cf/roken-h-process.pl \
210 -c $(top_builddir)/include/config.h \
211 -p $(srcdir)/roken.h.in -o roken.h
217 roken.awk roken.h.in \