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