]> git.proxmox.com Git - mirror_zfs.git/blobdiff - config/Rules.am
Prevent `make distclean` removing config/config.rpath
[mirror_zfs.git] / config / Rules.am
index 7b72770b865cc6290e79186a98ba0a4a32b09889..1e569d3419b1d91bd220aa360a8f41d21798c2c6 100644 (file)
@@ -1,13 +1,30 @@
-###############################################################################
-# Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
-# Copyright (C) 2007 The Regents of the University of California.
-# Written by Brian Behlendorf <behlendorf1@llnl.gov>.
-###############################################################################
-# Common rules for user space components.
-###############################################################################
+#
+# Default build rules for all user space components, every Makefile.am
+# should include these rules and override or extend them as needed.
+#
 
-DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h
+DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h
 
 AM_LIBTOOLFLAGS = --silent
-AM_CFLAGS  = -Wall -Wstrict-prototypes -Werror -Wshadow
-AM_CFLAGS += -D__USE_LARGEFILE64
+
+AM_CFLAGS  = -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing
+AM_CFLAGS += $(NO_OMIT_FRAME_POINTER)
+AM_CFLAGS += $(DEBUG_CFLAGS)
+AM_CFLAGS += $(ASAN_CFLAGS)
+AM_CFLAGS += $(CODE_COVERAGE_CFLAGS)
+
+AM_CPPFLAGS  = -D_GNU_SOURCE
+AM_CPPFLAGS += -D_REENTRANT
+AM_CPPFLAGS += -D_FILE_OFFSET_BITS=64
+AM_CPPFLAGS += -D_LARGEFILE64_SOURCE
+AM_CPPFLAGS += -DHAVE_LARGE_STACKS=1
+AM_CPPFLAGS += -DTEXT_DOMAIN=\"zfs-linux-user\"
+AM_CPPFLAGS += -DLIBEXECDIR=\"$(libexecdir)\"
+AM_CPPFLAGS += -DRUNSTATEDIR=\"$(runstatedir)\"
+AM_CPPFLAGS += -DSBINDIR=\"$(sbindir)\"
+AM_CPPFLAGS += -DSYSCONFDIR=\"$(sysconfdir)\"
+AM_CPPFLAGS += $(DEBUG_CPPFLAGS)
+AM_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS)
+
+AM_LDFLAGS  = $(DEBUG_LDFLAGS)
+AM_LDFLAGS += $(ASAN_LDFLAGS)