mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
Merge pull request #905 from TheRealKeto/makefile/various-changes
Various changes and fixes
This commit is contained in:
commit
8b867c29ed
1 changed files with 8 additions and 9 deletions
15
Makefile
15
Makefile
|
@ -2,15 +2,14 @@ TARGET ?= bettercap
|
|||
PACKAGES ?= core firewall log modules network packets session tls
|
||||
PREFIX ?= /usr/local
|
||||
GO ?= go
|
||||
GOFLAGS ?=
|
||||
|
||||
all: build
|
||||
|
||||
build: resources
|
||||
$(GO) $(GOFLAGS) build -o $(TARGET) .
|
||||
$(GOFLAGS) $(GO) build -o $(TARGET) .
|
||||
|
||||
build_with_race_detector: resources
|
||||
$(GO) $(GOFLAGS) build -race -o $(TARGET) .
|
||||
$(GOFLAGS) $(GO) build -race -o $(TARGET) .
|
||||
|
||||
resources: network/manuf.go
|
||||
|
||||
|
@ -18,20 +17,20 @@ network/manuf.go:
|
|||
@python3 ./network/make_manuf.py
|
||||
|
||||
install:
|
||||
@mkdir -p $(PREFIX)/share/bettercap/caplets
|
||||
@cp bettercap $(PREFIX)/bin/
|
||||
@mkdir -p $(DESTDIR)$(PREFIX)/share/bettercap/caplets
|
||||
@cp bettercap $(DESTDIR)$(PREFIX)/bin/
|
||||
|
||||
docker:
|
||||
@docker build -t bettercap:latest .
|
||||
|
||||
test:
|
||||
$(GO) $(GOFLAGS) test -covermode=atomic -coverprofile=cover.out ./...
|
||||
$(GOFLAGS) $(GO) test -covermode=atomic -coverprofile=cover.out ./...
|
||||
|
||||
html_coverage: test
|
||||
$(GO) $(GOFLAGS) tool cover -html=cover.out -o cover.out.html
|
||||
$(GOFLAGS) $(GO) tool cover -html=cover.out -o cover.out.html
|
||||
|
||||
benchmark: server_deps
|
||||
$(GO) $(GOFLAGS) test -v -run=doNotRunTests -bench=. -benchmem ./...
|
||||
$(GOFLAGS) $(GO) test -v -run=doNotRunTests -bench=. -benchmem ./...
|
||||
|
||||
fmt:
|
||||
$(GO) fmt -s -w $(PACKAGES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue