xref: /freebsd/contrib/ntp/ntpd/Makefile.am (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1#AUTOMAKE_OPTIONS = ../util/ansi2knr no-dependencies
2AUTOMAKE_OPTIONS = ../util/ansi2knr
3bin_PROGRAMS = ntpd @MAKE_NTPDSIM@
4noinst_LIBRARIES = libntpd.a
5INCLUDES = -I$(top_srcdir)/include -I../include
6# LDADD might need RESLIB and ADJLIB.
7# If LIBPARSE, we need libntpd.a 2wagain afterwards...
8LDADD =	version.o libntpd.a @LIBPARSE@ libntpd.a
9# ntpd may need:
10# log10                               refclock_wwv.o
11# sqrt                                ntp_control.o
12# floor                               refclock_wwv.o
13# which are (usually) provided by -lm.
14ntpd_LDADD = $(LDADD) ../libntp/libntp.a -lm @LCRYPTO@
15ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a -lm @LCRYPTO@
16ntpdsim_CFLAGS = $(CFLAGS) -DSIM
17check_y2k_LDADD = $(LDADD) ../libntp/libntp.a
18DISTCLEANFILES = .version version.c
19#EXTRA_DIST = ntpd.mak
20ETAGS_ARGS = Makefile.am
21###							Y2Kfixes
22check_PROGRAMS = @MAKE_CHECK_Y2K@
23EXTRA_PROGRAMS = check_y2k ntpdsim
24
25check-local: @MAKE_CHECK_Y2K@
26	test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
27
28# SIM: cmd_args.c ntp_config.c ntp_io.c ntpd.c + ntpsim.c (include/ntpsim.h)
29# ntp_resolver.c is presently unused...
30ntpd_SOURCES = cmd_args.c ntp_config.c ntp_io.c ntpd.c
31ntpdsim_SOURCES = $(ntpd_SOURCES) ntpsim.c
32libntpd_a_SOURCES = jupiter.h map_vme.c ntp_control.c \
33	ntp_crypto.c ntp_filegen.c \
34	ntp_intres.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
35	ntp_proto.c ntp_refclock.c ntp_request.c \
36	ntp_restrict.c ntp_timer.c ntp_util.c \
37	refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
38	refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
39	refclock_chu.c refclock_conf.c refclock_datum.c refclock_dumbclock.c \
40	refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
41	refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
42	refclock_jupiter.c refclock_leitch.c refclock_local.c \
43	refclock_msfees.c refclock_mx4200.c refclock_nmea.c refclock_oncore.c \
44	refclock_palisade.c refclock_palisade.h refclock_parse.c \
45	refclock_pcf.c refclock_pst.c refclock_ptbacts.c refclock_shm.c \
46	refclock_tpro.c refclock_trak.c refclock_true.c refclock_tt560.c \
47	refclock_ulink.c refclock_usno.c refclock_wwv.c refclock_wwvb.c \
48	refclock_zyfer.c refclock_ripencc.c refclock_neoclock4x.c
49
50$(PROGRAMS): $(LDADD)
51
52../libntp/libntp.a:
53	cd ../libntp && $(MAKE)
54
55../libparse/libparse.a:
56	cd ../libparse && $(MAKE)
57
58version.o: $(ntpd_OBJECTS) ../libntp/libntp.a @LIBPARSE@ Makefile $(top_srcdir)/version
59	env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpd
60	$(COMPILE) -c version.c
61