1 AUTOMAKE_OPTIONS= ../util/ansi2knr
3 bindir= ${exec_prefix}/${BINSUBDIR}
5 EXTRA_PROGRAMS= ntpdc-layout
6 EXTRA_DATA= check-layout
7 BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
8 AM_CPPFLAGS= -I$(top_srcdir)/include $(LIBOPTS_CFLAGS)
9 # LDADD might need RESLIB and ADJLIB
10 ntpdc_LDADD= version.o @READLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
11 # ntpdc-layout doesn't need any additional libraries at all
13 DISTCLEANFILES= .version version.c
14 CLEANFILES= check-layout layout.here nl.c ntpdc-layout
15 noinst_HEADERS= ntpdc.h
16 ETAGS_ARGS= Makefile.am
17 EXTRA_DIST= nl_in.c nl.pl layout.std \
18 ntpdc-opts.def ntpdc.1 ntpdc-opts.texi ntpdc-opts.menu
19 BUILT_SOURCES+= ntpdc-opts.c ntpdc-opts.h ntpdc.1 ntpdc-opts.texi \
22 run_ag= cd $(srcdir) && autogen -L ../include --writable
23 std_def_list= $(top_srcdir)/include/debug-opt.def \
24 $(top_srcdir)/include/autogen-version.def \
25 $(top_srcdir)/include/copyright.def \
26 $(top_srcdir)/include/homerc.def \
27 $(top_srcdir)/include/version.def
29 $(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
30 $(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
31 $(run_ag) ntpdc-opts.def
33 $(srcdir)/ntpdc.1: $(srcdir)/ntpdc-opts.def $(std_def_list)
34 $(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def
36 $(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu: $(srcdir)/ntpdc-opts.def $(std_def_list)
37 $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def
39 ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
43 layout.here: ntpdc-layout
46 check-layout: ntpdc-layout layout.std layout.here
47 cmp $(srcdir)/layout.std layout.here && echo stamp > $@
52 cd ../libntp && $(MAKE)
54 $(top_srcdir)/version :
55 cd $(top_srcdir) && $(MAKE) version
57 version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
58 env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdc
59 $(COMPILE) -c version.c
61 # I ran nl_in.c (attached, to be installed into ntpdc) through
62 # $(CC) -E nl_in.c | nl.pl > nl.c
63 nl.c: nl_in.c nl.pl Makefile.am
64 $(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
66 include ../bincheck.mf