]> git.proxmox.com Git - mirror_frr.git/blob - lib/Makefile.am
lib: parser: refresh grammar_sandbox
[mirror_frr.git] / lib / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
4 AM_CFLAGS = $(WERROR)
5 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
6 AM_YFLAGS = -d
7
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
13 lib_LTLIBRARIES = libzebra.la
14 libzebra_la_LDFLAGS = -version-info 0:0:0
15
16 libzebra_la_SOURCES = \
17 network.c pid_output.c getopt.c getopt1.c \
18 checksum.c vector.c linklist.c vty.c \
19 graph.c command_parse.y command_lex.l command_match.c \
20 command.c \
21 sockunion.c prefix.c thread.c if.c buffer.c table.c hash.c \
22 filter.c routemap.c distribute.c stream.c log.c plist.c \
23 zclient.c sockopt.c smux.c agentx.c snmp.c md5.c if_rmap.c keychain.c privs.c \
24 sigevent.c pqueue.c jhash.c workqueue.c nexthop.c json.c \
25 ptm_lib.c csv.c bfd.c vrf.c systemd.c ns.c memory.c memory_vty.c \
26 imsg-buffer.c imsg.c skiplist.c \
27 qobj.c \
28 event_counter.c \
29 strlcpy.c \
30 strlcat.c
31
32 BUILT_SOURCES = route_types.h gitversion.h command_parse.h command_lex.h
33
34 libzebra_la_LIBADD = @LIBCAP@
35
36 pkginclude_HEADERS = \
37 buffer.h checksum.h filter.h getopt.h hash.h \
38 if.h linklist.h log.h \
39 graph.h command_match.h \
40 command.h \
41 memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
42 stream.h table.h thread.h vector.h version.h vty.h zebra.h \
43 plist.h zclient.h sockopt.h smux.h md5.h if_rmap.h keychain.h \
44 privs.h sigevent.h pqueue.h jhash.h zassert.h \
45 workqueue.h route_types.h libospf.h nexthop.h json.h \
46 ptm_lib.h csv.h bfd.h vrf.h ns.h systemd.h bitfield.h \
47 fifo.h memory_vty.h mpls.h imsg.h openbsd-queue.h openbsd-tree.h \
48 skiplist.h qobj.h \
49 event_counter.h
50
51 noinst_HEADERS = \
52 plist_int.h
53
54 noinst_PROGRAMS = grammar_sandbox
55
56 grammar_sandbox_SOURCES = grammar_sandbox.c
57 grammar_sandbox_LDADD = libzebra.la
58
59 EXTRA_DIST = \
60 queue.h \
61 command_lex.h \
62 route_types.pl route_types.txt \
63 gitversion.pl
64
65 route_types.h: $(srcdir)/route_types.txt $(srcdir)/route_types.pl
66 @PERL@ $(srcdir)/route_types.pl < $(srcdir)/route_types.txt > $@
67
68 if GIT_VERSION
69
70 # bit of a trick here to always have up-to-date git stamps without triggering
71 # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
72 # but if we use that on gitversion.h it'll ripple through the .c file deps.
73 # (even if gitversion.h's file timestamp doesn't change, make will think it
74 # did, because of .PHONY...)
75
76 .PHONY: gitversion.h.tmp
77 .SILENT: gitversion.h gitversion.h.tmp
78 GITH=gitversion.h
79 gitversion.h.tmp: $(srcdir)/../.git
80 @PERL@ $(srcdir)/gitversion.pl $(srcdir) > ${GITH}.tmp
81 gitversion.h: gitversion.h.tmp
82 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp -v ${GITH}.tmp ${GITH}
83
84 else
85 .PHONY: gitversion.h
86 gitversion.h:
87 true
88 endif