mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-17 15:03:29 +08:00
1a7943bcf3
The tc program searches LIBDIR by default for the .dist files, and that defaults to /usr/lib. But the netem subdir has /lib/ hardcoded which means the default build+install results in the files not being found. Further, these are plain text files which are read at runtime, so it doesn't make sense to give them executable bits. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
30 lines
617 B
Makefile
30 lines
617 B
Makefile
DISTGEN = maketable normal pareto paretonormal
|
|
DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
|
|
|
|
HOSTCC ?= $(CC)
|
|
CCOPTS = $(CBUILD_CFLAGS)
|
|
LDLIBS += -lm
|
|
|
|
all: $(DISTGEN) $(DISTDATA)
|
|
|
|
$(DISTGEN):
|
|
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
|
|
|
|
%.dist: %
|
|
./$* > $@
|
|
|
|
experimental.dist: maketable experimental.dat
|
|
./maketable experimental.dat > experimental.dist
|
|
|
|
stats: stats.c
|
|
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
|
|
|
|
install: all
|
|
mkdir -p $(DESTDIR)$(LIBDIR)/tc
|
|
for i in $(DISTDATA); \
|
|
do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
|
|
done
|
|
|
|
clean:
|
|
rm -f $(DISTDATA) $(DISTGEN)
|