mirror of
https://github.com/bettercap/bettercap
synced 2025-07-15 09:33:40 -07:00
added a few cross compilation rules
This commit is contained in:
parent
102d0b2c5b
commit
92f88f6cc5
1 changed files with 19 additions and 0 deletions
19
Makefile
19
Makefile
|
@ -1,4 +1,6 @@
|
||||||
TARGET=bettercap-ng
|
TARGET=bettercap-ng
|
||||||
|
PCAP=http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz
|
||||||
|
LDFLAGS='-linkmode external -extldflags "-static -s -w"'
|
||||||
|
|
||||||
all: fmt vet build
|
all: fmt vet build
|
||||||
@echo "@ Done"
|
@echo "@ Done"
|
||||||
|
@ -10,6 +12,22 @@ build: resources
|
||||||
@echo "@ Building ..."
|
@echo "@ Building ..."
|
||||||
@go build $(FLAGS) -o $(TARGET) .
|
@go build $(FLAGS) -o $(TARGET) .
|
||||||
|
|
||||||
|
linux_arm:
|
||||||
|
@echo "@ Cross compiling for linux/arm-7"
|
||||||
|
@xgo -ldflags=$(LDFLAGS) --deps=$(PCAP) --depsargs="--with-pcap=linux" --targets=linux/arm-7 .
|
||||||
|
|
||||||
|
linux_arm64:
|
||||||
|
@echo "@ Cross compiling for linux/arm64"
|
||||||
|
@xgo -ldflags=$(LDFLAGS) --deps=$(PCAP) --depsargs="--with-pcap=linux" --targets=linux/arm64 .
|
||||||
|
|
||||||
|
linux_mips:
|
||||||
|
@echo "@ Cross compiling for linux/mips"
|
||||||
|
@xgo -ldflags=$(LDFLAGS) --deps=$(PCAP) --depsargs="--with-pcap=linux" --targets=linux/mips .
|
||||||
|
|
||||||
|
linux_mips64:
|
||||||
|
@echo "@ Cross compiling for linux/mips64"
|
||||||
|
@xgo -ldflags=$(LDFLAGS) --deps=$(PCAP) --depsargs="--with-pcap=linux" --targets=linux/mips64 .
|
||||||
|
|
||||||
resources: oui
|
resources: oui
|
||||||
|
|
||||||
oui:
|
oui:
|
||||||
|
@ -26,6 +44,7 @@ lint:
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
@go get -u github.com/jteeuwen/go-bindata/...
|
@go get -u github.com/jteeuwen/go-bindata/...
|
||||||
|
@go get github.com/ykyuen/xgo
|
||||||
@go get ./...
|
@go get ./...
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue