4 bindir= ${exec_prefix}/${BINSUBDIR}
6 EXTRA_PROGRAMS= ntpdc-layout
7 EXTRA_DATA= check-layout
8 BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
9 AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
10 -I$(top_srcdir)/lib/isc/nothreads/include \
11 -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
12 # LDADD might need RESLIB and ADJLIB
13 ntpdc_LDADD= version.o @LCRYPTO@ @EDITLINE_LIBS@ $(LIBOPTS_LDADD) \
15 # ntpdc-layout doesn't need any additional libraries at all
17 DISTCLEANFILES= .version version.c
18 CLEANFILES= check-layout layout.here nl.c ntpdc-layout
19 noinst_HEADERS= ntpdc.h
20 ETAGS_ARGS= Makefile.am
21 EXTRA_DIST= nl_in.c nl.pl layout.std \
22 ntpdc-opts.def ntpdc.1 ntpdc-opts.texi ntpdc-opts.menu
23 BUILT_SOURCES+= ntpdc-opts.c ntpdc-opts.h ntpdc.1 ntpdc-opts.texi \
26 run_ag= cd $(srcdir) && \
27 env PATH="$(abs_builddir):$(PATH)" \
28 autogen -L ../include --writable
29 std_def_list= $(top_srcdir)/include/debug-opt.def \
30 $(top_srcdir)/include/autogen-version.def \
31 $(top_srcdir)/include/copyright.def \
32 $(top_srcdir)/include/homerc.def \
33 $(top_srcdir)/include/version.def
35 $(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
36 @: do-nothing action to avoid default SCCS get, .h built with .c
38 $(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
39 $(run_ag) ntpdc-opts.def
41 $(srcdir)/ntpdc.1: $(srcdir)/ntpdc-opts.def $(std_def_list)
42 $(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def
44 $(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu: $(srcdir)/ntpdc-opts.def $(std_def_list)
45 $(MAKE) ntpdc # aginfo.tpl runs the binary to extract --help usage text
46 $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def
48 ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
52 layout.here: ntpdc-layout
55 check-layout: ntpdc-layout $(srcdir)/layout.std layout.here
56 cmp $(srcdir)/layout.std layout.here && echo stamp > $@
61 cd ../libntp && $(MAKE)
63 $(top_srcdir)/version :
64 cd $(top_srcdir) && $(MAKE) version
66 version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
67 env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdc
68 $(COMPILE) -c version.c
70 # I ran nl_in.c (attached, to be installed into ntpdc) through
71 # $(CC) -E nl_in.c | nl.pl > nl.c
72 nl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h
73 $(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
75 include $(top_srcdir)/bincheck.mf
76 include $(top_srcdir)/depsver.mf