# $Id$

AM_CPPFLAGS =								\
	-I$(top_srcdir)							\
	-DDEFAULT_XDG_CACHE_HOME=\"~/.cache\"				\
	-DDEFAULT_XDG_DATA_HOME=\"~/.local/share\"			\
	-DDEFAULT_XDG_CONFIG_HOME=\"~/.config\"				\
	-DDEFAULT_XDG_DATA_DIRS=\"$(datadir):/usr/local/share:/usr/share\" \
	-DDEFAULT_XDG_CONFIG_DIRS=\"$(sysconfdir)/xdg:$(sysconfdir)/xfce4:/etc/xdg\" \
	-DDATADIR=\"$(datadir)\"					\
	-DSYSCONFDIR=\"$(sysconfdir)\"					\
	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"				\
	-DG_LOG_DOMAIN=\"libxfce4util\"					\
	-DKIOSKDIR=\"$(sysconfdir)/xdg/xfce4/kiosk\"			\
	-DKIOSKDEF=\"ALL\"						\
	-DLIBXFCE4UTIL_COMPILATION

lib_LTLIBRARIES =							\
	libxfce4util.la

libxfce4util_headers =							\
	xfce-debug.h							\
	xfce-fileutils.h						\
	xfce-generics.h							\
	xfce-i18n.h							\
	xfce-kiosk.h							\
	xfce-license.h							\
	xfce-miscutils.h						\
	xfce-posix-signal-handler.h					\
	xfce-rc.h							\
	xfce-resource.h							\
	xfce-utf8.h

libxfce4util_built_sources =						\
	libxfce4util-alias.h						\
	libxfce4util-aliasdef.c

libxfce4utilincludedir = $(includedir)/xfce4/libxfce4util
libxfce4utilinclude_HEADERS =						\
	$(libxfce4util_built_public_sources)				\
	$(libxfce4util_headers)						\
	libxfce4util.h							\
	libxfce4util-config.h

libxfce4util_la_SOURCES =						\
	$(libxfce4utilinclude_HEADERS)					\
	$(libxfce4util_built_sources)					\
	libxfce4util-config.c						\
	libxfce4util-private.c						\
	libxfce4util-private.h						\
	xfce-fileutils.c						\
	xfce-i18n.c							\
	xfce-kiosk.c							\
	xfce-license.c							\
	xfce-miscutils.c						\
	xfce-posix-signal-handler.c					\
	xfce-private.h							\
	xfce-rc.c							\
	xfce-rc-config.c						\
	xfce-rc-private.h						\
	xfce-rc-simple.c						\
	xfce-resource.c							\
	xfce-utf8.c

libxfce4util_la_CFLAGS = 						\
	$(GLIB_CFLAGS)

libxfce4util_la_LDFLAGS =						\
	-export-dynamic							\
	-version-info $(LIBXFCE4UTIL_VERINFO)				\
	-export-symbols-regex "^[^_].*"					\
	-no-undefined

libxfce4util_la_LIBADD =						\
	$(GLIB_LIBS)

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxfce4util-1.0.pc


##
## Rules to auto-generate built sources
##
## This is a bit tricky with automake, and non-trivial to implement. The
## rules below seem to work fine and don't seem to break the build, but
## they are only enabled in maintainer mode, so arbitrary users don't get
## trapped in automake's oddities. Therefore we ship the autogenerated
## files as part of the dist tarball.
##
if MAINTAINER_MODE
CLEANFILES =								\
	actual-abi							\
	expected-abi

DISTCLEANFILES =							\
	$(libxfce4util_built_sources)

BUILT_SOURCES =								\
	$(libxfce4util_built_sources)

libxfce4util-alias.h: make-libxfce4util-alias.pl libxfce4util.symbols
	$(PERL) $(srcdir)/make-libxfce4util-alias.pl < $(srcdir)/libxfce4util.symbols > libxfce4util-alias.h

libxfce4util-aliasdef.c: make-libxfce4util-alias.pl libxfce4util.symbols
	$(AM_V_GEN) $(PERL) $(srcdir)/make-libxfce4util-alias.pl -def < $(srcdir)/libxfce4util.symbols > libxfce4util-aliasdef.c
endif

# required for gtk-doc
dist-hook: all

EXTRA_DIST =								\
	abicheck.sh							\
	libxfce4util.symbols						\
	libxfce4util-alias.h						\
	libxfce4util-aliasdef.c						\
	make-libxfce4util-alias.pl

if HAVE_GNUC_VISIBILITY
TESTS = abicheck.sh
endif

# vi:set ts=8 sw=8 noet ai nocindent:
