-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (29 loc) · 1.06 KB
/
Makefile
File metadata and controls
41 lines (29 loc) · 1.06 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
GOARCH ?= amd64
GOOS ?= linux
GO ?= env GOOS=$(GOOS) GOARCH=$(GOARCH) go
BUILD ?= $(abspath build)
BUILDARCH ?= $(BUILD)/$(GOOS)-$(GOARCH)
all:
GOOS=linux GOARCH=amd64 $(MAKE) binaries-all
GOOS=linux GOARCH=arm $(MAKE) binaries-all
GOOS=darwin GOARCH=amd64 $(MAKE) binaries-all
install: all
binaries-all: $(BUILDARCH)/fk-lan-sync $(BUILDARCH)/fk-log-analyzer $(BUILDARCH)/fk-data-tool $(BUILDARCH)/fk-wifi-tool
$(BUILD):
mkdir -p $(BUILD)
$(BUILDARCH):
mkdir -p $(BUILDARCH)
rebuild:
go get -u github.com/fieldkit/data-protocol
go get -u github.com/fieldkit/app-protocol
$(BUILDARCH)/fk-lan-sync: lan-sync/*.go utilities/*.go
$(GO) build -o $(BUILDARCH)/fk-lan-sync lan-sync/*.go
$(BUILDARCH)/fk-log-analyzer: log-analyzer/*.go utilities/*.go
$(GO) build -o $(BUILDARCH)/fk-log-analyzer log-analyzer/*.go
$(BUILDARCH)/fk-data-tool: data-tool/*.go utilities/*.go
$(GO) build -o $(BUILDARCH)/fk-data-tool data-tool/*.go
$(BUILDARCH)/fk-wifi-tool: wifi-tool/*.go utilities/*.go
$(GO) build -o $(BUILDARCH)/fk-wifi-tool wifi-tool/*.go
clean:
rm -rf $(BUILD)
veryclean: