summaryrefslogtreecommitdiff
blob: a208fb68a842065b9545eb5ee37990a2b95ce0ef (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
33
34
35
36
37
38
--- netem/Makefile
+++ netem/Makefile
@@ -1,16 +1,19 @@
 DISTGEN = maketable normal pareto paretonormal
 DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
 
+HOSTCC ?= $(CC)
 LDLIBS += -lm 
 
-%.dist: %.c
-	$(HOSTCC) $(CFLAGS) -o $* $< -lm
-	./$* >$@
-
-%.dist: %.dat
-	./maketable $< >$@
-
 all: $(DISTGEN) $(DISTDATA)
+
+$(DISTGEN):
+	$(HOSTCC) -I../include -O1 -o $@ $@.c -lm
+
+%.dist: %
+	./$* > $@
+
+experimental.dist: maketable experimental.dat
+	./maketable experimental.dat > experimental.dist
 
 install: all
 	mkdir -p $(DESTDIR)/usr/lib/tc
@@ -20,8 +23,3 @@
 
 clean:
 	rm -f $(DISTDATA) $(DISTGEN)
-
-maketable: maketable.c
-	$(HOSTCC) $(CFLAGS) -o $@ $< -lm
-
-