forked from jcramb/cedict
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (37 loc) · 832 Bytes
/
Makefile
File metadata and controls
51 lines (37 loc) · 832 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
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2020 John Cramb. All rights reserved.
# Copyright 2024 Sebastian Scheibe. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
# tools
GO = go
GOMOD = $(GO) mod
GOLINT = golint
GOLIST = $(shell $(GO) list ./... | grep -v vendor)
# bins
CMD = cedict
# src
REPO = github.com/Ecostack/cedict
LDFLAGS= -ldflags="-s -w"
all: install cedict
install:
$(GO) install $(LDFLAGS) ./...
build:
$(GO) build $(LDFLAGS) ./...
.PHONY: $(CMD)
$(CMD):
$(GO) build $(LDFLAGS) ./cmd/$@
fmt:
$(GO) fmt ./...
vet:
$(GO) vet ./...
lint: $(GOLINT)
$(GOLINT) .
test:
$(GO) test -race -v -covermode atomic -coverprofile=profile.cov ./...
test-ci:
$(GO) test -race -v ./...
clean:
rm -f $(CMD)
rm -rf ./testdata
$(GOLINT):
go get -u golang.org/x/lint/golint