6 AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
7 -I$(top_srcdir)/lib/isc/nothreads/include \
8 -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
10 # LDADD might need RESLIB and ADJLIB
11 ntpq_LDADD= version.o @LCRYPTO@ @EDITLINE_LIBS@ $(LIBOPTS_LDADD) \
13 noinst_HEADERS= ntpq.h
14 noinst_LIBRARIES= libntpq.a
15 # HMS: I don't think we need libntpq_a_LIBADD...
16 #libntpq_a_LIBADD= version.o @EDITLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
17 libntpq_a_CFLAGS= -DNO_MAIN_ALLOWED -DBUILD_AS_LIB
19 DISTCLEANFILES= .version version.c
20 ETAGS_ARGS= Makefile.am
21 EXTRA_DIST= ntpq-opts.def ntpq.1 ntpq-opts.texi ntpq-opts.menu
22 BUILT_SOURCES= ntpq-opts.c ntpq-opts.h ntpq.1 ntpq-opts.texi ntpq-opts.menu
24 run_ag= cd $(srcdir) && \
25 env PATH="$(abs_builddir):$(PATH)" \
26 autogen -L ../include --writable
27 std_def_list= $(top_srcdir)/include/debug-opt.def \
28 $(top_srcdir)/include/autogen-version.def \
29 $(top_srcdir)/include/copyright.def \
30 $(top_srcdir)/include/homerc.def \
31 $(top_srcdir)/include/version.def
32 ntpq_SOURCES= ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
34 libntpq_a_SOURCES = libntpq.c libntpq.h libntpq_subs.c
36 $(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
37 @: do-nothing action to avoid default SCCS get, .h built with .c
39 $(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
40 $(run_ag) ntpq-opts.def
42 $(srcdir)/ntpq.1: $(srcdir)/ntpq-opts.def $(std_def_list)
43 $(run_ag) -Tagman1.tpl -bntpq ntpq-opts.def
45 $(srcdir)/ntpq-opts.texi $(srcdir)/ntpq-opts.menu: $(srcdir)/ntpq-opts.def $(std_def_list)
46 $(MAKE) ntpq # aginfo.tpl runs the binary to extract --help usage text
47 $(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def
52 cd ../libntp && $(MAKE)
54 $(top_srcdir)/version :
55 cd $(top_srcdir) && $(MAKE) version
57 version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
58 env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpq
59 $(COMPILE) -c version.c
61 include $(top_srcdir)/bincheck.mf
62 include $(top_srcdir)/depsver.mf