-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
36 lines (28 loc) · 813 Bytes
/
Makefile
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
BINS = ./naïve-c ./turbo-c ./lightning-cpp
BENCHES = \
target/release/naïve \
target/release/dumbest \
target/release/glacial target/release/slow \
target/release/fast target/release/speedy \
target/release/turbo ./turbo-c \
target/release/lightning ./lightning-cpp \
target/release/ludicrous \
target/release/serious
CC = clang
CPP = clang++
CFLAGS = -Wall -O3
all: $(BINS)
cargo build --release
./naïve-c: naïve.c
$(CC) $(CFLAGS) -o naïve-c naïve.c
./turbo-c: turbo.c
$(CC) $(CFLAGS) -o turbo-c turbo.c
./lightning-cpp: lightning.cpp
$(CPP) $(CFLAGS) -o lightning-cpp lightning.cpp
bench: $(BENCHES)
hyperfine --warmup 2 $(BENCHES) --export-markdown BENCH.md
check: $(BENCHES)
@for B in $(BENCHES); do echo -n "$$B "; $$B | md5sum ; done
clean:
-rm -f $(BINS)
-cargo clean