-
Notifications
You must be signed in to change notification settings - Fork 33
/
Makefile
76 lines (67 loc) · 1.49 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
67
68
69
70
71
72
73
74
75
76
# Makefile for Golang Network Stack
SHELL = /bin/bash
# Variables
NAME := network
PKGS := $(shell go list ./...) # tr '\n' ' ' ?
# Basic building
install: clean setup depend build
reinstall: clean setup build
list:
@echo $(PKGS)
depend:
go get -u github.com/hsheth2/logs
go get -u github.com/hsheth2/notifiers
go get -u github.com/pkg/profile
go get -u github.com/hsheth2/water
go get -u github.com/hsheth2/water/waterutil
go get golang.org/x/tools/cmd/...
-go get -t ./...
build:
go clean ./...
go install ./...
clean:
-rm -rf *.static.orig
-rm -rf *.static
-rm -f *.test
-rm -f *.cover
-rm -f *.html
-rm -f httpTest
-rm -rf tapip
go clean ./...
setup:
./tap_setup.sh
./arp_setup.sh
# line counting
lines:
find ./ -name '*.go' | xargs wc -l
# Checks for style and errors
check: fmt lint vet errcheck
fmt:
@echo "Formatting Files..."
goimports -l -w ./
@echo "Finished Formatting"
vet:
go vet ./...
lint:
go get github.com/golang/lint/golint
golint ./...
errcheck:
errcheck $(PKGS)
# start documentation
doc:
godoc -http=:6060
# Different tests that could be run on the network's code
test: test_network
test_deps:
./run_test.sh github.com/hsheth2/logs
./run_test.sh github.com/hsheth2/notifiers
test_network: test_udp test_tcp test_ping
test_udp:
./run_test.sh github.com/hsheth2/gonet/udp
test_tcp:
./run_test.sh github.com/hsheth2/gonet/tcp
test_ping:
./run_test.sh github.com/hsheth2/gonet/ping
test_tap:
# for testing water
./run_test.sh github.com/hsheth2/gonet/physical