Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bettercap/bettercap
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Aug 21, 2021
2 parents f10ccfb + 8b867c2 commit 74e3303
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,35 @@ 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

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)
Expand All @@ -40,4 +39,4 @@ clean:
$(RM) $(TARGET)
$(RM) -r build

.PHONY: all build build_with_race_detector resources install docker test html_coverage benchmark fmt clean
.PHONY: all build build_with_race_detector resources install docker test html_coverage benchmark fmt clean

0 comments on commit 74e3303

Please sign in to comment.