xref: /freebsd/contrib/ntp/util/Makefile.am (revision 8d20be1e22095c27faf8fe8b2f0d089739cc742e)
1#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
2AUTOMAKE_OPTIONS=	ansi2knr
3
4bin_PROGRAMS=	@MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \
5		ntp-keygen
6EXTRA_PROGRAMS=	audio-pcm byteorder hist jitter kern longsize \
7	ntptime pps-api precision sht testrs6000 tg tickadj timetrim
8
9AM_CPPFLAGS=	-I$(top_srcdir)/include $(LIBOPTS_CFLAGS)
10# LDADD might need RESLIB and ADJLIB
11LDADD=		../libntp/libntp.a
12ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
13ntp_keygen_LDADD=	@LCRYPTO@ $(LIBOPTS_LDADD) ../libntp/libntp.a
14
15ETAGS_ARGS=	Makefile.am
16#EXTRA_DIST=	README TAGS
17EXTRA_DIST=	ntp-keygen-opts.def ntp-keygen.1 ntp-keygen-opts.texi ntp-keygen-opts.menu
18BUILT_SOURCES=	ntp-keygen-opts.c ntp-keygen-opts.h ntp-keygen.1	\
19		ntp-keygen-opts.texi ntp-keygen-opts.menu
20man_MANS=	ntp-keygen.1
21run_ag=         cd $(srcdir) && autogen -L ../include --writable
22std_def_list=	$(top_srcdir)/include/debug-opt.def		\
23		$(top_srcdir)/include/autogen-version.def 	\
24		$(top_srcdir)/include/copyright.def 		\
25		$(top_srcdir)/include/homerc.def 		\
26		$(top_srcdir)/include/version.def
27
28$(srcdir)/ntp-keygen-opts.h: $(srcdir)/ntp-keygen-opts.c
29$(srcdir)/ntp-keygen-opts.c: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
30	$(run_ag) ntp-keygen-opts.def
31
32$(srcdir)/ntp-keygen.1: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
33	$(run_ag) -Tagman1.tpl -bntp-keygen ntp-keygen-opts.def
34
35$(srcdir)/ntp-keygen-opts.texi $(srcdir)/ntp-keygen-opts.menu: $(srcdir)/ntp-keygen-opts.def $(std_def_list)
36	$(run_ag) -Taginfo.tpl -DLEVEL=section ntp-keygen-opts.def
37
38
39jitter_SOURCES=	jitter.c jitter.h
40jitter_LDADD=
41
42../libntp/libntp.a:
43	cd ../libntp && $(MAKE)
44
45kern.o: kern.c
46	$(COMPILE) -DHAVE_TIMEX_H -c kern.c
47