1 AUTOMAKE_OPTIONS= ../util/ansi2knr
4 AM_CPPFLAGS= -I$(top_srcdir)/include $(LIBOPTS_CFLAGS)
6 # LDADD might need RESLIB and ADJLIB
7 ntpq_LDADD= version.o @READLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
8 DISTCLEANFILES= .version version.c
10 ETAGS_ARGS= Makefile.am
11 EXTRA_DIST= ntpq-opts.def ntpq.1 ntpq-opts.texi ntpq-opts.menu
12 BUILT_SOURCES= ntpq-opts.c ntpq-opts.h ntpq.1 ntpq-opts.texi ntpq-opts.menu
14 run_ag= cd $(srcdir) && autogen -L ../include --writable
15 std_def_list= $(top_srcdir)/include/debug-opt.def \
16 $(top_srcdir)/include/autogen-version.def \
17 $(top_srcdir)/include/copyright.def \
18 $(top_srcdir)/include/homerc.def \
19 $(top_srcdir)/include/version.def
20 ntpq_SOURCES= ntpq.c ntpq-subs.c ntpq-opts.c ntpq-opts.h
22 $(srcdir)/ntpq-opts.h: $(srcdir)/ntpq-opts.c
23 $(srcdir)/ntpq-opts.c: $(srcdir)/ntpq-opts.def $(std_def_list)
24 $(run_ag) ntpq-opts.def
26 $(srcdir)/ntpq.1: $(srcdir)/ntpq-opts.def $(std_def_list)
27 $(run_ag) -Tagman1.tpl -bntpq ntpq-opts.def
29 $(srcdir)/ntpq-opts.texi $(srcdir)/ntpq-opts.menu: $(srcdir)/ntpq-opts.def $(std_def_list)
30 $(run_ag) -Taginfo.tpl -DLEVEL=section ntpq-opts.def
35 cd ../libntp && $(MAKE)
37 $(top_srcdir)/version :
38 cd $(top_srcdir) && $(MAKE) version
40 version.o: $(ntpq_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
41 env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpq
42 $(COMPILE) -c version.c