]> git.proxmox.com Git - mirror_frr.git/blame - vtysh/Makefile.am
Merge pull request #480 from donaldsharp/agentx
[mirror_frr.git] / vtysh / Makefile.am
CommitLineData
718e3744 1## Process this file with Automake to create Makefile.in
2
65efcfce
LB
3
4if ENABLE_BGP_VNC
5BGP_VNC_RFP_SRCDIR = @top_srcdir@/@LIBRFP@
6BGP_VNC_RFP_INCDIR = -I$(BGP_VNC_RFP_SRCDIR)
7BGP_VNC_RFP_SRC = $(BGP_VNC_RFP_SRCDIR)/*.c
8BGP_VNC_RFAPI_SRCDIR = @top_srcdir@/bgpd/rfapi
9BGP_VNC_RFAPI_INCDIR = -I$(BGP_VNC_RFAPI_SRCDIR) -I$(top_srcdir)/bgpd
10BGP_VNC_RFAPI_SRC = $(BGP_VNC_RFAPI_SRCDIR)/*.c
11else
12BGP_VNC_RFP_INCDIR =
13BGP_VNC_RFP_SRCDIR =
14BGP_VNC_RFP_SRC =
15BGP_VNC_RFAPI_INCDIR =
16BGP_VNC_RFAPI_SRCDIR =
17BGP_VNC_RFAPI_SRC =
18endif
19AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib \
20 $(BGP_VNC_RFAPI_INCDIR) $(BGP_VNC_RFP_INCDIR)
718e3744 21DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
22
23LIBS = @LIBS@ @CURSES@ @LIBPAM@
24
95bb8305 25AM_CFLAGS = $(WERROR)
46bc0e43 26
718e3744 27bin_PROGRAMS = vtysh
28
1ac09d3e 29vtysh_SOURCES = vtysh_main.c vtysh.c vtysh_user.c vtysh_config.c
30nodist_vtysh_SOURCES = vtysh_cmd.c
fc9d0745 31CLEANFILES = vtysh_cmd.c
718e3744 32noinst_HEADERS = vtysh.h vtysh_user.h
55c72803 33vtysh_LDADD = ../lib/libfrr.la @LIBCAP@ @LIBREADLINE@
718e3744 34
d6b72f7a 35examplesdir = $(exampledir)
36dist_examples_DATA = vtysh.conf.sample
718e3744 37
d6b72f7a 38EXTRA_DIST = extract.pl
718e3744 39
9994130f
DS
40vtysh_scan =
41
42if PIMD
43vtysh_scan += $(top_srcdir)/pimd/pim_cmd.c
44endif
45
46if BGPD
be0f8431
DS
47vtysh_scan += $(top_srcdir)/bgpd/bgp_bfd.c
48vtysh_scan += $(top_srcdir)/bgpd/bgp_debug.c
49vtysh_scan += $(top_srcdir)/bgpd/bgp_dump.c
50vtysh_scan += $(top_srcdir)/bgpd/bgp_encap.c
51vtysh_scan += $(top_srcdir)/bgpd/bgp_evpn_vty.c
52vtysh_scan += $(top_srcdir)/bgpd/bgp_filter.c
53vtysh_scan += $(top_srcdir)/bgpd/bgp_mplsvpn.c
54vtysh_scan += $(top_srcdir)/bgpd/bgp_route.c
55vtysh_scan += $(top_srcdir)/bgpd/bgp_routemap.c
56vtysh_scan += $(top_srcdir)/bgpd/bgp_vty.c
9994130f
DS
57endif
58
59if ISISD
be0f8431
DS
60vtysh_scan += $(top_srcdir)/isisd/isis_redist.c
61vtysh_scan += $(top_srcdir)/isisd/isis_spf.c
62vtysh_scan += $(top_srcdir)/isisd/isis_te.c
63vtysh_scan += $(top_srcdir)/isisd/isis_vty.c
64vtysh_scan += $(top_srcdir)/isisd/isisd.c
9994130f
DS
65endif
66
67if OSPFD
be0f8431
DS
68vtysh_scan += $(top_srcdir)/ospfd/ospf_bfd.c
69vtysh_scan += $(top_srcdir)/ospfd/ospf_dump.c
70vtysh_scan += $(top_srcdir)/ospfd/ospf_opaque.c
71vtysh_scan += $(top_srcdir)/ospfd/ospf_ri.c
72vtysh_scan += $(top_srcdir)/ospfd/ospf_routemap.c
73vtysh_scan += $(top_srcdir)/ospfd/ospf_te.c
74vtysh_scan += $(top_srcdir)/ospfd/ospf_vty.c
9994130f
DS
75endif
76
77if OSPF6D
be0f8431 78vtysh_scan += $(top_srcdir)/ospf6d/ospf6_abr.c
7c680483 79vtysh_scan += $(top_srcdir)/ospf6d/ospf6_asbr.c
be0f8431
DS
80vtysh_scan += $(top_srcdir)/ospf6d/ospf6_area.c
81vtysh_scan += $(top_srcdir)/ospf6d/ospf6_bfd.c
82vtysh_scan += $(top_srcdir)/ospf6d/ospf6_flood.c
83vtysh_scan += $(top_srcdir)/ospf6d/ospf6_interface.c
84vtysh_scan += $(top_srcdir)/ospf6d/ospf6_intra.c
85vtysh_scan += $(top_srcdir)/ospf6d/ospf6_lsa.c
86vtysh_scan += $(top_srcdir)/ospf6d/ospf6_message.c
87vtysh_scan += $(top_srcdir)/ospf6d/ospf6_neighbor.c
88vtysh_scan += $(top_srcdir)/ospf6d/ospf6_route.c
89vtysh_scan += $(top_srcdir)/ospf6d/ospf6_spf.c
90vtysh_scan += $(top_srcdir)/ospf6d/ospf6_top.c
91vtysh_scan += $(top_srcdir)/ospf6d/ospf6_zebra.c
92vtysh_scan += $(top_srcdir)/ospf6d/ospf6d.c
9994130f
DS
93endif
94
95if RIPD
be0f8431
DS
96vtysh_scan += $(top_srcdir)/ripd/rip_debug.c
97vtysh_scan += $(top_srcdir)/ripd/rip_interface.c
98vtysh_scan += $(top_srcdir)/ripd/rip_offset.c
99vtysh_scan += $(top_srcdir)/ripd/rip_zebra.c
100vtysh_scan += $(top_srcdir)/ripd/ripd.c
9994130f
DS
101endif
102
103if RIPNGD
be0f8431
DS
104vtysh_scan += $(top_srcdir)/ripngd/ripng_debug.c
105vtysh_scan += $(top_srcdir)/ripngd/ripng_interface.c
106vtysh_scan += $(top_srcdir)/ripngd/ripng_offset.c
107vtysh_scan += $(top_srcdir)/ripngd/ripng_zebra.c
108vtysh_scan += $(top_srcdir)/ripngd/ripngd.c
9994130f
DS
109endif
110
2fb975da
TT
111if NHRPD
112vtysh_scan += $(top_srcdir)/nhrpd/nhrp_vty.c
113endif
114
7f57883e
DS
115if EIGRPD
116vtysh_scan += $(top_srcdir)/eigrpd/eigrp_dump.c
2a23cf95 117#vtysh_scan += $(top_srcdir)/eigrpd/eigrp_routemap.c
7f57883e
DS
118vtysh_scan += $(top_srcdir)/eigrpd/eigrp_vty.c
119endif
120
62ff928b
DS
121if SNMP
122vtysh_scan += $(top_srcdir)/lib/agentx.c
123endif
124
9994130f 125vtysh_cmd_FILES = $(vtysh_scan) \
b5d518fb 126 $(top_srcdir)/lib/keychain.c $(top_srcdir)/lib/routemap.c \
127 $(top_srcdir)/lib/filter.c $(top_srcdir)/lib/plist.c \
128 $(top_srcdir)/lib/distribute.c $(top_srcdir)/lib/if_rmap.c \
19dc275e 129 $(top_srcdir)/lib/vrf.c \
13460c44
FL
130 $(top_srcdir)/lib/vty.c $(top_srcdir)/zebra/debug.c \
131 $(top_srcdir)/lib/ns.c \
b5d518fb 132 $(top_srcdir)/zebra/interface.c \
133 $(top_srcdir)/zebra/irdp_interface.c \
134 $(top_srcdir)/zebra/rtadv.c $(top_srcdir)/zebra/zebra_vty.c \
41dc3488 135 $(top_srcdir)/zebra/zserv.c $(top_srcdir)/zebra/router-id.c \
5adc2528 136 $(top_srcdir)/zebra/zebra_routemap.c \
244c1cdc 137 $(top_srcdir)/zebra/zebra_fpm.c \
41675b4c 138 $(top_srcdir)/zebra/zebra_ptm.c \
65efcfce 139 $(top_srcdir)/zebra/zebra_mpls_vty.c \
9473e340 140 $(top_srcdir)/watchfrr/watchfrr_vty.c \
65efcfce 141 $(BGP_VNC_RFAPI_SRC) $(BGP_VNC_RFP_SRC)
b5d518fb 142
7758fe9f
DL
143# this is slightly iffy... ldp_vty_cmds.c can be located in either
144# $srcdir or $builddir depending on whether it's coming pre-built from a
145# dist tarball or being built. automake uses VPATH to find it, but that
146# doesn't work here...
147# so after running "make ldp_vty_cmds.c", the file can be in either of the
148# two directories. we need to do some magic to find out which.
149vtysh_cmd_DEPS = $(vtysh_cmd_FILES)
150if LDPD
151$(top_builddir)/ldpd/ldp_vty_cmds.c:
152 make -C "$(top_builddir)/ldpd" ldp_vty_cmds.c
153vtysh_cmd_DEPS += $(top_builddir)/ldpd/ldp_vty_cmds.c
154endif
155
156vtysh_cmd.c: $(vtysh_cmd_DEPS) extract.pl
157 if test -n "${LDPD}"; then \
158 ldpcmds="$(top_srcdir)/ldpd/ldp_vty_cmds.c"; \
159 test -f "$(top_builddir)/ldpd/ldp_vty_cmds.c" && ldpcmds="$(top_builddir)/ldpd/ldp_vty_cmds.c"; \
160 fi; \
161 ./extract.pl $(vtysh_cmd_FILES) $${ldpcmds} > vtysh_cmd.c