]> git.proxmox.com Git - mirror_frr.git/blob - lib/Makefile.am
Merge remote-tracking branch 'origin/stable/2.0'
[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 -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
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 = libfrr.la
14 libfrr_la_LDFLAGS = -version-info 0:0:0
15
16 libfrr_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 wheel.c \
28 event_counter.c \
29 grammar_sandbox.c \
30 srcdest_table.c \
31 strlcpy.c \
32 strlcat.c
33
34 BUILT_SOURCES = route_types.h gitversion.h command_parse.h command_lex.h
35
36 libfrr_la_LIBADD = @LIBCAP@
37
38 pkginclude_HEADERS = \
39 buffer.h checksum.h filter.h getopt.h hash.h \
40 if.h linklist.h log.h \
41 graph.h command_match.h \
42 command.h \
43 memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
44 stream.h table.h thread.h vector.h version.h vty.h zebra.h \
45 plist.h zclient.h sockopt.h smux.h md5.h if_rmap.h keychain.h \
46 privs.h sigevent.h pqueue.h jhash.h zassert.h \
47 workqueue.h route_types.h libospf.h nexthop.h json.h \
48 ptm_lib.h csv.h bfd.h vrf.h ns.h systemd.h bitfield.h \
49 fifo.h memory_vty.h mpls.h imsg.h openbsd-queue.h openbsd-tree.h \
50 skiplist.h qobj.h wheel.h \
51 event_counter.h \
52 monotime.h \
53 srcdest_table.h
54
55 noinst_HEADERS = \
56 plist_int.h
57
58 noinst_PROGRAMS = grammar_sandbox
59
60 grammar_sandbox_SOURCES = grammar_sandbox_main.c
61 grammar_sandbox_LDADD = libfrr.la
62
63 EXTRA_DIST = \
64 queue.h \
65 command_lex.h \
66 route_types.pl route_types.txt \
67 gitversion.pl
68
69 route_types.h: $(srcdir)/route_types.txt $(srcdir)/route_types.pl
70 @PERL@ $(srcdir)/route_types.pl < $(srcdir)/route_types.txt > $@
71
72 if GIT_VERSION
73
74 # bit of a trick here to always have up-to-date git stamps without triggering
75 # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
76 # but if we use that on gitversion.h it'll ripple through the .c file deps.
77 # (even if gitversion.h's file timestamp doesn't change, make will think it
78 # did, because of .PHONY...)
79
80 .PHONY: gitversion.h.tmp
81 .SILENT: gitversion.h gitversion.h.tmp
82 GITH=gitversion.h
83 gitversion.h.tmp: $(srcdir)/../.git
84 @PERL@ $(srcdir)/gitversion.pl $(srcdir) > ${GITH}.tmp
85 gitversion.h: gitversion.h.tmp
86 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp -v ${GITH}.tmp ${GITH}
87
88 else
89 .PHONY: gitversion.h
90 gitversion.h:
91 true
92 endif