-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
66 lines (42 loc) · 1.29 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
54
55
56
57
58
59
60
61
62
63
64
65
66
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path))
all: client server
build: client-build server-build
static: client-amd64-static server-amd64-static
amd64: client-amd64 server-amd64
pi3: client-rpi3 server-rpi3
pi4: client-rpi4 server-rpi4
client:
cd cmd/autoygg-client && $(MAKE)
server:
cd cmd/autoygg-server && $(MAKE)
client-build:
cd cmd/autoygg-client && $(MAKE) build
server-build:
cd cmd/autoygg-server && $(MAKE) build
client-amd64:
cd cmd/autoygg-client && $(MAKE) amd64
server-amd64:
cd cmd/autoygg-server && $(MAKE) amd64
client-amd64-static:
cd cmd/autoygg-client && $(MAKE) amd64-static
server-amd64-static:
cd cmd/autoygg-server && $(MAKE) amd64-static
client-rpi3:
cd cmd/autoygg-client && $(MAKE) rpi3
server-rpi3:
cd cmd/autoygg-server && $(MAKE) rpi3
client-rpi4:
cd cmd/autoygg-client && $(MAKE) rpi4
server-rpi4:
cd cmd/autoygg-server && $(MAKE) rpi4
dev: gofmt client-dev server-dev
gofmt:
gofmt -s -w .
client-dev:
cd cmd/autoygg-client && $(MAKE) dev
server-dev:
cd cmd/autoygg-server && $(MAKE) dev
test: client-amd64 server-amd64
cd docker-test && docker build . -t autoygg/test
docker run --rm -ti --net=host --cap-add=NET_ADMIN --device=/dev/net/tun --name autoygg-test -v $(mkfile_dir):/autoygg autoygg/test