include $(top_srcdir)/config/Rules.am
-AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN)
+# Get rid of compiler warning for unchecked truncating snprintfs on gcc 7.1.1
+AM_CFLAGS += $(NO_FORMAT_TRUNCATION)
+
+# Includes kernel code, generate warnings for large stack frames
+AM_CFLAGS += $(FRAME_LARGER_THAN)
+
+# Unconditionally enable ASSERTs
+AM_CPPFLAGS += -DDEBUG -UNDEBUG
DEFAULT_INCLUDES += \
- -I${top_srcdir}/lib/libspl/include \
- -I${top_srcdir}/lib/libefi/include \
- -I${top_srcdir}/lib/libzpool/include \
- -I${top_srcdir}/lib/libuutil/include \
- -I${top_srcdir}/lib/libzfs/include \
- -I${top_srcdir}/lib/libnvpair/include \
- -I${top_srcdir}/module/zfs \
- -I${top_srcdir}/module/zfs/include \
- -I${top_srcdir}/module/zcommon/include \
- -I${top_srcdir}/module/nvpair/include \
- -I${top_srcdir}/module/avl/include \
- -I${top_srcdir}/module/unicode/include
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/lib/libspl/include
sbin_PROGRAMS = ztest
ztest_SOURCES = \
- ${top_srcdir}/cmd/ztest/ztest.c
+ ztest.c
ztest_LDADD = \
- $(top_builddir)/lib/libspl/libspl.la \
- $(top_builddir)/lib/libavl/libavl.la \
- $(top_builddir)/lib/libefi/libefi.la \
$(top_builddir)/lib/libnvpair/libnvpair.la \
- $(top_builddir)/lib/libunicode/libunicode.la \
- $(top_builddir)/lib/libuutil/libuutil.la \
- $(top_builddir)/lib/libzpool/libzpool.la \
- $(top_builddir)/lib/libzfs/libzfs.la
+ $(top_builddir)/lib/libzpool/libzpool.la
-ztest_LDFLAGS = -pthread -lm $(ZLIB) -lrt -ldl $(LIBUUID) $(LIBBLKID)
+ztest_LDADD += -lm
+ztest_LDFLAGS = -pthread