mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-04 23:36:47 +00:00

New lib/mnl_utils.c fails to compile if libmnl is not installed:
mnl_utils.c:9:10: fatal error: libmnl/libmnl.h: No such file or directory
9 | #include <libmnl/libmnl.h>
Make it dependent on HAVE_MNL.
Fixes: 72858c7b77
("lib: Extract from devlink/mnlg a helper, mnlu_socket_open()")
Signed-off-by: David Ahern <dsahern@gmail.com>
33 lines
643 B
Makefile
33 lines
643 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
include ../config.mk
|
|
|
|
CFLAGS += -fPIC
|
|
|
|
UTILOBJ = utils.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
|
|
inet_proto.o namespace.o json_writer.o json_print.o \
|
|
names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o
|
|
|
|
ifeq ($(HAVE_ELF),y)
|
|
ifeq ($(HAVE_LIBBPF),y)
|
|
UTILOBJ += bpf_libbpf.o
|
|
endif
|
|
endif
|
|
|
|
NLOBJ=libgenl.o libnetlink.o
|
|
ifeq ($(HAVE_MNL),y)
|
|
NLOBJ += mnl_utils.o
|
|
endif
|
|
|
|
all: libnetlink.a libutil.a
|
|
|
|
libnetlink.a: $(NLOBJ)
|
|
$(QUIET_AR)$(AR) rcs $@ $^
|
|
|
|
libutil.a: $(UTILOBJ) $(ADDLIB)
|
|
$(QUIET_AR)$(AR) rcs $@ $^
|
|
|
|
install:
|
|
|
|
clean:
|
|
rm -f $(NLOBJ) $(UTILOBJ) $(ADDLIB) libnetlink.a libutil.a
|