Makefile.am revision 233294
1139749Simp# $Id$ 2131276Snjl 3131276Snjlinclude $(top_srcdir)/Makefile.am.common 4131276Snjl 5131276SnjlACLOCAL_AMFLAGS = -I ../../cf 6131276Snjl 7131276SnjlCLEANFILES = roken.h make-roken.c $(XHEADERS) 8131276Snjl 9131276Snjllib_LTLIBRARIES = libroken.la 10131276Snjl 11131276Snjllibroken_la_LDFLAGS = -version-info 19:0:1 12131276Snjllibroken_la_CPPFLAGS = -DBUILD_ROKEN_LIB 13131276Snjl 14131276Snjlif versionscript 15131276Snjllibroken_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map 16131276Snjlendif 17131276Snjl 18131276SnjlAM_CPPFLAGS += $(libroken_la_CPPFLAGS) 19131276Snjlif HAVE_DBHEADER 20131276SnjlAM_CPPFLAGS += -I$(DBHEADER) 21131276Snjlendif 22131276Snjl 23131276Snjlnoinst_PROGRAMS = snprintf-test resolve-test rkpty 24131276Snjl 25131276Snjlcheck_PROGRAMS = \ 26131276Snjl base64-test \ 27131276Snjl getaddrinfo-test \ 28131276Snjl getifaddrs-test \ 29131276Snjl hex-test \ 30131276Snjl test-readenv \ 31131276Snjl parse_bytes-test \ 32131276Snjl parse_reply-test \ 33131276Snjl parse_time-test \ 34131276Snjl snprintf-test \ 35131276Snjl strpftime-test \ 36132212Snjl tsearch-test 37131276Snjl 38132212SnjlTESTS = $(check_PROGRAMS) 39132212Snjl 40132212SnjlLDADD = libroken.la 41132212Snjlmake_roken_LDADD = 42132212Snjl 43132212Snjlnoinst_LTLIBRARIES = libtest.la 44132212Snjllibtest_la_SOURCES = strftime.c strptime.c snprintf.c tsearch.c 45132212Snjllibtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME 46132212Snjl 47132212Snjlparse_reply_test_SOURCES = parse_reply-test.c resolve.c 48132212Snjlparse_reply_test_CFLAGS = -DTEST_RESOLVE 49132212Snjl 50132212Snjltest_readenv_SOURCES = test-readenv.c test-mem.c 51132212Snjl 52132212Snjlrkpty_LDADD = $(LIB_openpty) $(LDADD) 53132212Snjl 54132212Snjlparse_time_test_SOURCES = parse_time-test.c test-mem.c 55132212Snjl 56132212Snjlstrpftime_test_SOURCES = strpftime-test.c strpftime-test.h 57132212Snjlstrpftime_test_LDADD = libtest.la $(LDADD) 58132212Snjlstrpftime_test_CFLAGS = -DTEST_STRPFTIME 59131276Snjlsnprintf_test_SOURCES = snprintf-test.c 60131276Snjlsnprintf_test_LDADD = libtest.la $(LDADD) 61131276Snjlsnprintf_test_CFLAGS = -DTEST_SNPRINTF 62131276Snjltsearch_test_SOURCES = tsearch-test.c 63131276Snjltsearch_test_LDADD = libtest.la $(LDADD) 64131276Snjltsearch_test_CFLAGS = -DTEST_TSEARCH 65131276Snjl 66131276Snjlresolve_test_SOURCES = resolve-test.c 67131276Snjl 68132212Snjllibroken_la_SOURCES = \ 69132212Snjl base64.c \ 70131276Snjl bswap.c \ 71132212Snjl concat.c \ 72132212Snjl cloexec.c \ 73132212Snjl ct.c \ 74132212Snjl doxygen.c \ 75132212Snjl dumpdata.c \ 76132212Snjl environment.c \ 77132212Snjl eread.c \ 78132212Snjl esetenv.c \ 79131276Snjl ewrite.c \ 80131276Snjl getaddrinfo_hostspec.c \ 81131276Snjl get_default_username.c \ 82131276Snjl get_window_size.c \ 83131276Snjl getarg.c \ 84131276Snjl getnameinfo_verified.c \ 85131276Snjl getprogname.c \ 86132212Snjl h_errno.c \ 87131276Snjl hex.c \ 88132212Snjl hostent_find_fqdn.c \ 89132212Snjl issuid.c \ 90132212Snjl k_getpwnam.c \ 91132212Snjl k_getpwuid.c \ 92132212Snjl mini_inetd.c \ 93132212Snjl net_read.c \ 94132212Snjl net_write.c \ 95132212Snjl parse_bytes.c \ 96132212Snjl parse_time.c \ 97132212Snjl parse_units.c \ 98132212Snjl qsort.c \ 99132212Snjl rand.c \ 100132212Snjl realloc.c \ 101132212Snjl resolve.c \ 102132212Snjl roken_gethostby.c \ 103131276Snjl rtbl.c \ 104131276Snjl rtbl.h \ 105131276Snjl setprogname.c \ 106131276Snjl signal.c \ 107131276Snjl simple_exec.c \ 108131276Snjl snprintf.c \ 109131276Snjl socket.c \ 110131276Snjl strcollect.c \ 111131276Snjl strerror_r.c \ 112138305Snjl strpool.c \ 113138305Snjl timeval.c \ 114138305Snjl tm2time.c \ 115138305Snjl unvis.c \ 116138305Snjl verify.c \ 117138305Snjl vis.c \ 118138305Snjl warnerr.c \ 119138305Snjl write_pid.c \ 120138305Snjl xfree.c \ 121138305Snjl xdbm.h 122138305Snjl 123138305SnjlEXTRA_libroken_la_SOURCES = \ 124138305Snjl err.hin \ 125138305Snjl glob.hin \ 126138305Snjl fnmatch.hin \ 127138305Snjl ifaddrs.hin \ 128138305Snjl search.hin \ 129138305Snjl vis.hin 130138305Snjl 131138305Snjllibroken_la_LIBADD = @LTLIBOBJS@ $(LIB_crypt) 132132212Snjl 133132212Snjl$(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS) 134132212Snjl 135131276SnjlBUILT_SOURCES = roken.h 136132212Snjl 137132212Snjlif have_err_h 138132212Snjlerr_h = 139132212Snjlelse 140132212Snjlerr_h = err.h 141132212Snjlendif 142132212Snjl 143132212Snjlif have_fnmatch_h 144132212Snjlfnmatch_h = 145132212Snjlelse 146132212Snjlfnmatch_h = fnmatch.h 147132212Snjlendif 148132212Snjl 149132212Snjlif have_glob_h 150132212Snjlglob_h = 151131276Snjlelse 152131276Snjlglob_h = glob.h 153132212Snjlendif 154132212Snjl 155132212Snjlif have_ifaddrs_h 156131276Snjlifaddrs_h = 157143861Snjlelse 158143861Snjlifaddrs_h = ifaddrs.h 159144629Snjlendif 160144629Snjl 161144629Snjlif have_search_h 162144629Snjlsearch_h = 163144629Snjlelse 164144629Snjlsearch_h = search.h 165144629Snjlendif 166144629Snjl 167144629Snjlif have_vis_h 168144629Snjlvis_h = 169144629Snjlelse 170144629Snjlvis_h = vis.h 171144629Snjlendif 172143861Snjl 173143861Snjl## these are controlled by configure 174143861SnjlXHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(search_h) $(vis_h) 175143861SnjlCLEANFILES += err.h fnmatch.h glob.h ifaddrs.h search.h vis.h 176143861Snjl 177143861Snjldist_include_HEADERS = \ 178143861Snjl base64.h \ 179143861Snjl getarg.h \ 180143861Snjl hex.h \ 181143861Snjl parse_bytes.h \ 182143861Snjl parse_time.h \ 183143861Snjl parse_units.h \ 184143861Snjl resolve.h \ 185143861Snjl roken-common.h \ 186143861Snjl rtbl.h \ 187143861Snjl xdbm.h 188143861Snjl 189143861Snjlif have_socket_wrapper 190143861Snjllibroken_la_SOURCES += socket_wrapper.c socket_wrapper.h 191143861Snjldist_include_HEADERS += socket_wrapper.h 192143861Snjlendif 193143861Snjl 194143861Snjlbuild_HEADERZ = test-mem.h $(XHEADERS) 195143861Snjl 196143861Snjlnodist_include_HEADERS = roken.h 197143861Snjlrokenincludedir = $(includedir)/roken 198143861Snjlnodist_rokeninclude_HEADERS = $(XHEADERS) 199143861Snjl 200man_MANS = getarg.3 parse_time.3 rtbl.3 ecalloc.3 201 202SUFFIXES += .hin 203.hin.h: 204 cp $< $@ 205 206# Make make-roken deprecated in 1.4 when we know that roken-h-process.pl works 207if !CROSS_COMPILE 208 209noinst_PROGRAMS += make-roken 210BUILT_SOURCES += make-roken.c 211 212nodist_make_roken_SOURCES = make-roken.c 213 214roken.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 218 219make-roken.c: roken.h.in roken.awk 220 $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c 221 222else 223 224roken.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 228 229endif 230 231 232EXTRA_DIST = \ 233 NTMakefile \ 234 roken.awk roken.h.in \ 235 $(man_MANS) \ 236 test-mem.h \ 237 ndbm_wrap.c \ 238 ndbm_wrap.h \ 239 version-script.map 240