aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2018-02-27 04:19:12 +0000
committerFelix Hanley <felix@userspace.com.au>2018-02-27 04:19:12 +0000
commitb0cfa1d27cc19f0712e579f5f9357d276b11be6b (patch)
tree87f011ff3f4591ea1b9002f00ac1cf554aba2e65 /Makefile
parenta6e10f4b154214903694cf96d57d942e080b1bd1 (diff)
downloaddhtsearch-b0cfa1d27cc19f0712e579f5f9357d276b11be6b.tar.gz
dhtsearch-b0cfa1d27cc19f0712e579f5f9357d276b11be6b.tar.bz2
Fix cross-compilation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 40685e4..2ddb5d0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-TARGETS = linux-386 linux-amd64 linux-arm linux-arm64 darwin-amd64 windows-386 windows-amd64
+TARGETS = freebsd-amd64 linux-386 linux-amd64 linux-arm linux-arm64 darwin-amd64 windows-386 windows-amd64
CMD = dhtsearch
VERSION ?= $(shell git describe --tags --always)
SRC = $(shell find . -type f -name '*.go')
@@ -16,7 +16,7 @@ build: check-env ## Build binary for current platform
standalone : TAGS = sqlite
$(BINARIES): $(SRC)
- env GOOS=`echo $@ |cut -d'-' -f2` GOARCH=`echo $@ |cut -d'-' -f3 |cut -d'.' -f1` cd cmd && go build -o ../$@ $(LDFLAGS)
+ cd cmd && env GOOS=`echo $@ |cut -d'-' -f2` GOARCH=`echo $@ |cut -d'-' -f3 |cut -d'.' -f1` go build -o ../$@ $(LDFLAGS)
test: ## Run tests and create coverage report
go test -short -coverprofile=coverage.out ./...
@@ -27,6 +27,7 @@ lint:
clean: check-env ## Clean up temp files and binaries
rm -f $(BINARIES)
+ rm -f $(CMD)
rm -rf coverage*
check-env: