# If building a plugin out of the Suricata source tree, you can use
# libsuricata-config --cflags.
#LIBSURICATA_CONFIG ?=  libsuricata-config
#CPPFLAGS +=            `$(LIBSURICATA_CONFIG) --cflags`

# But as this is an example in the Suricata source tree we'll look for
# includes in the source tree.
CPPFLAGS +=     -I../../../src -I../../../rust/gen -DHAVE_CONFIG_H

# Currently the Suricata logging system requires this to be even for
# plugins.
CPPFLAGS +=    "-D__SCFILENAME__=\"$(*F)\""

all: Makefile custom-logger.so

custom-logger.so: custom-logger.c
	$(CC) $(CPPFLAGS) -fPIC -shared -o $@ $^

clean:
	rm -f *.so *.o *.lo
	rm -rf .deps

distclean: clean
	rm -f Makefile.am

# Regenerate Makefile on change of Makefile.in since we're not using
# Makefile.am.
Makefile: Makefile.in
	cd ../../.. && ./config.status examples/plugins/c-custom-loggers/Makefile

# Dummy rules to satisfy make dist.
dist distdir:
