mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-11-03 20:47:11 +00:00
This renames Config to config.mk and includes more Make input. Now configure generates all the required CFLAGS and LDLIBS for the optional libraries. Also, use pkg-config to test for libelf, rather than using a test program. This makes it consistent with other libraries. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
23 lines
396 B
Makefile
23 lines
396 B
Makefile
include ../config.mk
|
|
|
|
ifeq ($(HAVE_MNL),y)
|
|
|
|
DEVLINKOBJ = devlink.o mnlg.o
|
|
TARGETS=devlink
|
|
|
|
CFLAGS += $(shell $(PKG_CONFIG) libmnl --cflags)
|
|
LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
|
|
|
|
endif
|
|
|
|
all: $(TARGETS) $(LIBS)
|
|
|
|
devlink: $(DEVLINKOBJ)
|
|
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
|
|
install: all
|
|
install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
|
|
|
|
clean:
|
|
rm -f $(DEVLINKOBJ) $(TARGETS)
|