forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
BEATNAME=packetbeat
SYSTEM_TESTS=true
TEST_ENVIRONMENT=false
include scripts/Makefile
.PHONY: with_pfring
with_pfring:
go build --tags havepfring
# This is called by the beats-packer to obtain the configuration file
.PHONY: install-cfg
install-cfg:
cp etc/packetbeat.template.json $(PREFIX)/packetbeat.template.json
# linux
cp etc/packetbeat.yml $(PREFIX)/packetbeat-linux.yml
# binary
cp etc/packetbeat.yml $(PREFIX)/packetbeat-binary.yml
# darwin
cp etc/packetbeat.yml $(PREFIX)/packetbeat-darwin.yml
sed -i.bk 's/device: any/device: en0/' $(PREFIX)/packetbeat-darwin.yml
rm $(PREFIX)/packetbeat-darwin.yml.bk
# win
cp etc/packetbeat.yml $(PREFIX)/packetbeat-win.yml
sed -i.bk 's/device: any/device: 0/' $(PREFIX)/packetbeat-win.yml
rm $(PREFIX)/packetbeat-win.yml.bk
.PHONY: benchmark
benchmark:
$(GODEP) go test -short -bench=. ./... -cpu=2
.PHONY: gen
gen: env
. env/bin/activate && python scripts/generate_template.py etc/fields.yml etc/packetbeat.template.json
. env/bin/activate && python scripts/generate_field_docs.py etc/fields.yml docs/fields.asciidoc