]> git.proxmox.com Git - mirror_frr.git/blob - lib/Makefile.am
debianpkg: Remove -werror from Ubuntu 14.04 and 12.04 build to skip warnings from...
[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 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 spf_backoff.c \
32 libfrr.c \
33 strlcpy.c \
34 strlcat.c \
35 module.c \
36 hook.c \
37 # end
38
39 BUILT_SOURCES = route_types.h gitversion.h command_parse.h command_lex.h
40
41 libfrr_la_LIBADD = @LIBCAP@
42
43 if SNMP
44 lib_LTLIBRARIES += libfrrsnmp.la
45 endif
46
47 libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
48 libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
49 libfrrsnmp_la_LIBADD = libfrr.la $(SNMP_LIBS)
50 libfrrsnmp_la_SOURCES = \
51 agentx.c \
52 smux.c \
53 snmp.c \
54 #end
55
56 pkginclude_HEADERS = \
57 buffer.h checksum.h filter.h getopt.h hash.h \
58 if.h linklist.h log.h \
59 graph.h command_match.h \
60 command.h \
61 memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
62 stream.h table.h thread.h vector.h version.h vty.h zebra.h \
63 plist.h zclient.h sockopt.h smux.h md5.h if_rmap.h keychain.h \
64 privs.h sigevent.h pqueue.h jhash.h zassert.h \
65 workqueue.h route_types.h libospf.h nexthop.h json.h \
66 ptm_lib.h csv.h bfd.h vrf.h ns.h systemd.h bitfield.h \
67 fifo.h memory_vty.h mpls.h imsg.h openbsd-queue.h openbsd-tree.h \
68 skiplist.h qobj.h wheel.h \
69 event_counter.h \
70 monotime.h \
71 spf_backoff.h \
72 srcdest_table.h \
73 module.h \
74 hook.h \
75 libfrr.h \
76 pw.h \
77 # end
78
79 noinst_HEADERS = \
80 plist_int.h \
81 log_int.h
82
83 noinst_PROGRAMS = grammar_sandbox
84
85 grammar_sandbox_SOURCES = grammar_sandbox_main.c
86 grammar_sandbox_LDADD = libfrr.la
87
88 EXTRA_DIST = \
89 queue.h \
90 command_lex.h \
91 route_types.pl route_types.txt \
92 gitversion.pl
93
94 route_types.h: $(srcdir)/route_types.txt $(srcdir)/route_types.pl
95 @PERL@ $(srcdir)/route_types.pl < $(srcdir)/route_types.txt > $@
96
97 if GIT_VERSION
98
99 # bit of a trick here to always have up-to-date git stamps without triggering
100 # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
101 # but if we use that on gitversion.h it'll ripple through the .c file deps.
102 # (even if gitversion.h's file timestamp doesn't change, make will think it
103 # did, because of .PHONY...)
104
105 .PHONY: gitversion.h.tmp
106 .SILENT: gitversion.h gitversion.h.tmp
107 GITH=gitversion.h
108 gitversion.h.tmp: $(srcdir)/../.git
109 @PERL@ $(srcdir)/gitversion.pl $(srcdir) > ${GITH}.tmp
110 gitversion.h: gitversion.h.tmp
111 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp -v ${GITH}.tmp ${GITH}
112
113 else
114 .PHONY: gitversion.h
115 gitversion.h:
116 true
117 endif