1 AUTOMAKE_OPTIONS= ../util/ansi2knr
3 bindir= ${exec_prefix}/${BINSUBDIR}
5 bin_PROGRAMS= ntpd @MAKE_NTPDSIM@
7 noinst_LIBRARIES= libntpd.a
9 AM_CPPFLAGS= -I$(top_srcdir)/include -I../include $(LIBOPTS_CFLAGS)
10 # LDADD might need RESLIB and ADJLIB.
11 LDADD= version.o libntpd.a @LIBPARSE@
13 BUILT_SOURCES= ntpd-opts.c ntpd-opts.h ntpd.1 ntpd-opts.texi ntpd-opts.menu
16 BUILT_SOURCES+= ntpdsim-opts.c ntpdsim-opts.h ntpdsim.1 ntpdsim-opts.texi ntpdsim-opts.menu
20 # log10 refclock_wwv.o
22 # floor refclock_wwv.o
23 # which are (usually) provided by -lm.
24 ntpd_LDADD = $(LDADD) -lm @LCRYPTO@ $(LIBOPTS_LDADD) ../libntp/libntp.a
25 ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a -lm @LCRYPTO@ $(LIBOPTS_LDADD)
26 ntpdsim_CFLAGS = $(CFLAGS) -DSIM
27 check_y2k_LDADD = $(LDADD) ../libntp/libntp.a
28 DISTCLEANFILES = .version version.c
29 EXTRA_DIST = ntpd-opts.def ntpdbase-opts.def ntpdsim-opts.def \
33 ETAGS_ARGS = Makefile.am
35 check_PROGRAMS = @MAKE_CHECK_Y2K@
36 EXTRA_PROGRAMS = check_y2k ntpdsim
37 run_ag = cd $(srcdir) && autogen -L ../include --writable
38 std_def_list= $(top_srcdir)/include/debug-opt.def \
39 $(top_srcdir)/include/autogen-version.def \
40 $(top_srcdir)/include/copyright.def \
41 $(top_srcdir)/include/version.def
43 check-local: @MAKE_CHECK_Y2K@
44 test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
46 # SIM: cmd_args.c ntp_config.c ntp_io.c ntpd.c + ntpsim.c (include/ntpsim.h)
47 # ntp_resolver.c is presently unused...
48 ntpd_SOURCES = cmd_args.c ntp_config.c ntp_io.c ntpd.c ntpd-opts.c ntpd-opts.h
49 ntpdsim_SOURCES = $(ntpd_SOURCES) ntpsim.c ntpdsim-opts.c ntpdsim-opts.h
50 libntpd_a_SOURCES = jupiter.h ntp_control.c \
51 ntp_crypto.c ntp_filegen.c \
52 ntp_intres.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
53 ntp_proto.c ntp_refclock.c ntp_request.c \
54 ntp_restrict.c ntp_timer.c ntp_util.c \
56 refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
57 refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
58 refclock_chu.c refclock_conf.c refclock_datum.c refclock_dumbclock.c \
59 refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
60 refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
61 refclock_jupiter.c refclock_leitch.c refclock_local.c \
62 refclock_mx4200.c refclock_neoclock4x.c \
63 refclock_nmea.c refclock_oncore.c refclock_palisade.c \
64 refclock_palisade.h refclock_parse.c \
65 refclock_pcf.c refclock_pst.c refclock_ripencc.c refclock_shm.c \
66 refclock_tpro.c refclock_true.c refclock_tt560.c \
67 refclock_ulink.c refclock_wwv.c refclock_wwvb.c \
70 $(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
71 $(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
72 $(run_ag) ntpd-opts.def
74 $(srcdir)/ntpd.1: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
75 $(run_ag) -Tagman1.tpl -bntpd ntpd-opts.def
77 $(srcdir)/ntpd-opts.texi $(srcdir)/ntpd-opts.menu: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
78 $(run_ag) -Taginfo.tpl -DLEVEL=section ntpd-opts.def
80 $(srcdir)/ntpdsim-opts.h: $(srcdir)/ntpdsim-opts.c
81 $(srcdir)/ntpdsim-opts.c: $(srcdir)/ntpdsim-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) $(top_srcdir)/include/homerc.def
82 $(run_ag) ntpdsim-opts.def
84 $(srcdir)/ntpdsim.1: $(srcdir)/ntpdsim-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) $(top_srcdir)/include/homerc.def
85 $(run_ag) -Tagman1.tpl -bntpdsim ntpdsim-opts.def
87 $(srcdir)/ntpdsim-opts.texi $(srcdir)/ntpdsim-opts.menu: $(srcdir)/ntpdsim-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list) $(top_srcdir)/include/homerc.def
88 $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdsim-opts.def
93 cd ../libntp && $(MAKE) libntp.a
95 ../libntp/libntpsim.a:
96 cd ../libntp && $(MAKE) libntpsim.a
98 ../libparse/libparse.a:
99 cd ../libparse && $(MAKE)
101 $(top_srcdir)/version :
102 cd $(top_srcdir) && $(MAKE) version
104 version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/version
105 env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpd
106 $(COMPILE) -c version.c
108 include ../bincheck.mf