1# SPDX-License-Identifier: GPL-2.0 2include ../config.mk 3 4CFLAGS += -fPIC 5 6UTILOBJ = utils.o utils_math.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 json_print_math.o \ 8 names.o color.o bpf_legacy.o bpf_glue.o exec.o fs.o cg_map.o 9 10ifeq ($(HAVE_ELF),y) 11ifeq ($(HAVE_LIBBPF),y) 12UTILOBJ += bpf_libbpf.o 13endif 14endif 15 16NLOBJ=libgenl.o libnetlink.o 17ifeq ($(HAVE_MNL),y) 18NLOBJ += mnl_utils.o 19endif 20 21all: libnetlink.a libutil.a 22 23libnetlink.a: $(NLOBJ) 24 $(QUIET_AR)$(AR) rcs $@ $^ 25 26libutil.a: $(UTILOBJ) $(ADDLIB) 27 $(QUIET_AR)$(AR) rcs $@ $^ 28 29install: 30 31clean: 32 rm -f $(NLOBJ) $(UTILOBJ) $(ADDLIB) libnetlink.a libutil.a 33