mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-12-31 22:32:06 +00:00
Explicit link with pthread is not needed when linking dynamically. Even
static link with recent libdb does not pull in the code that uses
pthread. Finally, the configure check introduced in commit a25df4887d
(configure: Check for Berkeley DB for arpd compilation) does not add
-lpthread to its link command.
This change allows arpd build with toolchains that do not provide
threads support.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
43 lines
982 B
Makefile
43 lines
982 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
SSOBJ=ss.o ssfilter.o
|
|
LNSTATOBJ=lnstat.o lnstat_util.o
|
|
|
|
TARGETS=ss nstat ifstat rtacct lnstat
|
|
|
|
include ../config.mk
|
|
|
|
ifeq ($(HAVE_BERKELEY_DB),y)
|
|
TARGETS += arpd
|
|
endif
|
|
|
|
all: $(TARGETS)
|
|
|
|
ss: $(SSOBJ)
|
|
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
|
|
nstat: nstat.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o nstat nstat.c $(LDLIBS) -lm
|
|
|
|
ifstat: ifstat.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o ifstat ifstat.c $(LDLIBS) -lm
|
|
|
|
rtacct: rtacct.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o rtacct rtacct.c $(LDLIBS) -lm
|
|
|
|
arpd: arpd.c
|
|
$(QUIET_CC)$(CC) $(CFLAGS) -I$(DBM_INCLUDE) $(LDFLAGS) -o arpd arpd.c $(LDLIBS) -ldb
|
|
|
|
ssfilter.c: ssfilter.y
|
|
$(QUIET_YACC)bison ssfilter.y -o ssfilter.c
|
|
|
|
lnstat: $(LNSTATOBJ)
|
|
$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
|
|
install: all
|
|
install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
|
|
ln -sf lnstat $(DESTDIR)$(SBINDIR)/rtstat
|
|
ln -sf lnstat $(DESTDIR)$(SBINDIR)/ctstat
|
|
|
|
clean:
|
|
rm -f *.o $(TARGETS) ssfilter.c
|