-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 744 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (29 loc) · 744 Bytes
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
GOPATH=$(shell pwd)
export GOPATH
COLORDIR=pkg/
SERVERDIR=server/
CLIENTDIR=client/
COMMONDIR=common/
SERVERSRC=$(wildcard $(SERVERDIR)/*.go)
CLIENTSRC=$(wildcard $(CLIENTDIR)/*.go)
COMMONSRC=$(wildcard $(COMMONDIR)/*.go)
all: color master serverNode clientNode
color:
@if [ ! -d $(COLORDIR) ]; then \
go get github.com/fatih/color; \
fi
master: master.go $(COMMONSRC)
go build -o master
serverNode: $(SERVERSRC) $(COMMONSRC)
go build -o serverNode ./server
clientNode: $(CLIENTSRC) $(COMMONSRC)
go build -o clientNode ./client
clean:
rm -rf master
rm -rf serverNode
rm -rf clientNode
cleanup:
@echo -n 'Killing stray server and client processes... '
@-pkill serverNode | true
@-pkill clientNode | true
@echo 'done.'