
SRCS=g_virstor.c binstream.c g_virstor_md.c
KMOD=geom_virstor

CFLAGS+=-g #-DINVARIANTS -DINVARIANT_SUPPORT -DWITNESS

.include <bsd.kmod.mk>


so: geom_virstor.c g_virstor.h binstream.c binstream.h g_virstor_md.c g_virstor_md.h
	gcc -o geom_virstor.so -lgeom -shared -export-dynamic -Wall -I/usr/src/sbin/geom geom_virstor.c binstream.c g_virstor_md.c /usr/src/sbin/geom/misc/subr.c
	strip geom_virstor.so
	ln -f -s /sbin/geom gvirstor

cleanso:
	rm -f gvirstor geom_virstor.so

help:
	@echo "Available 'make' targets:"
	@echo "  <default> - builds .ko"
	@echo "         so - builds geom(8) helper .so library and ./virstor symlink"
	@echo "    cleanso - cleans after 'make so'"
	@echo "       help - shows this message"

