Debian Codegraph @

Makefile

raw symbols SCIP
1 TARGET ?= bettercap
2 PACKAGES ?= core firewall log modules network packets session tls
3 PREFIX ?= /usr/local
4 GO ?= go
5
6 all: build
7
8 build: resources
9 $(GOFLAGS) $(GO) build -o $(TARGET) .
10
11 build_with_race_detector: resources
12 $(GOFLAGS) $(GO) build -race -o $(TARGET) .
13
14 resources: network/manuf.go
15
16 network/manuf.go:
17 @python3 ./network/make_manuf.py
18
19 install:
20 @mkdir -p $(DESTDIR)$(PREFIX)/share/bettercap/caplets
21 @cp bettercap $(DESTDIR)$(PREFIX)/bin/
22
23 docker:
24 @docker build -t bettercap:latest .
25
26 test:
27 $(GOFLAGS) $(GO) test -covermode=atomic -coverprofile=cover.out ./...
28
29 html_coverage: test
30 $(GOFLAGS) $(GO) tool cover -html=cover.out -o cover.out.html
31
32 benchmark: server_deps
33 $(GOFLAGS) $(GO) test -v -run=doNotRunTests -bench=. -benchmem ./...
34
35 fmt:
36 $(GO) fmt -s -w $(PACKAGES)
37
38 clean:
39 $(RM) $(TARGET)
40 $(RM) -r build
41
42 .PHONY: all build build_with_race_detector resources install docker test html_coverage benchmark fmt clean