-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 784 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 784 Bytes
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
CXXFLAGS += -std=c++20 -march=native -mtune=native -Wall -Wextra -I ./mst
LDLIBS += -lgtest -lbenchmark -lpthread
DEPENDENCIES = $(shell find . -name "*.[ch]pp")
DEBUG := -g -O0 -funroll-loops -fno-omit-frame-pointer
RELEASE := -O3
all: test benchmark
test: bin/test
./bin/test --gtest_color=yes
bin/test: test/test.cpp $(DEPENDENCIES)
@mkdir -p bin
$(CXX) $(CXXFLAGS) $(DEBUG) -o $@ $< $(LDLIBS)
benchmark: bin/density bin/size
./bin/density --benchmark_color=yes
./bin/size --benchmark_color=yes
bin/density: main.cpp $(DEPENDENCIES)
@mkdir -p bin
$(CXX) $(CXXFLAGS) $(RELEASE) -DDENSITYBENCH -o $@ $< $(LDLIBS)
bin/size: main.cpp $(DEPENDENCIES)
@mkdir -p bin
$(CXX) $(CXXFLAGS) $(RELEASE) -DSIZEBENCH -o $@ $< $(LDLIBS)
.PHONY: clean dataset
clean:
@rm -r ./bin