File size: 657 Bytes
5c1df24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
CXX ?= c++
CXXFLAGS ?= -O3 -std=c++17 -Wall -Wextra
CPPFLAGS += -Iinclude
BUILD := build/native
TESTS := $(patsubst tests/%.cpp,$(BUILD)/%,$(wildcard tests/test*.cpp))

.PHONY: test quick bench
test: $(TESTS)
	@set -e; for test in $(TESTS); do "$$test"; done

$(TESTS): $(BUILD)/%: tests/%.cpp include/guardshift.hpp
	@mkdir -p $(BUILD)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) $< -o $@

$(BUILD)/bench: bench/bench.cpp include/guardshift.hpp
	@mkdir -p $(BUILD)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DNDEBUG $< -o $@

quick: $(BUILD)/bench
	$(BUILD)/bench --quick --trace replay/azure-code.csv

bench: $(BUILD)/bench
	$(BUILD)/bench --full --trace replay/azure-code.csv