diff options
| author | Felix Hanley <felix@userspace.com.au> | 2018-02-27 04:19:12 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2018-02-27 04:19:12 +0000 |
| commit | b0cfa1d27cc19f0712e579f5f9357d276b11be6b (patch) | |
| tree | 87f011ff3f4591ea1b9002f00ac1cf554aba2e65 /Makefile | |
| parent | a6e10f4b154214903694cf96d57d942e080b1bd1 (diff) | |
| download | dhtsearch-b0cfa1d27cc19f0712e579f5f9357d276b11be6b.tar.gz dhtsearch-b0cfa1d27cc19f0712e579f5f9357d276b11be6b.tar.bz2 | |
Fix cross-compilation
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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: |
