#
# Copyright 2021 VMware, Inc.
# SPDX-License-Identifier: PostgreSQL
#

CC := $(CXX)

CPPFLAGS := -I$(shell pg_config --includedir)
LDFLAGS := -pthread -L$(shell pg_config --libdir)
LDLIBS := -lbenchmark -lpq

main: main.o

.PHONY: clean
clean:
	rm -f main main.o

.PHONY: check
check: main
	sudo cpupower frequency-set --governor performance
	./main --benchmark_repetitions=5
	sudo cpupower frequency-set --governor powersave
