This repository was archived by the owner on May 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (44 loc) · 1.33 KB
/
Makefile
File metadata and controls
56 lines (44 loc) · 1.33 KB
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
.PHONY: build
all: clean build
bootstrap:
@gox -build-toolchain
setup:
@mkdir build || true
go get github.com/tools/godep
@cp bindata.go.tmpl bindata.go
godep get github.com/mitchellh/gox
godep get github.com/jteeuwen/go-bindata/...
godep restore
build:
@go build .
run:
@./watchdb
clean:
@rm watchdb bindata.go >/dev/null 2>&1 || true
@cp bindata.go.tmpl bindata.go
fullclean: clean
@rm -fr build/*
create-zip:
@mkdir -p build/watchdb
@mv watchdb_$(build_os)$(dest_ext) build/watchdb/watchdb$(dest_ext)
@cp README.md build/watchdb/README
@cp conf/example.yml build/watchdb/example-config.yml
@cd build && zip -r watchdb_$(build_os).zip watchdb
@rm -r build/watchdb
build-linux: clean
@go-bindata -prefix sqlite-bin/linux/ sqlite-bin/linux/
@gox -osarch="linux/386"
@gox -osarch="linux/amd64"
@$(MAKE) create-zip build_os=linux_386
@$(MAKE) create-zip build_os=linux_amd64
build-osx: clean
@go-bindata -prefix sqlite-bin/osx/ sqlite-bin/osx/
@gox -os="darwin"
@$(MAKE) create-zip build_os=darwin_386
@$(MAKE) create-zip build_os=darwin_amd64
build-windows: clean
@go-bindata -prefix sqlite-bin/windows/ sqlite-bin/windows/
@gox -os="windows"
@$(MAKE) create-zip build_os=windows_386 dest_ext=.exe
@$(MAKE) create-zip build_os=windows_amd64 dest_ext=.exe
build-all: fullclean build-linux build-windows build-osx clean