1# -*- Makefile -*- 2 3ACLOCAL_AMFLAGS = -I m4 4 5lib_LTLIBRARIES = 6noinst_LTLIBRARIES = 7check_LTLIBRARIES = 8 9check_PROGRAMS = 10check_programs = 11 12bin_PROGRAMS = 13sbin_PROGRAMS = 14noinst_PROGRAMS = 15 16TESTS = 17 18CLEANFILES = 19EXTRA_DIST = 20 21DISTCHECK_CONFIGURE_FLAGS = \ 22 --disable-dependency-tracking 23 24pkgconfig_DATA = \ 25 libnl-3.0.pc \ 26 libnl-genl-3.0.pc \ 27 libnl-idiag-3.0.pc \ 28 libnl-nf-3.0.pc \ 29 libnl-route-3.0.pc \ 30 libnl-xfrm-3.0.pc \ 31 $(NULL) 32 33warn_cppflags = \ 34 -Wall \ 35 -Wextra \ 36 -Wmissing-prototypes \ 37 -Wno-unused-parameter \ 38 -Wno-sign-compare \ 39 -Wno-missing-field-initializers \ 40 -Wpointer-arith \ 41 $(NULL) 42 43############################################################################### 44 45libnlincludedir = $(includedir)/libnl@MAJ_VERSION@ 46 47libnlinclude_netlinkdir = $(libnlincludedir)/netlink 48libnlinclude_netlink_HEADERS = \ 49 include/netlink/addr.h \ 50 include/netlink/attr.h \ 51 include/netlink/cache-api.h \ 52 include/netlink/cache.h \ 53 include/netlink/data.h \ 54 include/netlink/errno.h \ 55 include/netlink/handlers.h \ 56 include/netlink/hash.h \ 57 include/netlink/hashtable.h \ 58 include/netlink/list.h \ 59 include/netlink/msg.h \ 60 include/netlink/netlink-compat.h \ 61 include/netlink/netlink-kernel.h \ 62 include/netlink/netlink.h \ 63 include/netlink/object-api.h \ 64 include/netlink/object.h \ 65 include/netlink/socket.h \ 66 include/netlink/types.h \ 67 include/netlink/utils.h \ 68 include/netlink/version.h \ 69 $(NULL) 70libnlinclude_netlink_fib_lookupdir = $(libnlincludedir)/netlink/fib_lookup 71libnlinclude_netlink_fib_lookup_HEADERS = \ 72 include/netlink/fib_lookup/lookup.h \ 73 include/netlink/fib_lookup/request.h \ 74 $(NULL) 75libnlinclude_netlink_genldir = $(libnlincludedir)/netlink/genl 76libnlinclude_netlink_genl_HEADERS = \ 77 include/netlink/genl/ctrl.h \ 78 include/netlink/genl/family.h \ 79 include/netlink/genl/genl.h \ 80 include/netlink/genl/mngt.h \ 81 $(NULL) 82libnlinclude_netlink_idiagdir = $(libnlincludedir)/netlink/idiag 83libnlinclude_netlink_idiag_HEADERS = \ 84 include/netlink/idiag/idiagnl.h \ 85 include/netlink/idiag/meminfo.h \ 86 include/netlink/idiag/msg.h \ 87 include/netlink/idiag/req.h \ 88 include/netlink/idiag/vegasinfo.h \ 89 $(NULL) 90libnlinclude_netlink_netfilterdir = $(libnlincludedir)/netlink/netfilter 91libnlinclude_netlink_netfilter_HEADERS = \ 92 include/netlink/netfilter/ct.h \ 93 include/netlink/netfilter/exp.h \ 94 include/netlink/netfilter/log.h \ 95 include/netlink/netfilter/log_msg.h \ 96 include/netlink/netfilter/netfilter.h \ 97 include/netlink/netfilter/nfnl.h \ 98 include/netlink/netfilter/queue.h \ 99 include/netlink/netfilter/queue_msg.h \ 100 $(NULL) 101libnlinclude_netlink_routedir = $(libnlincludedir)/netlink/route 102libnlinclude_netlink_route_HEADERS = \ 103 include/netlink/route/action.h \ 104 include/netlink/route/addr.h \ 105 include/netlink/route/class.h \ 106 include/netlink/route/classifier.h \ 107 include/netlink/route/link.h \ 108 include/netlink/route/neighbour.h \ 109 include/netlink/route/neightbl.h \ 110 include/netlink/route/netconf.h \ 111 include/netlink/route/nexthop.h \ 112 include/netlink/route/pktloc.h \ 113 include/netlink/route/qdisc.h \ 114 include/netlink/route/route.h \ 115 include/netlink/route/rtnl.h \ 116 include/netlink/route/rule.h \ 117 include/netlink/route/tc-api.h \ 118 include/netlink/route/tc.h \ 119 $(NULL) 120libnlinclude_netlink_route_actdir = $(libnlincludedir)/netlink/route/act 121libnlinclude_netlink_route_act_HEADERS = \ 122 include/netlink/route/act/gact.h \ 123 include/netlink/route/act/mirred.h \ 124 include/netlink/route/act/skbedit.h \ 125 include/netlink/route/act/vlan.h \ 126 $(NULL) 127libnlinclude_netlink_route_clsdir = $(libnlincludedir)/netlink/route/cls 128libnlinclude_netlink_route_cls_HEADERS = \ 129 include/netlink/route/cls/basic.h \ 130 include/netlink/route/cls/cgroup.h \ 131 include/netlink/route/cls/ematch.h \ 132 include/netlink/route/cls/fw.h \ 133 include/netlink/route/cls/matchall.h \ 134 include/netlink/route/cls/police.h \ 135 include/netlink/route/cls/u32.h \ 136 $(NULL) 137libnlinclude_netlink_route_cls_ematchdir = $(libnlincludedir)/netlink/route/cls/ematch 138libnlinclude_netlink_route_cls_ematch_HEADERS = \ 139 include/netlink/route/cls/ematch/cmp.h \ 140 include/netlink/route/cls/ematch/meta.h \ 141 include/netlink/route/cls/ematch/nbyte.h \ 142 include/netlink/route/cls/ematch/text.h \ 143 $(NULL) 144libnlinclude_netlink_route_linkdir = $(libnlincludedir)/netlink/route/link 145libnlinclude_netlink_route_link_HEADERS = \ 146 include/netlink/route/link/api.h \ 147 include/netlink/route/link/bonding.h \ 148 include/netlink/route/link/bridge.h \ 149 include/netlink/route/link/can.h \ 150 include/netlink/route/link/geneve.h \ 151 include/netlink/route/link/inet.h \ 152 include/netlink/route/link/inet6.h \ 153 include/netlink/route/link/info-api.h \ 154 include/netlink/route/link/ip6tnl.h \ 155 include/netlink/route/link/ipgre.h \ 156 include/netlink/route/link/ipip.h \ 157 include/netlink/route/link/ipvlan.h \ 158 include/netlink/route/link/ipvti.h \ 159 include/netlink/route/link/macsec.h \ 160 include/netlink/route/link/macvlan.h \ 161 include/netlink/route/link/macvtap.h \ 162 include/netlink/route/link/ppp.h \ 163 include/netlink/route/link/sit.h \ 164 include/netlink/route/link/sriov.h \ 165 include/netlink/route/link/veth.h \ 166 include/netlink/route/link/vlan.h \ 167 include/netlink/route/link/vrf.h \ 168 include/netlink/route/link/vxlan.h \ 169 include/netlink/route/link/xfrmi.h \ 170 $(NULL) 171libnlinclude_netlink_route_qdiscdir = $(libnlincludedir)/netlink/route/qdisc 172libnlinclude_netlink_route_qdisc_HEADERS = \ 173 include/netlink/route/qdisc/cbq.h \ 174 include/netlink/route/qdisc/dsmark.h \ 175 include/netlink/route/qdisc/fifo.h \ 176 include/netlink/route/qdisc/fq_codel.h \ 177 include/netlink/route/qdisc/hfsc.h \ 178 include/netlink/route/qdisc/htb.h \ 179 include/netlink/route/qdisc/mqprio.h \ 180 include/netlink/route/qdisc/netem.h \ 181 include/netlink/route/qdisc/plug.h \ 182 include/netlink/route/qdisc/prio.h \ 183 include/netlink/route/qdisc/red.h \ 184 include/netlink/route/qdisc/sfq.h \ 185 include/netlink/route/qdisc/tbf.h \ 186 $(NULL) 187libnlinclude_netlink_xfrmdir = $(libnlincludedir)/netlink/xfrm 188libnlinclude_netlink_xfrm_HEADERS = \ 189 include/netlink/xfrm/ae.h \ 190 include/netlink/xfrm/lifetime.h \ 191 include/netlink/xfrm/sa.h \ 192 include/netlink/xfrm/selector.h \ 193 include/netlink/xfrm/sp.h \ 194 include/netlink/xfrm/template.h \ 195 $(NULL) 196 197if ENABLE_CLI 198libnlinclude_netlink_clidir = $(libnlincludedir)/netlink/cli 199libnlinclude_netlink_cli_HEADERS = \ 200 include/netlink/cli/addr.h \ 201 include/netlink/cli/class.h \ 202 include/netlink/cli/cls.h \ 203 include/netlink/cli/ct.h \ 204 include/netlink/cli/exp.h \ 205 include/netlink/cli/link.h \ 206 include/netlink/cli/neigh.h \ 207 include/netlink/cli/qdisc.h \ 208 include/netlink/cli/route.h \ 209 include/netlink/cli/rule.h \ 210 include/netlink/cli/tc.h \ 211 include/netlink/cli/utils.h \ 212 $(NULL) 213endif 214 215noinst_HEADERS = \ 216 include/linux-private/linux/can/netlink.h \ 217 include/linux-private/linux/fib_rules.h \ 218 include/linux-private/linux/gen_stats.h \ 219 include/linux-private/linux/genetlink.h \ 220 include/linux-private/linux/if.h \ 221 include/linux-private/linux/if_addr.h \ 222 include/linux-private/linux/if_arp.h \ 223 include/linux-private/linux/if_bridge.h \ 224 include/linux-private/linux/if_ether.h \ 225 include/linux-private/linux/if_link.h \ 226 include/linux-private/linux/if_macsec.h \ 227 include/linux-private/linux/if_tunnel.h \ 228 include/linux-private/linux/if_vlan.h \ 229 include/linux-private/linux/in.h \ 230 include/linux-private/linux/in6.h \ 231 include/linux-private/linux/inet_diag.h \ 232 include/linux-private/linux/ip.h \ 233 include/linux-private/linux/ipv6.h \ 234 include/linux-private/linux/libc-compat.h \ 235 include/linux-private/linux/lwtunnel.h \ 236 include/linux-private/linux/mpls.h \ 237 include/linux-private/linux/mpls_iptunnel.h \ 238 include/linux-private/linux/neighbour.h \ 239 include/linux-private/linux/netconf.h \ 240 include/linux-private/linux/netfilter.h \ 241 include/linux-private/linux/netfilter/nf_conntrack_common.h \ 242 include/linux-private/linux/netfilter/nfnetlink.h \ 243 include/linux-private/linux/netfilter/nfnetlink_compat.h \ 244 include/linux-private/linux/netfilter/nfnetlink_conntrack.h \ 245 include/linux-private/linux/netfilter/nfnetlink_log.h \ 246 include/linux-private/linux/netfilter/nfnetlink_queue.h \ 247 include/linux-private/linux/netlink.h \ 248 include/linux-private/linux/pkt_cls.h \ 249 include/linux-private/linux/pkt_sched.h \ 250 include/linux-private/linux/rtnetlink.h \ 251 include/linux-private/linux/snmp.h \ 252 include/linux-private/linux/sock_diag.h \ 253 include/linux-private/linux/socket.h \ 254 include/linux-private/linux/tc_act/tc_gact.h \ 255 include/linux-private/linux/tc_act/tc_mirred.h \ 256 include/linux-private/linux/tc_act/tc_skbedit.h \ 257 include/linux-private/linux/tc_act/tc_vlan.h \ 258 include/linux-private/linux/tc_ematch/tc_em_meta.h \ 259 include/linux-private/linux/veth.h \ 260 include/linux-private/linux/xfrm.h \ 261 include/netlink-private/cache-api.h \ 262 include/netlink-private/genl.h \ 263 include/netlink-private/netlink.h \ 264 include/netlink-private/object-api.h \ 265 include/netlink-private/route/link/api.h \ 266 include/netlink-private/route/link/sriov.h \ 267 include/netlink-private/route/mpls.h \ 268 include/netlink-private/route/nexthop-encap.h \ 269 include/netlink-private/route/tc-api.h \ 270 include/netlink-private/socket.h \ 271 include/netlink-private/tc.h \ 272 include/netlink-private/types.h \ 273 include/netlink-private/utils.h \ 274 $(NULL) 275 276############################################################################### 277 278# Hack to avoid using ylwrap. It does not function correctly in combination 279# with --header-file= 280 281lib/route/pktloc_grammar.h: lib/route/pktloc_grammar.c 282 @true 283 284lib/route/pktloc_grammar.c: lib/route/pktloc_grammar.l lib/route/.dirstamp 285 $(AM_V_GEN) $(FLEX) --header-file=lib/route/pktloc_grammar.h $(LFLAGS) -o $@ $< 286 287lib/route/pktloc_syntax.h: lib/route/pktloc_syntax.c 288 @true 289 290lib/route/pktloc_syntax.c: lib/route/pktloc_syntax.y lib/route/.dirstamp 291 $(AM_V_GEN) $(YACC) -d $(YFLAGS) -o $@ $< 292 293lib/route/cls/ematch_grammar.h: lib/route/cls/ematch_grammar.c 294 @true 295 296lib/route/cls/ematch_grammar.c: lib/route/cls/ematch_grammar.l lib/route/cls/.dirstamp 297 $(AM_V_GEN) $(FLEX) --header-file=lib/route/cls/ematch_grammar.h $(LFLAGS) -o $@ $< 298 299lib/route/cls/ematch_syntax.h: lib/route/cls/ematch_syntax.c 300 @true 301 302lib/route/cls/ematch_syntax.c: lib/route/cls/ematch_syntax.y lib/route/cls/.dirstamp 303 $(AM_V_GEN) $(YACC) -d $(YFLAGS) -o $@ $< 304 305grammar_files_sources = \ 306 lib/route/cls/ematch_grammar.c \ 307 lib/route/cls/ematch_syntax.c \ 308 lib/route/pktloc_grammar.c \ 309 lib/route/pktloc_syntax.c \ 310 $(NULL) 311 312grammar_files_headers = $(grammar_files_sources:%.c=%.h) 313 314CLEANFILES += \ 315 $(grammar_files_sources) \ 316 $(grammar_files_headers) 317 318EXTRA_DIST += \ 319 lib/route/cls/ematch_grammar.l \ 320 lib/route/cls/ematch_syntax.y \ 321 lib/route/pktloc_grammar.l \ 322 lib/route/pktloc_syntax.y \ 323 $(NULL) 324 325############################################################################### 326 327lib_cppflags = \ 328 $(warn_cppflags) \ 329 -D_GNU_SOURCE \ 330 -DSYSCONFDIR=\"$(sysconfdir)/libnl\" \ 331 -I$(srcdir)/include/linux-private \ 332 -I$(srcdir)/include \ 333 -I$(builddir)/include \ 334 -I$(builddir)/lib/route \ 335 -I$(builddir)/lib/route/cls 336 337lib_LTLIBRARIES += lib/libnl-3.la 338 339lib_libnl_3_la_SOURCES = \ 340 lib/addr.c \ 341 lib/attr.c \ 342 lib/cache.c \ 343 lib/cache_mngr.c \ 344 lib/cache_mngt.c \ 345 lib/data.c \ 346 lib/error.c \ 347 lib/handlers.c \ 348 lib/hash.c \ 349 lib/hashtable.c \ 350 lib/mpls.c \ 351 lib/msg.c \ 352 lib/nl.c \ 353 lib/object.c \ 354 lib/socket.c \ 355 lib/utils.c \ 356 lib/version.c \ 357 $(NULL) 358EXTRA_lib_libnl_3_la_DEPENDENCIES = \ 359 libnl-3.sym 360lib_libnl_3_la_CPPFLAGS = \ 361 $(lib_cppflags) 362lib_libnl_3_la_LDFLAGS = \ 363 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ 364 -Wl,--version-script=$(srcdir)/libnl-3.sym 365 366lib_LTLIBRARIES += lib/libnl-route-3.la 367 368lib_libnl_route_3_la_SOURCES = \ 369 lib/fib_lookup/lookup.c \ 370 lib/fib_lookup/request.c \ 371 lib/route/act.c \ 372 lib/route/act/gact.c \ 373 lib/route/act/mirred.c \ 374 lib/route/act/skbedit.c \ 375 lib/route/act/vlan.c \ 376 lib/route/addr.c \ 377 lib/route/class.c \ 378 lib/route/classid.c \ 379 lib/route/cls.c \ 380 lib/route/cls/basic.c \ 381 lib/route/cls/cgroup.c \ 382 lib/route/cls/ematch.c \ 383 lib/route/cls/ematch/cmp.c \ 384 lib/route/cls/ematch/container.c \ 385 lib/route/cls/ematch/meta.c \ 386 lib/route/cls/ematch/nbyte.c \ 387 lib/route/cls/ematch/text.c \ 388 lib/route/cls/fw.c \ 389 lib/route/cls/mall.c \ 390 lib/route/cls/police.c \ 391 lib/route/cls/u32.c \ 392 lib/route/link.c \ 393 lib/route/link/api.c \ 394 lib/route/link/bonding.c \ 395 lib/route/link/bridge.c \ 396 lib/route/link/can.c \ 397 lib/route/link/dummy.c \ 398 lib/route/link/geneve.c \ 399 lib/route/link/ifb.c \ 400 lib/route/link/inet.c \ 401 lib/route/link/inet6.c \ 402 lib/route/link/ip6tnl.c \ 403 lib/route/link/ipgre.c \ 404 lib/route/link/ipip.c \ 405 lib/route/link/ipvlan.c \ 406 lib/route/link/ipvti.c \ 407 lib/route/link/macsec.c \ 408 lib/route/link/macvlan.c \ 409 lib/route/link/ppp.c \ 410 lib/route/link/sit.c \ 411 lib/route/link/sriov.c \ 412 lib/route/link/veth.c \ 413 lib/route/link/vlan.c \ 414 lib/route/link/vrf.c \ 415 lib/route/link/vxlan.c \ 416 lib/route/link/xfrmi.c \ 417 lib/route/neigh.c \ 418 lib/route/neightbl.c \ 419 lib/route/netconf.c \ 420 lib/route/nexthop.c \ 421 lib/route/nexthop_encap.c \ 422 lib/route/nh_encap_mpls.c \ 423 lib/route/pktloc.c \ 424 lib/route/qdisc.c \ 425 lib/route/qdisc/blackhole.c \ 426 lib/route/qdisc/cbq.c \ 427 lib/route/qdisc/dsmark.c \ 428 lib/route/qdisc/fifo.c \ 429 lib/route/qdisc/fq_codel.c \ 430 lib/route/qdisc/hfsc.c \ 431 lib/route/qdisc/htb.c \ 432 lib/route/qdisc/ingress.c \ 433 lib/route/qdisc/mqprio.c \ 434 lib/route/qdisc/netem.c \ 435 lib/route/qdisc/plug.c \ 436 lib/route/qdisc/prio.c \ 437 lib/route/qdisc/red.c \ 438 lib/route/qdisc/sfq.c \ 439 lib/route/qdisc/tbf.c \ 440 lib/route/route.c \ 441 lib/route/route_obj.c \ 442 lib/route/route_utils.c \ 443 lib/route/rtnl.c \ 444 lib/route/rule.c \ 445 lib/route/tc.c \ 446 $(NULL) 447nodist_lib_libnl_route_3_la_SOURCES = \ 448 $(grammar_files_sources) 449EXTRA_lib_libnl_route_3_la_DEPENDENCIES = \ 450 libnl-route-3.sym 451lib_libnl_route_3_la_CPPFLAGS = \ 452 $(lib_cppflags) 453lib_libnl_route_3_la_LDFLAGS = \ 454 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ 455 -Wl,--version-script=$(srcdir)/libnl-route-3.sym 456lib_libnl_route_3_la_LIBADD = \ 457 lib/libnl-3.la 458 459$(lib_libnl_route_3_la_OBJECTS): $(grammar_files_headers) 460 461lib_LTLIBRARIES += lib/libnl-idiag-3.la 462 463lib_libnl_idiag_3_la_SOURCES = \ 464 lib/idiag/idiag.c \ 465 lib/idiag/idiag_meminfo_obj.c \ 466 lib/idiag/idiag_msg_obj.c \ 467 lib/idiag/idiag_req_obj.c \ 468 lib/idiag/idiag_vegasinfo_obj.c \ 469 $(NULL) 470EXTRA_lib_libnl_idiag_3_la_DEPENDENCIES = \ 471 libnl-idiag-3.sym 472lib_libnl_idiag_3_la_CPPFLAGS = \ 473 $(lib_cppflags) 474lib_libnl_idiag_3_la_LDFLAGS = \ 475 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ 476 -Wl,--version-script=$(srcdir)/libnl-idiag-3.sym 477lib_libnl_idiag_3_la_LIBADD = \ 478 lib/libnl-3.la 479 480lib_LTLIBRARIES += lib/libnl-genl-3.la 481 482lib_libnl_genl_3_la_SOURCES = \ 483 lib/genl/ctrl.c \ 484 lib/genl/family.c \ 485 lib/genl/genl.c \ 486 lib/genl/mngt.c \ 487 $(NULL) 488EXTRA_lib_libnl_genl_3_la_DEPENDENCIES = \ 489 libnl-genl-3.sym 490lib_libnl_genl_3_la_CPPFLAGS = \ 491 $(lib_cppflags) 492lib_libnl_genl_3_la_LDFLAGS = \ 493 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ 494 -Wl,--version-script=$(srcdir)/libnl-genl-3.sym 495lib_libnl_genl_3_la_LIBADD = \ 496 lib/libnl-3.la 497 498lib_LTLIBRARIES += lib/libnl-nf-3.la 499 500lib_libnl_nf_3_la_SOURCES = \ 501 lib/netfilter/ct.c \ 502 lib/netfilter/ct_obj.c \ 503 lib/netfilter/exp.c \ 504 lib/netfilter/exp_obj.c \ 505 lib/netfilter/log.c \ 506 lib/netfilter/log_msg.c \ 507 lib/netfilter/log_msg_obj.c \ 508 lib/netfilter/log_obj.c \ 509 lib/netfilter/netfilter.c \ 510 lib/netfilter/nfnl.c \ 511 lib/netfilter/queue.c \ 512 lib/netfilter/queue_msg.c \ 513 lib/netfilter/queue_msg_obj.c \ 514 lib/netfilter/queue_obj.c \ 515 $(NULL) 516lib_libnl_nf_3_la_CPPFLAGS = \ 517 $(lib_cppflags) 518EXTRA_lib_libnl_nf_3_la_DEPENDENCIES = \ 519 libnl-nf-3.sym 520lib_libnl_nf_3_la_LDFLAGS = \ 521 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ 522 -Wl,--version-script=$(srcdir)/libnl-nf-3.sym 523lib_libnl_nf_3_la_LIBADD = \ 524 lib/libnl-3.la \ 525 lib/libnl-route-3.la 526 527lib_LTLIBRARIES += lib/libnl-xfrm-3.la 528 529lib_libnl_xfrm_3_la_SOURCES = \ 530 lib/xfrm/ae.c \ 531 lib/xfrm/lifetime.c \ 532 lib/xfrm/sa.c \ 533 lib/xfrm/selector.c \ 534 lib/xfrm/sp.c \ 535 lib/xfrm/template.c \ 536 $(NULL) 537lib_libnl_xfrm_3_la_CPPFLAGS = \ 538 $(lib_cppflags) 539lib_libnl_xfrm_3_la_LDFLAGS = \ 540 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ 541 -Wl,--version-script=$(srcdir)/libnl-xfrm-3.sym 542EXTRA_lib_libnl_xfrm_3_la_DEPENDENCIES = \ 543 libnl-xfrm-3.sym 544lib_libnl_xfrm_3_la_LIBADD = \ 545 lib/libnl-3.la 546 547lib_cli_ltlibraries_cls = \ 548 lib/cli/cls/basic.la \ 549 lib/cli/cls/cgroup.la \ 550 $(NULL) 551lib_cli_ltlibraries_qdisc = \ 552 lib/cli/qdisc/bfifo.la \ 553 lib/cli/qdisc/blackhole.la \ 554 lib/cli/qdisc/fq_codel.la \ 555 lib/cli/qdisc/hfsc.la \ 556 lib/cli/qdisc/htb.la \ 557 lib/cli/qdisc/ingress.la \ 558 lib/cli/qdisc/pfifo.la \ 559 lib/cli/qdisc/plug.la \ 560 $(NULL) 561 562if ENABLE_CLI 563pkglib_clsdir = $(pkglibdir)/cli/cls 564pkglib_qdiscdir = $(pkglibdir)/cli/qdisc 565pkglib_cls_LTLIBRARIES = $(lib_cli_ltlibraries_cls) 566pkglib_qdisc_LTLIBRARIES = $(lib_cli_ltlibraries_qdisc) 567else 568check_LTLIBRARIES += \ 569 $(lib_cli_ltlibraries_cls) \ 570 $(lib_cli_ltlibraries_qdisc) 571endif 572 573lib_cli_ldflags = \ 574 -module -avoid-version 575 576lib_cli_cls_basic_la_CPPFLAGS = $(lib_cppflags) 577lib_cli_cls_basic_la_LDFLAGS = $(lib_cli_ldflags) 578lib_cli_cls_cgroup_la_CPPFLAGS = $(lib_cppflags) 579lib_cli_cls_cgroup_la_LDFLAGS = $(lib_cli_ldflags) 580lib_cli_qdisc_bfifo_la_CPPFLAGS = $(lib_cppflags) 581lib_cli_qdisc_bfifo_la_LDFLAGS = $(lib_cli_ldflags) 582lib_cli_qdisc_blackhole_la_CPPFLAGS = $(lib_cppflags) 583lib_cli_qdisc_blackhole_la_LDFLAGS = $(lib_cli_ldflags) 584lib_cli_qdisc_fq_codel_la_CPPFLAGS = $(lib_cppflags) 585lib_cli_qdisc_fq_codel_la_LDFLAGS = $(lib_cli_ldflags) 586lib_cli_qdisc_hfsc_la_CPPFLAGS = $(lib_cppflags) 587lib_cli_qdisc_hfsc_la_LDFLAGS = $(lib_cli_ldflags) 588lib_cli_qdisc_htb_la_CPPFLAGS = $(lib_cppflags) 589lib_cli_qdisc_htb_la_LDFLAGS = $(lib_cli_ldflags) 590lib_cli_qdisc_ingress_la_CPPFLAGS = $(lib_cppflags) 591lib_cli_qdisc_ingress_la_LDFLAGS = $(lib_cli_ldflags) 592lib_cli_qdisc_pfifo_la_CPPFLAGS = $(lib_cppflags) 593lib_cli_qdisc_pfifo_la_LDFLAGS = $(lib_cli_ldflags) 594lib_cli_qdisc_plug_la_CPPFLAGS = $(lib_cppflags) 595lib_cli_qdisc_plug_la_LDFLAGS = $(lib_cli_ldflags) 596 597############################################################################### 598 599src_lib_ldflags = 600 601if ENABLE_CLI 602lib_LTLIBRARIES += src/lib/libnl-cli-3.la 603src_lib_ldflags += -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) 604else 605check_LTLIBRARIES += src/lib/libnl-cli-3.la 606endif 607 608src_lib_libnl_cli_3_la_SOURCES = \ 609 src/lib/addr.c \ 610 src/lib/class.c \ 611 src/lib/cls.c \ 612 src/lib/ct.c \ 613 src/lib/exp.c \ 614 src/lib/link.c \ 615 src/lib/neigh.c \ 616 src/lib/qdisc.c \ 617 src/lib/route.c \ 618 src/lib/rule.c \ 619 src/lib/tc.c \ 620 src/lib/utils.c \ 621 $(NULL) 622EXTRA_src_lib_libnl_cli_3_la_DEPENDENCIES = \ 623 libnl-cli-3.sym 624src_lib_libnl_cli_3_la_CPPFLAGS = \ 625 $(warn_cppflags) \ 626 -D_GNU_SOURCE \ 627 -DPKGLIBDIR=\"$(pkglibdir)\" \ 628 -DSYSCONFDIR=\"$(sysconfdir)\" \ 629 -I$(srcdir)/include/linux-private \ 630 -I$(srcdir)/include \ 631 -I$(builddir)/include 632src_lib_libnl_cli_3_la_LDFLAGS = \ 633 $(src_lib_ldflags) \ 634 -Wl,--version-script=$(srcdir)/libnl-cli-3.sym 635src_lib_libnl_cli_3_la_LIBADD = \ 636 lib/libnl-3.la \ 637 lib/libnl-route-3.la \ 638 lib/libnl-nf-3.la \ 639 lib/libnl-genl-3.la \ 640 -ldl \ 641 $(NULL) 642 643############################################################################### 644 645src_cppflags = \ 646 $(warn_cppflags) \ 647 -D_GNU_SOURCE \ 648 -DSYSCONFDIR=\"$(sysconfdir)/libnl\" \ 649 -I$(srcdir)/include/linux-private \ 650 -I$(srcdir)/include \ 651 -I$(builddir)/include 652 653src_ldadd = \ 654 src/lib/libnl-cli-3.la \ 655 lib/libnl-3.la \ 656 lib/libnl-nf-3.la \ 657 lib/libnl-genl-3.la \ 658 lib/libnl-route-3.la \ 659 lib/libnl-idiag-3.la \ 660 $(NULL) 661 662cli_programs = \ 663 src/genl-ctrl-list \ 664 src/idiag-socket-details \ 665 src/nf-ct-add \ 666 src/nf-ct-events \ 667 src/nf-ct-list \ 668 src/nf-exp-add \ 669 src/nf-exp-delete \ 670 src/nf-exp-list \ 671 src/nf-log \ 672 src/nf-monitor \ 673 src/nf-queue \ 674 src/nl-addr-add \ 675 src/nl-addr-delete \ 676 src/nl-addr-list \ 677 src/nl-class-add \ 678 src/nl-class-delete \ 679 src/nl-class-list \ 680 src/nl-classid-lookup \ 681 src/nl-cls-add \ 682 src/nl-cls-delete \ 683 src/nl-cls-list \ 684 src/nl-fib-lookup \ 685 src/nl-link-enslave \ 686 src/nl-link-ifindex2name \ 687 src/nl-link-list \ 688 src/nl-link-name2ifindex \ 689 src/nl-link-release \ 690 src/nl-link-set \ 691 src/nl-link-stats \ 692 src/nl-list-caches \ 693 src/nl-list-sockets \ 694 src/nl-monitor \ 695 src/nl-neigh-add \ 696 src/nl-neigh-delete \ 697 src/nl-neigh-list \ 698 src/nl-neightbl-list \ 699 src/nl-pktloc-lookup \ 700 src/nl-qdisc-add \ 701 src/nl-qdisc-delete \ 702 src/nl-qdisc-list \ 703 src/nl-route-add \ 704 src/nl-route-delete \ 705 src/nl-route-get \ 706 src/nl-route-list \ 707 src/nl-rule-list \ 708 src/nl-tctree-list \ 709 src/nl-util-addr \ 710 $(NULL) 711 712if ENABLE_CLI 713if ENABLE_CLI_INSTALL_BIN 714bin_PROGRAMS += $(cli_programs) 715else 716if ENABLE_CLI_INSTALL_SBIN 717sbin_PROGRAMS += $(cli_programs) 718else 719noinst_PROGRAMS += $(cli_programs) 720endif 721endif 722else 723check_PROGRAMS += $(cli_programs) 724endif 725 726src_genl_ctrl_list_CPPFLAGS = $(src_cppflags) 727src_genl_ctrl_list_LDADD = $(src_ldadd) 728src_idiag_socket_details_CPPFLAGS = $(src_cppflags) 729src_idiag_socket_details_LDADD = $(src_ldadd) 730src_nf_ct_add_CPPFLAGS = $(src_cppflags) 731src_nf_ct_add_LDADD = $(src_ldadd) 732src_nf_ct_events_CPPFLAGS = $(src_cppflags) 733src_nf_ct_events_LDADD = $(src_ldadd) 734src_nf_ct_list_CPPFLAGS = $(src_cppflags) 735src_nf_ct_list_LDADD = $(src_ldadd) 736src_nf_exp_add_CPPFLAGS = $(src_cppflags) 737src_nf_exp_add_LDADD = $(src_ldadd) 738src_nf_exp_delete_CPPFLAGS = $(src_cppflags) 739src_nf_exp_delete_LDADD = $(src_ldadd) 740src_nf_exp_list_CPPFLAGS = $(src_cppflags) 741src_nf_exp_list_LDADD = $(src_ldadd) 742src_nf_log_CPPFLAGS = $(src_cppflags) 743src_nf_log_LDADD = $(src_ldadd) 744src_nf_monitor_CPPFLAGS = $(src_cppflags) 745src_nf_monitor_LDADD = $(src_ldadd) 746src_nf_queue_CPPFLAGS = $(src_cppflags) 747src_nf_queue_LDADD = $(src_ldadd) 748src_nl_addr_add_CPPFLAGS = $(src_cppflags) 749src_nl_addr_add_LDADD = $(src_ldadd) 750src_nl_addr_delete_CPPFLAGS = $(src_cppflags) 751src_nl_addr_delete_LDADD = $(src_ldadd) 752src_nl_addr_list_CPPFLAGS = $(src_cppflags) 753src_nl_addr_list_LDADD = $(src_ldadd) 754src_nl_class_add_CPPFLAGS = $(src_cppflags) 755src_nl_class_add_LDADD = $(src_ldadd) 756src_nl_class_delete_CPPFLAGS = $(src_cppflags) 757src_nl_class_delete_LDADD = $(src_ldadd) 758src_nl_class_list_CPPFLAGS = $(src_cppflags) 759src_nl_class_list_LDADD = $(src_ldadd) 760src_nl_classid_lookup_CPPFLAGS = $(src_cppflags) 761src_nl_classid_lookup_LDADD = $(src_ldadd) 762src_nl_cls_add_CPPFLAGS = $(src_cppflags) 763src_nl_cls_add_LDADD = $(src_ldadd) 764src_nl_cls_delete_CPPFLAGS = $(src_cppflags) 765src_nl_cls_delete_LDADD = $(src_ldadd) 766src_nl_cls_list_CPPFLAGS = $(src_cppflags) 767src_nl_cls_list_LDADD = $(src_ldadd) 768src_nl_fib_lookup_CPPFLAGS = $(src_cppflags) 769src_nl_fib_lookup_LDADD = $(src_ldadd) 770src_nl_link_enslave_CPPFLAGS = $(src_cppflags) 771src_nl_link_enslave_LDADD = $(src_ldadd) 772src_nl_link_ifindex2name_CPPFLAGS = $(src_cppflags) 773src_nl_link_ifindex2name_LDADD = $(src_ldadd) 774src_nl_link_list_CPPFLAGS = $(src_cppflags) 775src_nl_link_list_LDADD = $(src_ldadd) 776src_nl_link_name2ifindex_CPPFLAGS = $(src_cppflags) 777src_nl_link_name2ifindex_LDADD = $(src_ldadd) 778src_nl_link_release_CPPFLAGS = $(src_cppflags) 779src_nl_link_release_LDADD = $(src_ldadd) 780src_nl_link_set_CPPFLAGS = $(src_cppflags) 781src_nl_link_set_LDADD = $(src_ldadd) 782src_nl_link_stats_CPPFLAGS = $(src_cppflags) 783src_nl_link_stats_LDADD = $(src_ldadd) 784src_nl_list_caches_CPPFLAGS = $(src_cppflags) 785src_nl_list_caches_LDADD = $(src_ldadd) 786src_nl_list_sockets_CPPFLAGS = $(src_cppflags) 787src_nl_list_sockets_LDADD = $(src_ldadd) 788src_nl_monitor_CPPFLAGS = $(src_cppflags) 789src_nl_monitor_LDADD = $(src_ldadd) 790src_nl_neigh_add_CPPFLAGS = $(src_cppflags) 791src_nl_neigh_add_LDADD = $(src_ldadd) 792src_nl_neigh_delete_CPPFLAGS = $(src_cppflags) 793src_nl_neigh_delete_LDADD = $(src_ldadd) 794src_nl_neigh_list_CPPFLAGS = $(src_cppflags) 795src_nl_neigh_list_LDADD = $(src_ldadd) 796src_nl_neightbl_list_CPPFLAGS = $(src_cppflags) 797src_nl_neightbl_list_LDADD = $(src_ldadd) 798src_nl_pktloc_lookup_CPPFLAGS = $(src_cppflags) 799src_nl_pktloc_lookup_LDADD = $(src_ldadd) 800src_nl_qdisc_add_CPPFLAGS = $(src_cppflags) 801src_nl_qdisc_add_LDADD = $(src_ldadd) 802src_nl_qdisc_delete_CPPFLAGS = $(src_cppflags) 803src_nl_qdisc_delete_LDADD = $(src_ldadd) 804src_nl_qdisc_list_CPPFLAGS = $(src_cppflags) 805src_nl_qdisc_list_LDADD = $(src_ldadd) 806src_nl_route_add_CPPFLAGS = $(src_cppflags) 807src_nl_route_add_LDADD = $(src_ldadd) 808src_nl_route_delete_CPPFLAGS = $(src_cppflags) 809src_nl_route_delete_LDADD = $(src_ldadd) 810src_nl_route_get_CPPFLAGS = $(src_cppflags) 811src_nl_route_get_LDADD = $(src_ldadd) 812src_nl_route_list_CPPFLAGS = $(src_cppflags) 813src_nl_route_list_LDADD = $(src_ldadd) 814src_nl_rule_list_CPPFLAGS = $(src_cppflags) 815src_nl_rule_list_LDADD = $(src_ldadd) 816src_nl_tctree_list_CPPFLAGS = $(src_cppflags) 817src_nl_tctree_list_LDADD = $(src_ldadd) 818src_nl_util_addr_CPPFLAGS = $(src_cppflags) 819src_nl_util_addr_LDADD = $(src_ldadd) 820 821############################################################################### 822 823tests_cppflags = \ 824 $(warn_cppflags) \ 825 -D_GNU_SOURCE \ 826 -DSYSCONFDIR=\"$(sysconfdir)/libnl\" \ 827 -I$(srcdir)/include/linux-private \ 828 -I$(srcdir)/include \ 829 -I$(builddir)/include 830 831tests_ldadd = \ 832 lib/libnl-3.la \ 833 lib/libnl-nf-3.la \ 834 lib/libnl-genl-3.la \ 835 lib/libnl-route-3.la 836 837check_PROGRAMS += \ 838 tests/test-complex-HTB-with-hash-filters \ 839 tests/test-create-bond \ 840 tests/test-create-bridge \ 841 tests/test-create-geneve \ 842 tests/test-create-ifb \ 843 tests/test-create-ip6tnl \ 844 tests/test-create-ipgre \ 845 tests/test-create-ipgretap \ 846 tests/test-create-ipip \ 847 tests/test-create-ipvlan \ 848 tests/test-create-ipvti \ 849 tests/test-create-macsec \ 850 tests/test-create-macvlan \ 851 tests/test-create-macvtap \ 852 tests/test-create-sit \ 853 tests/test-create-veth \ 854 tests/test-create-vlan \ 855 tests/test-create-vrf \ 856 tests/test-create-vxlan \ 857 tests/test-create-xfrmi \ 858 tests/test-delete-link \ 859 tests/test-loopback-up-down \ 860 tests/test-socket-creation \ 861 tests/test-u32-filter-with-actions \ 862 $(NULL) 863 864tests_test_complex_HTB_with_hash_filters_CPPFLAGS = $(tests_cppflags) 865tests_test_complex_HTB_with_hash_filters_LDADD = $(tests_ldadd) 866tests_test_create_bond_CPPFLAGS = $(tests_cppflags) 867tests_test_create_bond_LDADD = $(tests_ldadd) 868tests_test_create_bridge_CPPFLAGS = $(tests_cppflags) 869tests_test_create_bridge_LDADD = $(tests_ldadd) 870tests_test_create_geneve_CPPFLAGS = $(tests_cppflags) 871tests_test_create_geneve_LDADD = $(tests_ldadd) 872tests_test_create_ifb_CPPFLAGS = $(tests_cppflags) 873tests_test_create_ifb_LDADD = $(tests_ldadd) 874tests_test_create_ip6tnl_CPPFLAGS = $(tests_cppflags) 875tests_test_create_ip6tnl_LDADD = $(tests_ldadd) 876tests_test_create_ipgre_CPPFLAGS = $(tests_cppflags) 877tests_test_create_ipgre_LDADD = $(tests_ldadd) 878tests_test_create_ipgretap_CPPFLAGS = $(tests_cppflags) 879tests_test_create_ipgretap_LDADD = $(tests_ldadd) 880tests_test_create_ipip_CPPFLAGS = $(tests_cppflags) 881tests_test_create_ipip_LDADD = $(tests_ldadd) 882tests_test_create_ipvlan_CPPFLAGS = $(tests_cppflags) 883tests_test_create_ipvlan_LDADD = $(tests_ldadd) 884tests_test_create_ipvti_CPPFLAGS = $(tests_cppflags) 885tests_test_create_ipvti_LDADD = $(tests_ldadd) 886tests_test_create_macsec_CPPFLAGS = $(tests_cppflags) 887tests_test_create_macsec_LDADD = $(tests_ldadd) 888tests_test_create_macvlan_CPPFLAGS = $(tests_cppflags) 889tests_test_create_macvlan_LDADD = $(tests_ldadd) 890tests_test_create_macvtap_CPPFLAGS = $(tests_cppflags) 891tests_test_create_macvtap_LDADD = $(tests_ldadd) 892tests_test_create_sit_CPPFLAGS = $(tests_cppflags) 893tests_test_create_sit_LDADD = $(tests_ldadd) 894tests_test_create_veth_CPPFLAGS = $(tests_cppflags) 895tests_test_create_veth_LDADD = $(tests_ldadd) 896tests_test_create_vlan_CPPFLAGS = $(tests_cppflags) 897tests_test_create_vlan_LDADD = $(tests_ldadd) 898tests_test_create_vrf_CPPFLAGS = $(tests_cppflags) 899tests_test_create_vrf_LDADD = $(tests_ldadd) 900tests_test_create_vxlan_CPPFLAGS = $(tests_cppflags) 901tests_test_create_vxlan_LDADD = $(tests_ldadd) 902tests_test_create_xfrmi_CPPFLAGS = $(tests_cppflags) 903tests_test_create_xfrmi_LDADD = $(tests_ldadd) 904tests_test_delete_link_CPPFLAGS = $(tests_cppflags) 905tests_test_delete_link_LDADD = $(tests_ldadd) 906tests_test_loopback_up_down_CPPFLAGS = $(tests_cppflags) 907tests_test_loopback_up_down_LDADD = $(tests_ldadd) 908tests_test_socket_creation_CPPFLAGS = $(tests_cppflags) 909tests_test_socket_creation_LDADD = $(tests_ldadd) 910tests_test_u32_filter_with_actions_CPPFLAGS = $(tests_cppflags) 911tests_test_u32_filter_with_actions_LDADD = $(tests_ldadd) 912 913check_PROGRAMS += \ 914 tests/test-cache-mngr \ 915 tests/test-genl \ 916 tests/test-nf-cache-mngr 917 918tests_cli_ldadd = \ 919 $(tests_ldadd) \ 920 src/lib/libnl-cli-3.la 921 922tests_test_cache_mngr_CPPFLAGS = $(tests_cppflags) 923tests_test_cache_mngr_LDADD = $(tests_cli_ldadd) 924tests_test_genl_CPPFLAGS = $(tests_cppflags) 925tests_test_genl_LDADD = $(tests_cli_ldadd) 926tests_test_nf_cache_mngr_CPPFLAGS = $(tests_cppflags) 927tests_test_nf_cache_mngr_LDADD = $(tests_cli_ldadd) 928 929 930if WITH_CHECK 931check_programs += tests/check-all 932endif 933 934tests_check_all_SOURCES = \ 935 tests/check-addr.c \ 936 tests/check-all.c \ 937 tests/check-attr.c \ 938 tests/check-ematch-tree-clone.c \ 939 tests/util.h \ 940 $(NULL) 941 942tests_check_all_CPPFLAGS = \ 943 $(tests_cppflags) \ 944 $(CHECK_CFLAGS) 945 946tests_check_all_LDADD = \ 947 $(tests_ldadd) \ 948 $(CHECK_LIBS) 949 950############################################################################### 951 952dist_man8_MANS = \ 953 man/genl-ctrl-list.8 \ 954 man/nl-classid-lookup.8 \ 955 man/nl-pktloc-lookup.8 \ 956 man/nl-qdisc-add.8 \ 957 man/nl-qdisc-delete.8 \ 958 man/nl-qdisc-list.8 \ 959 $(NULL) 960 961############################################################################### 962 963EXTRA_DIST += \ 964 python/README \ 965 \ 966 python/doc/conf.py \ 967 python/doc/core.rst \ 968 python/doc/index.rst \ 969 python/doc/route_addr.rst \ 970 python/doc/route.rst \ 971 \ 972 python/examples/iface.py \ 973 python/examples/nl80211.py \ 974 python/examples/wiphy.py \ 975 \ 976 python/netlink/capi.i \ 977 python/netlink/fixes.h \ 978 python/netlink/__init__.py \ 979 python/netlink/core.py \ 980 python/netlink/util.py \ 981 python/netlink/utils.h \ 982 \ 983 python/netlink/genl/capi.i \ 984 python/netlink/genl/__init__.py \ 985 \ 986 python/netlink/route/capi.i \ 987 python/netlink/route/__init__.py \ 988 python/netlink/route/address.py \ 989 python/netlink/route/link.py \ 990 python/netlink/route/tc.py \ 991 python/netlink/route/links/__init__.py \ 992 python/netlink/route/links/dummy.py \ 993 python/netlink/route/links/inet.py \ 994 python/netlink/route/links/vlan.py \ 995 python/netlink/route/qdisc/__init__.py \ 996 python/netlink/route/qdisc/htb.py \ 997 \ 998 python/tests/test-create-bridge.py 999 1000############################################################################### 1001 1002check_PROGRAMS += $(check_programs) 1003TESTS += $(check_programs) 1004 1005if ENABLE_CLI 1006pkgconfig_DATA += libnl-cli-3.0.pc 1007endif 1008 1009pkgsysconfdir = $(sysconfdir)/libnl 1010pkgsysconf_DATA = \ 1011 etc/pktloc \ 1012 etc/classid 1013 1014EXTRA_DIST += \ 1015 $(pkgsysconf_DATA) \ 1016 libnl-3.sym \ 1017 libnl-cli-3.sym \ 1018 libnl-genl-3.sym \ 1019 libnl-idiag-3.sym \ 1020 libnl-nf-3.sym \ 1021 libnl-route-3.sym \ 1022 libnl-xfrm-3.sym \ 1023 $(NULL) 1024