]> git.proxmox.com Git - mirror_frr.git/blob - lib/Makefile.am
e1b84587da15b1d34bb294b5c733cc6167418882
[mirror_frr.git] / lib / Makefile.am
1 ## Process this file with automake to produce Makefile.in.
2
3 include ../common.am
4
5 AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
6 AM_CFLAGS = $(WERROR)
7 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
8 AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
9
10 command_lex.h: command_lex.c
11 @if test ! -f $@; then rm -f command_lex.c; else :; fi
12 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) command_lex.c; else :; fi
13 command_parse.lo: command_lex.h
14 clippy-command_parse.$(OBJEXT): command_lex.h
15
16 lib_LTLIBRARIES = libfrr.la
17 libfrr_la_LDFLAGS = -version-info 0:0:0
18
19 libfrr_la_SOURCES = \
20 network.c pid_output.c getopt.c getopt1.c \
21 checksum.c vector.c linklist.c vty.c openbsd-tree.c \
22 graph.c command_parse.y command_lex.l command_match.c \
23 command_graph.c \
24 command.c \
25 sockunion.c prefix.c thread.c if.c buffer.c table.c hash.c \
26 filter.c routemap.c distribute.c stream.c log.c plist.c \
27 zclient.c sockopt.c md5.c if_rmap.c keychain.c privs.c \
28 sigevent.c pqueue.c jhash.c workqueue.c nexthop.c json.c \
29 ptm_lib.c csv.c bfd.c vrf.c systemd.c ns.c memory.c memory_vty.c \
30 imsg-buffer.c imsg.c skiplist.c \
31 qobj.c wheel.c \
32 event_counter.c \
33 grammar_sandbox.c \
34 srcdest_table.c \
35 spf_backoff.c \
36 libfrr.c \
37 strlcpy.c \
38 strlcat.c \
39 sha256.c \
40 module.c \
41 hook.c \
42 frr_pthread.c \
43 termtable.c \
44 # end
45
46 BUILT_SOURCES = route_types.h gitversion.h command_parse.h command_lex.h
47
48 libfrr_la_LIBADD = @LIBCAP@
49
50 if SNMP
51 lib_LTLIBRARIES += libfrrsnmp.la
52 endif
53
54 libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
55 libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
56 libfrrsnmp_la_LIBADD = libfrr.la $(SNMP_LIBS)
57 libfrrsnmp_la_SOURCES = \
58 agentx.c \
59 smux.c \
60 snmp.c \
61 #end
62
63 pkginclude_HEADERS = \
64 frratomic.h \
65 buffer.h checksum.h filter.h getopt.h hash.h \
66 if.h linklist.h log.h \
67 graph.h command_match.h \
68 command_graph.h \
69 command.h \
70 memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
71 stream.h table.h thread.h vector.h version.h vty.h zebra.h \
72 plist.h zclient.h sockopt.h smux.h md5.h if_rmap.h keychain.h \
73 privs.h sigevent.h pqueue.h jhash.h zassert.h \
74 workqueue.h route_types.h libospf.h nexthop.h json.h \
75 ptm_lib.h csv.h bfd.h vrf.h ns.h systemd.h bitfield.h \
76 fifo.h memory_vty.h mpls.h imsg.h openbsd-queue.h openbsd-tree.h \
77 skiplist.h qobj.h wheel.h \
78 event_counter.h \
79 monotime.h \
80 spf_backoff.h \
81 srcdest_table.h \
82 module.h \
83 hook.h \
84 libfrr.h \
85 sha256.h \
86 frr_pthread.h \
87 vrf_int.h \
88 termtable.h \
89 # end
90
91 noinst_HEADERS = \
92 plist_int.h \
93 log_int.h \
94 clippy.h \
95 # end
96
97 noinst_PROGRAMS = grammar_sandbox
98 if BUILD_CLIPPY
99 noinst_PROGRAMS += clippy
100 endif
101
102 grammar_sandbox_SOURCES = grammar_sandbox_main.c
103 grammar_sandbox_LDADD = libfrr.la
104
105 clippy_SOURCES = \
106 defun_lex.l \
107 command_parse.y \
108 command_lex.l \
109 command_graph.c \
110 command_py.c \
111 memory.c \
112 graph.c \
113 vector.c \
114 clippy.c \
115 # end
116 clippy_CPPFLAGS = -D_GNU_SOURCE
117 clippy_CFLAGS = $(PYTHON_CFLAGS)
118 clippy_LDADD = $(PYTHON_LIBS)
119 clippy-command_graph.$(OBJEXT): route_types.h
120
121 plist.lo: plist_clippy.c
122
123 EXTRA_DIST = \
124 queue.h \
125 command_lex.h \
126 route_types.pl route_types.txt \
127 gitversion.pl
128
129 route_types.h: $(srcdir)/route_types.txt $(srcdir)/route_types.pl
130 @PERL@ $(srcdir)/route_types.pl < $(srcdir)/route_types.txt > $@
131
132 if GIT_VERSION
133
134 # bit of a trick here to always have up-to-date git stamps without triggering
135 # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
136 # but if we use that on gitversion.h it'll ripple through the .c file deps.
137 # (even if gitversion.h's file timestamp doesn't change, make will think it
138 # did, because of .PHONY...)
139
140 .PHONY: gitversion.h.tmp
141 .SILENT: gitversion.h gitversion.h.tmp
142 GITH=gitversion.h
143 gitversion.h.tmp: $(srcdir)/../.git
144 @PERL@ $(srcdir)/gitversion.pl $(srcdir) > ${GITH}.tmp
145 gitversion.h: gitversion.h.tmp
146 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp -v ${GITH}.tmp ${GITH}
147
148 else
149 .PHONY: gitversion.h
150 gitversion.h:
151 true
152 endif