-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 883 Bytes
/
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
UTESTS?=$$(go list ./... | egrep -v "vendor|integration")
ITESTS?=$$(go list ./... | egrep "integration")
BINARY=journal
ENTRY=main.go
default: build
all: clean build_all install
build:
go build -o ${BINARY} ${ENTRY}
build-all:
GOOS=darwin GOARCH=amd64 go build -v -o ${BINARY}-mac-amd64 ${ENTRY}
GOOS=linux GOARCH=386 go build -v -o ${BINARY}-linux-386 ${ENTRY}
GOOS=linux GOARCH=amd64 go build -v -o ${BINARY}-linux-amd64 ${ENTRY}
GOOS=windows GOARCH=386 go build -v -o ${BINARY}-windows-386.exe ${ENTRY}
GOOS=windows GOARCH=amd64 go build -v -o ${BINARY}-windows-amd64.exe ${ENTRY}
install:
go install
clean:
go clean
find ${ROOT_DIR} -name '${BINARY}[-?][a-zA-Z0-9]*[-?][a-zA-Z0-9]*' -delete
find ${ROOT_DIR} -name '${BINARY}' -delete
test: utest itest
itest:
go test $(VERBOSE) $(ITESTS) -failfast -cover
utest:
go test $(VERBOSE) $(UTESTS) -failfast -cover