]> git.proxmox.com Git - mirror_iproute2.git/blob - lib/Makefile
Only compile mnl_utils when HAVE_MNL is defined
[mirror_iproute2.git] / lib / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 include ../config.mk
3
4 CFLAGS += -fPIC
5
6 UTILOBJ = utils.o rt_names.o ll_map.o ll_types.o ll_proto.o ll_addr.o \
7 inet_proto.o namespace.o json_writer.o json_print.o \
8 names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o
9
10 ifeq ($(HAVE_ELF),y)
11 ifeq ($(HAVE_LIBBPF),y)
12 UTILOBJ += bpf_libbpf.o
13 endif
14 endif
15
16 NLOBJ=libgenl.o libnetlink.o
17 ifeq ($(HAVE_MNL),y)
18 NLOBJ += mnl_utils.o
19 endif
20
21 all: libnetlink.a libutil.a
22
23 libnetlink.a: $(NLOBJ)
24 $(QUIET_AR)$(AR) rcs $@ $^
25
26 libutil.a: $(UTILOBJ) $(ADDLIB)
27 $(QUIET_AR)$(AR) rcs $@ $^
28
29 install:
30
31 clean:
32 rm -f $(NLOBJ) $(UTILOBJ) $(ADDLIB) libnetlink.a libutil.a