12b15cb3dSCy SchubertNULL= 2ea906c41SOllivier Robert 32b15cb3dSCy Schubertbin_PROGRAMS= $(NTPDC_DB) 42b15cb3dSCy Schubertlibexec_PROGRAMS= $(NTPDC_DL) 52b15cb3dSCy Schubertsbin_PROGRAMS= $(NTPDC_DS) 62b15cb3dSCy Schubert 72b15cb3dSCy SchubertEXTRA_PROGRAMS= ntpdc ntpdc-layout 89c2daa00SOllivier RobertEXTRA_DATA= check-layout 92b15cb3dSCy SchubertBUILT_SOURCES= @MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h 102b15cb3dSCy Schubert 112b15cb3dSCy SchubertAM_CFLAGS = $(CFLAGS_NTP) 12f0574f5cSXin LIAM_CFLAGS += $(NTP_HARD_CFLAGS) 132b15cb3dSCy Schubert 142b15cb3dSCy SchubertAM_CPPFLAGS = $(NTP_INCS) 152b15cb3dSCy SchubertAM_CPPFLAGS += $(LIBOPTS_CFLAGS) 162b15cb3dSCy SchubertAM_CPPFLAGS += $(CPPFLAGS_NTP) 17f0574f5cSXin LIAM_CPPFLAGS += $(NTP_HARD_CPPFLAGS) 182b15cb3dSCy Schubert 192b15cb3dSCy SchubertAM_LDFLAGS = $(LDFLAGS_NTP) 20f0574f5cSXin LIAM_LDFLAGS += $(NTP_HARD_LDFLAGS) 212b15cb3dSCy Schubert 22c0b746e5SOllivier Robert# LDADD might need RESLIB and ADJLIB 23*a466cc55SCy Schubertntpdc_LDADD = $(LIBOPTS_LDADD) 242b15cb3dSCy Schubertntpdc_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) 252b15cb3dSCy Schubertntpdc_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS) 262b15cb3dSCy Schubertntpdc_LDADD += $(LDADD_NTP) 279c2daa00SOllivier Robert# ntpdc-layout doesn't need any additional libraries at all 289c2daa00SOllivier Robertntpdc_layout_LDADD= 292b15cb3dSCy Schubert 30*a466cc55SCy SchubertDISTCLEANFILES = \ 31*a466cc55SCy Schubert $(man_MANS) \ 32*a466cc55SCy Schubert config.log \ 33*a466cc55SCy Schubert $(NULL) 34*a466cc55SCy Schubert 35*a466cc55SCy SchubertCLEANFILES = \ 36*a466cc55SCy Schubert check-layout \ 37*a466cc55SCy Schubert layout.here \ 38*a466cc55SCy Schubert nl.c \ 39*a466cc55SCy Schubert ntpdc-layout \ 40*a466cc55SCy Schubert .version \ 41*a466cc55SCy Schubert version.c \ 42*a466cc55SCy Schubert $(NULL) 43*a466cc55SCy Schubert 44c0b746e5SOllivier Robertnoinst_HEADERS= ntpdc.h 45c0b746e5SOllivier RobertETAGS_ARGS= Makefile.am 462b15cb3dSCy SchubertEXTRA_DIST= \ 472b15cb3dSCy Schubert invoke-ntpdc.menu \ 482b15cb3dSCy Schubert invoke-ntpdc.texi \ 492b15cb3dSCy Schubert layout.std \ 502b15cb3dSCy Schubert nl_in.c \ 512b15cb3dSCy Schubert nl.pl \ 522b15cb3dSCy Schubert ntpdc-opts.def \ 532b15cb3dSCy Schubert ntpdc.1ntpdcman \ 542b15cb3dSCy Schubert ntpdc.1ntpdcmdoc \ 552b15cb3dSCy Schubert ntpdc.man.in \ 562b15cb3dSCy Schubert ntpdc.mdoc.in \ 572b15cb3dSCy Schubert ntpdc.html \ 582b15cb3dSCy Schubert ntpdc.texi \ 592b15cb3dSCy Schubert $(NULL) 602b15cb3dSCy Schubert 612b15cb3dSCy Schubertman1_MANS= 622b15cb3dSCy Schubertman8_MANS= 632b15cb3dSCy Schubertman_MANS= ntpdc.$(NTPDC_MS) 642b15cb3dSCy Schubert 652b15cb3dSCy Schubert## HMS: Real Soon Now... 662b15cb3dSCy Schubert##info_TEXINFOS= ntpdc.texi 672b15cb3dSCy Schubert##ntpdc_TEXINFOS= ntpdc-opts.texi 682b15cb3dSCy Schubert 692b15cb3dSCy Schuberthtml_DATA= \ 702b15cb3dSCy Schubert $(srcdir)/ntpdc.html \ 712b15cb3dSCy Schubert $(NULL) 722b15cb3dSCy Schubert 732b15cb3dSCy Schubertnoinst_DATA= \ 742b15cb3dSCy Schubert $(srcdir)/invoke-ntpdc.menu \ 752b15cb3dSCy Schubert $(srcdir)/invoke-ntpdc.texi \ 762b15cb3dSCy Schubert $(srcdir)/ntpdc.man.in \ 772b15cb3dSCy Schubert $(srcdir)/ntpdc.mdoc.in \ 782b15cb3dSCy Schubert $(NULL) 792b15cb3dSCy Schubert 802b15cb3dSCy Schubertinstall-data-local: install-html 812b15cb3dSCy Schubert 822b15cb3dSCy Schubertrun_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \ 832b15cb3dSCy Schubert autogen -L ../sntp/include -L ../sntp/ag-tpl --writable 842b15cb3dSCy Schubert 852b15cb3dSCy Schubertstd_def_list = \ 862b15cb3dSCy Schubert $(top_srcdir)/sntp/include/debug-opt.def \ 872b15cb3dSCy Schubert $(top_srcdir)/sntp/include/autogen-version.def \ 882b15cb3dSCy Schubert $(top_srcdir)/sntp/include/copyright.def \ 892b15cb3dSCy Schubert $(top_srcdir)/sntp/include/homerc.def \ 902b15cb3dSCy Schubert $(top_srcdir)/sntp/include/ntp.lic \ 912b15cb3dSCy Schubert $(top_srcdir)/sntp/include/version.def \ 922b15cb3dSCy Schubert $(NULL) 93c0b746e5SOllivier Robert 94ea906c41SOllivier Robert$(srcdir)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c 952b15cb3dSCy Schubert @: do-nothing action to avoid default SCCS get, .h built with .c 962b15cb3dSCy Schubert 97ea906c41SOllivier Robert$(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list) 98*a466cc55SCy Schubert $(AM_V_GEN)$(run_ag) ntpdc-opts.def 99c0b746e5SOllivier Robert 1002b15cb3dSCy Schubert### 101ea906c41SOllivier Robert 1022b15cb3dSCy Schubert$(srcdir)/ntpdc.1ntpdcman: $(srcdir)/ntpdc-opts.def $(std_def_list) 103*a466cc55SCy Schubert $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def 1042b15cb3dSCy Schubert 1052b15cb3dSCy Schubert$(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/mansec2subst.sed 1062b15cb3dSCy Schubert sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcman > $(srcdir)/ntpdc.man.in+ 1072b15cb3dSCy Schubert mv $(srcdir)/ntpdc.man.in+ $(srcdir)/ntpdc.man.in 1082b15cb3dSCy Schubert 1092b15cb3dSCy Schubert### 1102b15cb3dSCy Schubert 1112b15cb3dSCy Schubert$(srcdir)/ntpdc.1ntpdcmdoc: $(srcdir)/ntpdc-opts.def $(std_def_list) 112*a466cc55SCy Schubert $(AM_V_GEN)$(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def 1132b15cb3dSCy Schubert 1142b15cb3dSCy Schubert$(srcdir)/ntpdc.mdoc.in: $(srcdir)/ntpdc.1ntpdcmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed 1152b15cb3dSCy Schubert sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcmdoc > $(srcdir)/ntpdc.mdoc.in+ 1162b15cb3dSCy Schubert mv $(srcdir)/ntpdc.mdoc.in+ $(srcdir)/ntpdc.mdoc.in 1172b15cb3dSCy Schubert 1182b15cb3dSCy Schubert### 1192b15cb3dSCy Schubert 1202b15cb3dSCy Schubertntpdc.$(NTPDC_MS): $(srcdir)/ntpdc.$(MANTAGFMT).in $(top_builddir)/config.status 1212b15cb3dSCy Schubert $(top_builddir)/config.status --file=ntpdc.$(NTPDC_MS)+:$(srcdir)/ntpdc.$(MANTAGFMT).in 1222b15cb3dSCy Schubert mv ntpdc.$(NTPDC_MS)+ ntpdc.$(NTPDC_MS) 1232b15cb3dSCy Schubert 1242b15cb3dSCy Schubert### 1252b15cb3dSCy Schubert 1262b15cb3dSCy Schubert$(srcdir)/invoke-ntpdc.menu: $(srcdir)/invoke-ntpdc.texi 1272b15cb3dSCy Schubert @: do-nothing action to avoid default SCCS get, .menu built with .texi 1282b15cb3dSCy Schubert 1292b15cb3dSCy Schubert$(srcdir)/invoke-ntpdc.texi: $(srcdir)/ntpdc-opts.def $(std_def_list) 130*a466cc55SCy Schubert $(AM_V_GEN)$(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def 1312b15cb3dSCy Schubert $(top_srcdir)/scripts/build/check--help $@ 1322b15cb3dSCy Schubert 133*a466cc55SCy Schubert$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi 1342b15cb3dSCy Schubert cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpdc.html ntpdc.texi || true ) 135ea906c41SOllivier Robert 136ea906c41SOllivier Robertntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h 137*a466cc55SCy Schubertnodist_ntpdc_SOURCES = version.c 1389c2daa00SOllivier Robert 1399c2daa00SOllivier Robertntpdc-layout.o: nl.c 1409c2daa00SOllivier Robert 1419c2daa00SOllivier Robertlayout.here: ntpdc-layout 142*a466cc55SCy Schubert $(AM_V_at)./ntpdc-layout > $@ 1439c2daa00SOllivier Robert 1442b15cb3dSCy Schubertcheck-layout: ntpdc-layout $(srcdir)/layout.std layout.here 145*a466cc55SCy Schubert $(AM_V_at)cmp $(srcdir)/layout.std layout.here && echo stamp > $@ 1469c2daa00SOllivier Robert 147*a466cc55SCy Schubertversion.c: Makefile $(top_srcdir)/sntp/scm-rev 148*a466cc55SCy Schubert $(AM_V_GEN)env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc 1499c2daa00SOllivier Robert 1509c2daa00SOllivier Robert# I ran nl_in.c (attached, to be installed into ntpdc) through 1519c2daa00SOllivier Robert# $(CC) -E nl_in.c | nl.pl > nl.c 1522b15cb3dSCy Schubertnl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h 153*a466cc55SCy Schubert $(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 154*a466cc55SCy Schubert $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > $@ 155*a466cc55SCy Schubert 156ea906c41SOllivier Robert 1572b15cb3dSCy Schubertinclude $(top_srcdir)/bincheck.mf 1582b15cb3dSCy Schubertinclude $(top_srcdir)/check-libopts.mf 159*a466cc55SCy Schubertinclude $(top_srcdir)/check-libntp.mf 160*a466cc55SCy Schubertinclude $(top_srcdir)/check-scm-rev.mf 1612b15cb3dSCy Schubertinclude $(top_srcdir)/depsver.mf 1622b15cb3dSCy Schubertinclude $(top_srcdir)/includes.mf 163