-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
42 lines (32 loc) · 1.04 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
PACKAGE = github.com/named-data/YaNFD
VERSION = 1.3.0.0
# COMMIT = git rev-parse --short HEAD
# DATE != date
.PHONY: all install clean test coverage
all: yanfd
yanfd: clean
go build -ldflags "-X 'main.Version=${VERSION}'" ${PACKAGE}/cmd/yanfd
install:
install -m 755 yanfd /usr/local/bin
mkdir -p /usr/local/etc/ndn
install -m 644 yanfd.toml.sample /usr/local/etc/ndn
clean:
rm -f yanfd coverage.out
test:
go test ./... -coverprofile=coverage.out
coverage:
go tool cover -html=coverage.out
cleanui:
rm -f yanfdui
yanfdui: cleanui
go build -ldflags "-X 'main.Version=${VERSION}' -X 'main.HttpBaseDir=cmd/yanfdui'" ${PACKAGE}/cmd/yanfdui
# To publish a Windows Store application
# rm -rf publish
# mkdir publish
# go generate github.com/named-data/YaNFD/cmd/yanfdui
# go build -ldflags "-X 'main.Version=${VERSION}' ${PACKAGE}/cmd/yanfdui
# mv yanfdui publish/
# cp -R cmd/yanfdui/static publish/
# cp -R cmd/yanfdui/templates publish/
# cp ./ndn_app.ico publish/
# Then, create the YaNFD-x64.msix file (including publish, yanfd.toml)