summaryrefslogtreecommitdiffstats
path: root/netem/Makefile
blob: ba4c5a76baab5ad3536a84351b05364d93eed3ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# SPDX-License-Identifier: GPL-2.0
include ../config.mk

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)