Makefile 887 Bytes
Newer Older
1
2
3
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

one's avatar
one committed
4
5
6
7
8
9
10
CPPSOURCES := $(shell find $(CURDIR) \
	-path $(CURDIR)/.git -prune -o \
	-path $(CURDIR)/.venv -prune -o \
	-path $(CURDIR)/build -prune -o \
	-path $(CURDIR)/third_party -prune -o \
	-regextype posix-extended -regex '.*\.(c|cpp|h|hpp|cc|cxx|cu)' -print)
CLANG_FORMAT ?= clang-format-14
11

12
.PHONY: cpplint cppformat cppbuild thirdparty postinstall
13
14

cpplint:
one's avatar
one committed
15
	$(CLANG_FORMAT) --verbose --dry-run --Werror $(CPPSOURCES)
16
17

cppformat:
one's avatar
one committed
18
	$(CLANG_FORMAT) --verbose -i $(CPPSOURCES)
19
20
21

cppbuild:
	cd ./superbench/benchmarks/ && bash build.sh
22

23
24
25
directxbuild:
	cd ./superbench/benchmarks/ && build.bat

26
27
28
thirdparty:
	cd ./third_party/ && make all

29
30
31
32
postinstall:
ifeq ($(shell which ansible-galaxy),)
	$(error 'Cannot find ansible-galaxy')
else
33
	ansible-galaxy collection install ansible.posix ansible.utils community.crypto
34
endif