Example loadable plugin
Source
xxxxxxxxxx
.ONESHELL:
PACKAGE=zabbix-agent2-plugin-mssql
PACKAGE=zabbix-agent2-plugin-example
TOPDIR := $(CURDIR)
ifeq ($(OS),Windows_NT)
SHELL := cmd
TOPDIR := $(subst /,\,$(CURDIR))
PACKAGE:=$(PACKAGE).exe
WINDRES = windres.exe
ifneq ("$(shell findstr ZABBIX_RC_NUM $(TOPDIR)\windres\resource.h)","")
ifeq ("$(WINDRES_FLAGS)","")
WINDRES_FLAGS := \
RFLAGS := $(RFLAGS) --target=pe-x86-64
endif
DISTFILES = \
ChangeLog \
go.mod \
go.sum \
LICENSE \
main.go \
Makefile \
mssql.conf \
example.conf \
README.md
DIST_SUBDIRS = \
plugin \
windres \
vendor
.build_rc:
ifneq ("$(WINDRES)","")
$(WINDRES) $(TOPDIR)\windres\resource.rc $(WINDRES_FLAGS) $(RFLAGS) \