forked from trailofbits/uthenticode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (36 loc) · 929 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
37
38
39
40
41
42
43
44
CLANG_FORMAT := clang-format
ALL_SRCS := $(shell \
find src test \
-type f \
\( -path */vendor/* \) -prune \
-o \( -name '*.cpp' -o -name '*.h' \) \
-print \
)
ALL_LISTFILES := $(shell \
find src test cmake \
-type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) \
-print \
)
VERSION := $(shell cat VERSION)
PEPARSE_VERSION ?= v1.3.0
.PHONY: all
all:
@echo "This Makefile does not build anything."
.PHONY: format
format: clang-format cmake-format
.PHONY: clang-format
clang-format:
$(CLANG_FORMAT) -i -style=file $(ALL_SRCS)
git diff --exit-code
.PHONY: cmake-format
cmake-format:
cmake-format -i $(ALL_LISTFILES)
git diff --exit-code
.PHONY: doc
doc:
# Docs only: append the short hash to the version.
VERSION=$(VERSION)-$(shell git rev-parse --short HEAD) \
doxygen Doxyfile
.PHONY: docker
docker:
DOCKER_BUILDKIT=1 docker build -t uthenticode --build-arg PEPARSE_VERSION=$(PEPARSE_VERSION) .