• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- Makefile -*-
2
3AM_CPPFLAGS  =			 	\
4	-Wall \
5	-I${top_srcdir}/include/linux-private \
6	-I${top_srcdir}/include \
7	-I${top_builddir}/include \
8	-I${builddir}/route \
9	-I${builddir}/route/cls \
10	-D_GNU_SOURCE \
11	-DSYSCONFDIR=\"$(sysconfdir)/libnl\"
12
13AM_LDFLAGS = \
14	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
15	-Wl,--version-script=$(top_builddir)/libnl.sym
16
17lib_LTLIBRARIES = \
18	libnl-3.la libnl-genl-3.la libnl-route-3.la libnl-nf-3.la libnl-idiag-3.la
19
20libnl_3_la_SOURCES = \
21	addr.c attr.c cache.c cache_mngr.c cache_mngt.c data.c \
22	error.c handlers.c msg.c nl.c object.c socket.c utils.c \
23	version.c hash.c hashtable.c
24
25libnl_idiag_3_la_LIBADD = libnl-3.la
26libnl_idiag_3_la_SOURCES = \
27	idiag/idiag_meminfo_obj.c idiag/idiag_vegasinfo_obj.c \
28	idiag/idiag_msg_obj.c idiag/idiag_req_obj.c idiag/idiag.c
29
30libnl_genl_3_la_LIBADD  = libnl-3.la
31libnl_genl_3_la_SOURCES = \
32	genl/ctrl.c genl/family.c genl/genl.c genl/mngt.c
33
34libnl_nf_3_la_LIBADD  = libnl-route-3.la
35libnl_nf_3_la_SOURCES = \
36	netfilter/ct.c netfilter/ct_obj.c netfilter/log.c \
37	netfilter/log_msg.c netfilter/log_msg_obj.c netfilter/log_obj.c \
38	netfilter/netfilter.c netfilter/nfnl.c netfilter/queue.c \
39	netfilter/queue_msg.c netfilter/queue_msg_obj.c netfilter/queue_obj.c \
40	netfilter/exp.c netfilter/exp_obj.c
41
42CLEANFILES = \
43	route/pktloc_grammar.c route/pktloc_grammar.h \
44	route/pktloc_syntax.c route/pktloc_syntax.h \
45	route/cls/ematch_grammar.c route/cls/ematch_grammar.h \
46	route/cls/ematch_syntax.c route/cls/ematch_syntax.h
47
48# Hack to avoid using ylwrap. It does not function correctly in combination
49# with --header-file=
50route/pktloc_grammar.c: route/pktloc_grammar.l
51	$(AM_V_GEN) $(MKDIR_P) route; $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
52
53route/pktloc_syntax.c: route/pktloc_syntax.y
54	$(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^
55
56route/cls/ematch_grammar.c: route/cls/ematch_grammar.l
57	$(AM_V_GEN) $(MKDIR_P) route/cls; $(FLEX) --header-file=route/cls/ematch_grammar.h $(LFLAGS) -o $@ $^
58
59route/cls/ematch_syntax.c: route/cls/ematch_syntax.y
60	$(AM_V_GEN) $(MKDIR_P) route/cls; $(YACC) -d $(YFLAGS) -o $@ $^
61
62libnl_route_3_la_LIBADD  = libnl-3.la
63libnl_route_3_la_SOURCES = \
64	route/addr.c route/class.c route/cls.c route/act.c route/link.c \
65	route/neigh.c route/neightbl.c route/nexthop.c route/qdisc.c \
66	route/route.c route/route_obj.c route/route_utils.c route/rtnl.c \
67	route/rule.c route/tc.c route/classid.c \
68	\
69	route/cls/fw.c route/cls/police.c route/cls/u32.c route/cls/basic.c \
70	route/cls/cgroup.c \
71	\
72	route/act/mirred.c \
73	\
74	route/cls/ematch.c \
75	route/cls/ematch/container.c route/cls/ematch/cmp.c \
76	route/cls/ematch/nbyte.c route/cls/ematch/text.c \
77	route/cls/ematch/meta.c \
78	\
79	route/link/api.c route/link/vlan.c route/link/dummy.c \
80	route/link/bridge.c route/link/inet6.c route/link/inet.c \
81	route/link/bonding.c route/link/can.c route/link/macvlan.c \
82	route/link/vxlan.c route/link/veth.c route/link/ipip.c \
83	route/link/ipgre.c route/link/sit.c route/link/ipvti.c \
84	route/link/ip6tnl.c \
85	\
86	route/qdisc/blackhole.c route/qdisc/cbq.c route/qdisc/dsmark.c \
87	route/qdisc/fifo.c route/qdisc/htb.c route/qdisc/netem.c \
88	route/qdisc/prio.c route/qdisc/red.c route/qdisc/sfq.c \
89	route/qdisc/tbf.c route/qdisc/plug.c route/qdisc/ingress.c \
90	route/qdisc/fq_codel.c \
91	\
92	fib_lookup/lookup.c fib_lookup/request.c \
93	\
94	route/pktloc.c
95
96nodist_libnl_route_3_la_SOURCES = \
97	route/pktloc_syntax.c route/pktloc_syntax.h \
98	route/pktloc_grammar.c route/pktloc_grammar.h \
99	route/cls/ematch_syntax.c route/cls/ematch_syntax.h \
100	route/cls/ematch_grammar.c route/cls/ematch_grammar.h
101
102BUILT_SOURCES = \
103	route/cls/ematch_grammar.c \
104	route/cls/ematch_syntax.c \
105	route/pktloc_grammar.c \
106	route/pktloc_syntax.c
107
108EXTRA_DIST = \
109	route/pktloc_grammar.l \
110	route/pktloc_syntax.y \
111	route/cls/ematch_grammar.l \
112	route/cls/ematch_syntax.y
113
114if ENABLE_CLI
115nobase_pkglib_LTLIBRARIES = \
116	cli/qdisc/htb.la \
117	cli/qdisc/blackhole.la \
118	cli/qdisc/pfifo.la \
119	cli/qdisc/plug.la \
120	cli/qdisc/bfifo.la \
121	cli/qdisc/ingress.la \
122	cli/qdisc/fq_codel.la \
123	cli/cls/basic.la \
124	cli/cls/cgroup.la
125
126cli_qdisc_htb_la_LDFLAGS = -module -avoid-version
127cli_qdisc_blackhole_la_LDFLAGS = -module -avoid-version
128cli_qdisc_pfifo_la_LDFLAGS = -module -avoid-version
129cli_qdisc_plug_la_LDFLAGS = -module -avoid-version
130cli_qdisc_bfifo_la_LDFLAGS = -module -avoid-version
131cli_qdisc_ingress_la_LDFLAGS = -module -avoid-version
132cli_qdisc_fq_codel_la_LDFLAGS = -module -avoid-version
133cli_cls_basic_la_LDFLAGS = -module -avoid-version
134cli_cls_cgroup_la_LDFLAGS = -module -avoid-version
135endif
136