-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (40 loc) · 1.13 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
49
50
51
52
53
include build/docker.Makefile
export TINY_LOG=Debug
build: build-root build-sub build-req
build-root:
go build -o bin/tpkiroot -v cmd/tpkiroot/main.go
build-sub:
go build -o bin/tpkisub -v cmd/tpkisub/main.go
build-req:
go build -o bin/tpkireq -v cmd/tpkireq/main.go
config-sub:
mkdir -p $(CURDIR)/bin/sub_data/work
cp configs/tinypki.sub.example.json $(CURDIR)/bin/sub_data/work/sub.config.json
config-root:
mkdir -p $(CURDIR)/bin/root_data/work
cp configs/tinypki.root.example.json $(CURDIR)/bin/root_data/work/root.config.json
run-root: build-root config-root
export TINY_ROOT_PATH=$(CURDIR)/bin/root_data; \
./bin/tpkiroot
rerun-root:
export TINY_ROOT_PATH=$(CURDIR)/bin/root_data; \
./bin/tpkiroot
run-sub: build-sub config-sub
export TINY_ROOT_PATH=$(CURDIR)/bin/sub_data; \
./bin/tpkisub
rerun-sub:
export TINY_ROOT_PATH=$(CURDIR)/bin/sub_data; \
./bin/tpkisub
run-req: build-req
./bin/tpkireq
clean:
go clean
rm -f bin/tpkiroot
rm -f bin/tpkisub
rm -f bin/tpkireq
rm -rf bin/sub_data
rm -rf bin/root_data
deps:
go mod download
test:
go test -v ./...