1# $Id: Makefile.am,v 1.122.6.3 2003/10/14 16:13:15 joda Exp $ 2 3include $(top_srcdir)/Makefile.am.common 4 5ACLOCAL_AMFLAGS = -I ../../cf 6 7CLEANFILES = roken.h make-roken.c $(XHEADERS) 8 9lib_LTLIBRARIES = libroken.la 10libroken_la_LDFLAGS = -version-info 16:3:0 11 12noinst_PROGRAMS = make-roken snprintf-test 13 14nodist_make_roken_SOURCES = make-roken.c 15 16check_PROGRAMS = \ 17 base64-test \ 18 getaddrinfo-test \ 19 parse_bytes-test \ 20 parse_reply-test \ 21 snprintf-test \ 22 strpftime-test 23 24TESTS = $(check_PROGRAMS) 25 26LDADD = libroken.la $(LIB_crypt) 27make_roken_LDADD = 28 29noinst_LTLIBRARIES = libtest.la 30libtest_la_SOURCES = strftime.c strptime.c snprintf.c 31libtest_la_CFLAGS = -DTEST_SNPRINTF 32 33parse_reply_test_SOURCES = parse_reply-test.c resolve.c 34parse_reply_test_CFLAGS = -DTEST_RESOLVE 35 36strpftime_test_SOURCES = strpftime-test.c 37strpftime_test_LDADD = libtest.la $(LDADD) 38snprintf_test_SOURCES = snprintf-test.c 39snprintf_test_LDADD = libtest.la $(LDADD) 40snprintf_test_CFLAGS = -DTEST_SNPRINTF 41 42libroken_la_SOURCES = \ 43 base64.c \ 44 bswap.c \ 45 concat.c \ 46 environment.c \ 47 eread.c \ 48 esetenv.c \ 49 ewrite.c \ 50 getaddrinfo_hostspec.c \ 51 get_default_username.c \ 52 get_window_size.c \ 53 getarg.c \ 54 getnameinfo_verified.c \ 55 getprogname.c \ 56 h_errno.c \ 57 hostent_find_fqdn.c \ 58 issuid.c \ 59 k_getpwnam.c \ 60 k_getpwuid.c \ 61 mini_inetd.c \ 62 net_read.c \ 63 net_write.c \ 64 parse_bytes.c \ 65 parse_time.c \ 66 parse_units.c \ 67 resolve.c \ 68 roken_gethostby.c \ 69 rtbl.c \ 70 rtbl.h \ 71 setprogname.c \ 72 signal.c \ 73 simple_exec.c \ 74 snprintf.c \ 75 socket.c \ 76 strcollect.c \ 77 timeval.c \ 78 tm2time.c \ 79 unvis.c \ 80 verify.c \ 81 vis.c \ 82 vis.h \ 83 warnerr.c \ 84 write_pid.c \ 85 xdbm.h 86 87EXTRA_libroken_la_SOURCES = \ 88 err.hin \ 89 glob.hin \ 90 ifaddrs.hin \ 91 vis.hin 92 93EXTRA_DIST = roken.awk roken.h.in 94 95libroken_la_LIBADD = @LTLIBOBJS@ $(DBLIB) 96 97$(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS) 98 99BUILT_SOURCES = make-roken.c roken.h 100 101if have_err_h 102err_h = 103else 104err_h = err.h 105endif 106 107if have_fnmatch_h 108fnmatch_h = 109else 110fnmatch_h = fnmatch.h 111endif 112 113if have_glob_h 114glob_h = 115else 116glob_h = glob.h 117endif 118 119if have_ifaddrs_h 120ifaddrs_h = 121else 122ifaddrs_h = ifaddrs.h 123endif 124 125if have_vis_h 126vis_h = 127else 128vis_h = vis.h 129endif 130 131## these are controlled by configure 132XHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(vis_h) 133 134include_HEADERS = \ 135 base64.h \ 136 getarg.h \ 137 parse_bytes.h \ 138 parse_time.h \ 139 parse_units.h \ 140 resolve.h \ 141 roken-common.h \ 142 rtbl.h \ 143 xdbm.h \ 144 $(XHEADERS) 145 146nodist_include_HEADERS = roken.h 147 148man_MANS = getarg.3 149 150SUFFIXES += .hin 151.hin.h: 152 cp $< $@ 153 154roken.h: make-roken$(EXEEXT) 155 @./make-roken$(EXEEXT) > tmp.h ;\ 156 if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \ 157 else rm -f roken.h; mv tmp.h roken.h; fi 158 159make-roken.c: roken.h.in roken.awk 160 $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c 161