Fix Makefile

This commit is contained in:
n0vad3v 2020-03-04 20:54:09 +08:00
parent 10fe5e3f80
commit 156f815935
No known key found for this signature in database
GPG Key ID: 8D42A0E699E50639
2 changed files with 12 additions and 10 deletions

View File

@ -1,13 +1,15 @@
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=webp-server
BINARY_LINUX=$(BINARY_NAME)_linux-amd64
ifeq ($(shell uname),Linux)
OS=linux
else
OS=darwin
endif
ifeq ($(shell uname -m),aarch64)
ARCH=arm64
else
ARCH=amd64
endif
all: build
build:
$(GOBUILD) -o $(BINARY_LINUX) -v
test:
$(GOTEST) -v ./...
./scripts/build.sh $(OS) $(ARCH)

0
scripts/build.sh Normal file → Executable file
View File