-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
48 lines (38 loc) · 1.69 KB
/
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
45
46
47
48
# SPDX-FileCopyrightText: 2020 The tls-interop-runner Authors
# SPDX-License-Identifier: CC0-1.0
TESTDATA_DIR = generated/test-inputs
BIN_DIR = bin
UTIL = ${BIN_DIR}/util
UTIL_SRCS = $(wildcard cmd/util/*.go)
VALIDATEPCAP = ${BIN_DIR}/validatepcap
VALIDATEPCAP_SRCS = $(wildcard cmd/validatepcap/*.go)
RUNNER = ${BIN_DIR}/runner
RUNNER_SRCS = $(wildcard cmd/runner/*.go)
all: testinputs
util: $(UTIL_SRCS)
mkdir -p ${BIN_DIR}
go get ./cmd/util/...
go build -o ${UTIL} ./cmd/util/...
validatepcap: $(VALIDATEPCAP_SRCS)
mkdir -p ${BIN_DIR}
go get ./cmd/validatepcap/...
go build -o ${VALIDATEPCAP} ./cmd/validatepcap/...
runner: $(RUNNER_SRCS)
mkdir -p ${BIN_DIR}
go get ./cmd/runner/...
go build -o ${RUNNER} ./cmd/runner/...
.PHONY: testinputs
testinputs: util
mkdir -p ${TESTDATA_DIR}
${UTIL} -make-root -out ${TESTDATA_DIR}/root.crt -key-out ${TESTDATA_DIR}/root.key -host root.com
${UTIL} -make-intermediate -cert-in ${TESTDATA_DIR}/root.crt -key-in ${TESTDATA_DIR}/root.key -out ${TESTDATA_DIR}/example.crt -key-out ${TESTDATA_DIR}/example.key -host example.com
${UTIL} -make-intermediate -cert-in ${TESTDATA_DIR}/root.crt -key-in ${TESTDATA_DIR}/root.key -out ${TESTDATA_DIR}/client-facing.crt -key-out ${TESTDATA_DIR}/client-facing.key -host client-facing.com
${UTIL} -make-dc -cert-in ${TESTDATA_DIR}/example.crt -key-in ${TESTDATA_DIR}/example.key -out ${TESTDATA_DIR}/dc.txt
${UTIL} -make-ech -out ${TESTDATA_DIR}/ech_configs -key-out ${TESTDATA_DIR}/ech_key -host client-facing.com
${UTIL} -make-ech -out ${TESTDATA_DIR}/ech_configs_invalid -key-out /dev/null -host client-facing.com
clean:
rm -fr ${BIN_DIR}
rm -fr ${TESTDATA_DIR}
clean-docker:
docker network prune
docker builder prune