-
Notifications
You must be signed in to change notification settings - Fork 6
/
bench.mk
41 lines (34 loc) · 1.45 KB
/
bench.mk
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
39
40
41
GUILE=guile
PATH:=$(top_srcdir)/deps/pflua/deps/luajit/usr/local/bin:$(PATH)
ENGINES:=libpcap linux-bpf linux-ebpf bpf-lua pflua pflua-native
CSV:=$(addsuffix .csv, $(ENGINES))
ITERATIONS?=20
export LD_LIBRARY_PATH := $(top_srcdir)/deps/pflua/deps/dynasm:$(LD_LIBRARY_PATH)
all: $(PNG)
csv: $(CSV)
maintainer-clean:
rm -f $(CSV) $(PNG)
%.csv: $(top_srcdir)/bench.lua $(SAVEFILE) filters
luajit $(top_srcdir)/bench.lua $(SAVEFILE) filters $* $(ITERATIONS) > [email protected]
mv [email protected] $@
$(PNG): Makefile $(top_srcdir)/bench.mk $(CSV)
$(MAKE) check-png-deps
~/src/guile-charting/examples/plot-data.scm $(TITLE) "$@" $(CSV)
check-png-deps:
@$(GUILE) -c '(exit (string-prefix? "2." (effective-version)))' 2>/dev/null || ( \
echo "Guile 2.x required to make graphs. Try 'sudo apt-get install guile-2.0'."; \
echo; \
exit 1 )
@$(GUILE) -c '(use-modules (cairo))' 2>/dev/null || ( \
echo "Guile-Cairo required to make graphs."; \
echo "Install from http://www.nongnu.org/guile-cairo/; probably you will"; \
echo "want to run its configure with --prefix=/usr."; \
echo; \
exit 1 )
@$(GUILE) -c '(use-modules (charting))' 2>/dev/null || ( \
echo "Guile-Charting required to make graphs."; \
echo "Check out from https://gitorious.org/guile-charting."; \
echo "I recommend not installing it. Instead after configuring"; \
echo "and building, run this make target within the 'env' script"; \
echo "in the guile-charting build directory."; \
exit 1 )