Disable static compilation for osx + minor optimizations (#541)
parent
0ebb51cb46
commit
9f025bf631
13
v2/Makefile
13
v2/Makefile
|
@ -3,12 +3,17 @@ GOCMD=go
|
|||
GOBUILD=$(GOCMD) build
|
||||
GOMOD=$(GOCMD) mod
|
||||
GOTEST=$(GOCMD) test
|
||||
GOGET=$(GOCMD) get
|
||||
GOFLAGS := -v
|
||||
LDFLAGS := -s -w
|
||||
|
||||
ifneq ($(shell go env GOOS),darwin)
|
||||
LDFLAGS := -extldflags "-static"
|
||||
endif
|
||||
|
||||
all: build
|
||||
build:
|
||||
$(GOBUILD) -v -ldflags="-extldflags=-static" -o "subfinder" cmd/subfinder/main.go
|
||||
$(GOBUILD) $(GOFLAGS) -ldflags '$(LDFLAGS)' -o "subfinder" cmd/subfinder/main.go
|
||||
test:
|
||||
$(GOTEST) -v ./...
|
||||
$(GOTEST) $(GOFLAGS) ./...
|
||||
tidy:
|
||||
$(GOMOD) tidy
|
||||
$(GOMOD) tidy
|
||||
|
|
Loading…
Reference in New Issue