httpx/Makefile

20 lines
350 B
Makefile
Raw Normal View History

2021-03-30 19:47:28 +03:00
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOMOD=$(GOCMD) mod
GOTEST=$(GOCMD) test
GOFLAGS := -v
LDFLAGS := -s -w
ifneq ($(shell go env GOOS),darwin)
LDFLAGS := -extldflags "-static"
endif
2021-03-30 19:47:28 +03:00
all: build
build:
$(GOBUILD) $(GOFLAGS) -ldflags '$(LDFLAGS)' -o "httpx" cmd/httpx/httpx.go
2021-03-30 19:47:28 +03:00
test:
$(GOTEST) $(GOFLAGS) ./...
2021-03-30 19:47:28 +03:00
tidy:
$(GOMOD) tidy