]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/ntpsnmpd/Makefile.am
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ntp / ntpsnmpd / Makefile.am
1 NULL=
2
3 bin_PROGRAMS=   $(NTPSNMPD_DB)
4 libexec_PROGRAMS=       $(NTPSNMPD_DL)
5 sbin_PROGRAMS=  $(NTPSNMPD_DS)
6
7 EXTRA_PROGRAMS= ntpsnmpd
8 ntpsnmpd_SOURCES= netsnmp_daemonize.c ntpsnmpd.c ntpSnmpSubagentObject.c \
9                 ntpsnmpd-opts.c ntpsnmpd-opts.h ntpSnmpSubagentObject.h \
10                 ntp_snmp.h
11 # HMS: we probably want a version.o file here, too.
12 LDADD  = ../ntpq/libntpq.a ../libntp/libntp.a
13 LDADD += $(SNMP_LIBS) $(LDADD_LIBNTP) $(LIBM)
14 LDADD += $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBOPTS_LDADD)
15
16 AM_CFLAGS = $(SNMP_CFLAGS) $(CFLAGS_NTP)
17
18 AM_CPPFLAGS  = -I$(top_srcdir)/ntpq
19 AM_CPPFLAGS += $(NTP_INCS)
20 AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
21 AM_CPPFLAGS += $(SNMP_CPPFLAGS)
22 AM_CPPFLAGS += $(CPPFLAGS_NTP)
23
24 AM_LDFLAGS = $(LDFLAGS_NTP)
25
26 EXTRA_DIST=                     \
27         invoke-ntpsnmpd.menu    \
28         invoke-ntpsnmpd.texi    \
29         ntpsnmpd-opts.def       \
30         ntpsnmpd.1ntpsnmpdman   \
31         ntpsnmpd.1ntpsnmpdmdoc  \
32         ntpsnmpd.man.in         \
33         ntpsnmpd.mdoc.in        \
34         ntpsnmpd.html           \
35         ntpsnmpd.texi           \
36         ntpv4-mib.mib           \
37         $(NULL)
38
39 BUILT_SOURCES=  ntpsnmpd-opts.c ntpsnmpd-opts.h
40 CLEANFILES=
41 DISTCLEANFILES= config.log $(man_MANS)
42
43 html_DATA=                              \
44         $(srcdir)/ntpsnmpd.html         \
45         $(NULL)
46
47 noinst_DATA=                            \
48         $(srcdir)/invoke-ntpsnmpd.menu  \
49         $(srcdir)/invoke-ntpsnmpd.texi  \
50         $(srcdir)/ntpsnmpd.man.in       \
51         $(srcdir)/ntpsnmpd.mdoc.in      \
52         $(NULL)
53
54 install-data-local: install-html
55
56 man1_MANS=
57 man8_MANS=
58 man_MANS=       ntpsnmpd.$(NTPSNMPD_MS)
59
60 run_ag=         cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D  \
61                 autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
62 std_def_list =                                                  \
63         $(top_srcdir)/sntp/include/debug-opt.def                \
64         $(top_srcdir)/sntp/include/autogen-version.def          \
65         $(top_srcdir)/sntp/include/copyright.def                \
66         $(top_srcdir)/sntp/include/homerc.def                   \
67         $(top_srcdir)/sntp/include/ntp.lic                      \
68         $(top_srcdir)/sntp/include/version.def                  \
69         $(NULL)
70
71 $(srcdir)/ntpsnmpd-opts.h: $(srcdir)/ntpsnmpd-opts.c
72         @: do-nothing action to avoid default SCCS get, .h built with .c
73         
74 $(srcdir)/ntpsnmpd-opts.c: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
75         $(run_ag) ntpsnmpd-opts.def
76
77 ###
78
79 $(srcdir)/ntpsnmpd.1ntpsnmpdman: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
80         $(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
81
82 $(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
83         sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdman > $(srcdir)/ntpsnmpd.man.in+
84         mv $(srcdir)/ntpsnmpd.man.in+ $(srcdir)/ntpsnmpd.man.in
85
86 ###
87
88 $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
89         $(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
90
91 $(srcdir)/ntpsnmpd.mdoc.in: $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
92         sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc > $(srcdir)/ntpsnmpd.mdoc.in+
93         mv $(srcdir)/ntpsnmpd.mdoc.in+ $(srcdir)/ntpsnmpd.mdoc.in
94
95 ###
96
97 ntpsnmpd.$(NTPSNMPD_MS): $(srcdir)/ntpsnmpd.$(MANTAGFMT).in $(top_builddir)/config.status
98         $(top_builddir)/config.status --file=ntpsnmpd.$(NTPSNMPD_MS)+:$(srcdir)/ntpsnmpd.$(MANTAGFMT).in
99         mv ntpsnmpd.$(NTPSNMPD_MS)+ ntpsnmpd.$(NTPSNMPD_MS)
100
101 ###
102
103 $(srcdir)/invoke-ntpsnmpd.menu: $(srcdir)/invoke-ntpsnmpd.texi
104         @: do-nothing action to avoid default SCCS get, .menu built with .texi
105         
106 $(srcdir)/invoke-ntpsnmpd.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
107         $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
108         $(top_srcdir)/scripts/build/check--help $@
109
110 $(srcdir)/ntpsnmpd.html: $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
111         cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpsnmpd.html ntpsnmpd.texi || true )
112
113 include $(top_srcdir)/bincheck.mf
114 include $(top_srcdir)/sntp/check-libntp.mf
115 include $(top_srcdir)/check-libopts.mf
116 include $(top_srcdir)/depsver.mf
117 include $(top_srcdir)/includes.mf