1 ## Process this file with automake to produce Makefile.in.
3 AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
5 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
6 AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
8 command_lex.h: command_lex.c
9 @if test ! -f $@; then rm -f command_lex.c; else :; fi
10 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) command_lex.c; else :; fi
11 command_parse.lo: command_lex.h
12 clippy-command_parse.$(OBJEXT): command_lex.h
14 lib_LTLIBRARIES = libfrr.la
15 libfrr_la_LDFLAGS = -version-info 0:0:0
18 network.c pid_output.c getopt.c getopt1.c \
19 checksum.c vector.c linklist.c vty.c \
20 graph.c command_parse.y command_lex.l command_match.c \
23 sockunion.c prefix.c thread.c if.c buffer.c table.c hash.c \
24 filter.c routemap.c distribute.c stream.c log.c plist.c \
25 zclient.c sockopt.c md5.c if_rmap.c keychain.c privs.c \
26 sigevent.c pqueue.c jhash.c workqueue.c nexthop.c json.c \
27 ptm_lib.c csv.c bfd.c vrf.c systemd.c ns.c memory.c memory_vty.c \
28 imsg-buffer.c imsg.c skiplist.c \
43 BUILT_SOURCES = route_types.h gitversion.h command_parse.h command_lex.h
45 libfrr_la_LIBADD = @LIBCAP@
48 lib_LTLIBRARIES += libfrrsnmp.la
51 libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
52 libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
53 libfrrsnmp_la_LIBADD = libfrr.la $(SNMP_LIBS)
54 libfrrsnmp_la_SOURCES = \
60 pkginclude_HEADERS = \
62 buffer.h checksum.h filter.h getopt.h hash.h \
63 if.h linklist.h log.h \
64 graph.h command_match.h \
67 memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
68 stream.h table.h thread.h vector.h version.h vty.h zebra.h \
69 plist.h zclient.h sockopt.h smux.h md5.h if_rmap.h keychain.h \
70 privs.h sigevent.h pqueue.h jhash.h zassert.h \
71 workqueue.h route_types.h libospf.h nexthop.h json.h \
72 ptm_lib.h csv.h bfd.h vrf.h ns.h systemd.h bitfield.h \
73 fifo.h memory_vty.h mpls.h imsg.h openbsd-queue.h openbsd-tree.h \
74 skiplist.h qobj.h wheel.h \
93 noinst_PROGRAMS = grammar_sandbox
95 noinst_PROGRAMS += clippy
98 grammar_sandbox_SOURCES = grammar_sandbox_main.c
99 grammar_sandbox_LDADD = libfrr.la
112 clippy_CPPFLAGS = -D_GNU_SOURCE
113 clippy_CFLAGS = $(PYTHON_CFLAGS)
114 clippy_LDADD = $(PYTHON_LIBS)
115 clippy-command_graph.$(OBJEXT): route_types.h
120 route_types.pl route_types.txt \
123 route_types.h: $(srcdir)/route_types.txt $(srcdir)/route_types.pl
124 @PERL@ $(srcdir)/route_types.pl < $(srcdir)/route_types.txt > $@
128 # bit of a trick here to always have up-to-date git stamps without triggering
129 # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
130 # but if we use that on gitversion.h it'll ripple through the .c file deps.
131 # (even if gitversion.h's file timestamp doesn't change, make will think it
132 # did, because of .PHONY...)
134 .PHONY: gitversion.h.tmp
135 .SILENT: gitversion.h gitversion.h.tmp
137 gitversion.h.tmp: $(srcdir)/../.git
138 @PERL@ $(srcdir)/gitversion.pl $(srcdir) > ${GITH}.tmp
139 gitversion.h: gitversion.h.tmp
140 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp -v ${GITH}.tmp ${GITH}