AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include \
	-DLOCALEDIR=\"$(localedir)\"
AM_CFLAGS = -fsigned-char
AM_LDFLAGS =

# Automake (at least up to 1.10) mishandles dist_man_MANS inside conditionals.
# Unlike with other dist primaries, the files are not distributed if the
# conditional is false.
# Work the bug around until it is fixed:
dist_noinst_DATA = $(dist_man_MANS)

# Paths to in-tree libraries (use ul_ prefix to avoid possible collisions)
#
# blkid
ul_libblkid_srcdir = $(top_srcdir)/libblkid/src
ul_libblkid_builddir = $(top_builddir)/libblkid/src
ul_libblkid_la = $(top_builddir)/libblkid/src/libblkid.la

# blkid.h is generated by ./configure script and stored in build directory
ul_libblkid_incdir = $(ul_libblkid_builddir)

$(ul_libblkid_la):
	$(MAKE) -C $(ul_libblkid_builddir)


# uuid
ul_libuuid_srcdir = $(top_srcdir)/libuuid/src
ul_libuuid_builddir = $(top_builddir)/libuuid/src
ul_libuuid_la = $(top_builddir)/libuuid/src/libuuid.la

$(ul_libuuid_la):
	$(MAKE) -C $(ul_libuuid_builddir)


# mount
ul_libmount_srcdir = $(top_srcdir)/libmount/src
ul_libmount_builddir = $(top_builddir)/libmount/src
ul_libmount_la = $(top_builddir)/libmount/src/libmount.la

# libmount.h is generated by ./configure script and stored in build directory
ul_libmount_incdir = $(ul_libmount_builddir)

$(ul_libmount_la):
	$(MAKE) -C $(ul_libmount_builddir)

#
# smatch scan -- smatch and cgcc are expected in $PATH
#
checksmatch:
	$(MAKE) CHECK="smatch --data=$(abs_top_srcdir)/tools/smatch-data" CC=cgcc
