Example loadable plugin
Source
xxxxxxxxxx
1
1
.ONESHELL:
2
2
3
-
PACKAGE=zabbix-agent2-plugin-mssql
3
+
PACKAGE=zabbix-agent2-plugin-example
4
4
TOPDIR := $(CURDIR)
5
5
6
6
ifeq ($(OS),Windows_NT)
7
7
SHELL := cmd
8
8
TOPDIR := $(subst /,\,$(CURDIR))
9
9
PACKAGE:=$(PACKAGE).exe
10
10
WINDRES = windres.exe
11
11
ifneq ("$(shell findstr ZABBIX_RC_NUM $(TOPDIR)\windres\resource.h)","")
12
12
ifeq ("$(WINDRES_FLAGS)","")
13
13
WINDRES_FLAGS := \
36
36
RFLAGS := $(RFLAGS) --target=pe-x86-64
37
37
endif
38
38
39
39
DISTFILES = \
40
40
ChangeLog \
41
41
go.mod \
42
42
go.sum \
43
43
LICENSE \
44
44
main.go \
45
45
Makefile \
46
-
mssql.conf \
46
+
example.conf \
47
47
README.md
48
48
49
49
DIST_SUBDIRS = \
50
50
plugin \
51
51
windres \
52
52
vendor
53
53
54
54
.build_rc:
55
55
ifneq ("$(WINDRES)","")
56
56
$(WINDRES) $(TOPDIR)\windres\resource.rc $(WINDRES_FLAGS) $(RFLAGS) \