ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = dist-bzip2
DISTCHECK_CONFIGURE_FLAGS = --with-dbus-services-dir=/tmp --enable-hal --enable-moodriver --enable-mp4v2 --enable-sid --enable-ofa

# Main Service
servicedir = $(DBUS_SERVICES_DIR)
service_in_files = org.mpris.bmp.service.in
service_DATA = org.mpris.bmp.service
$(service_DATA): $(service_in_files) Makefile
	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@

# Sentinel
sentineldir = $(DBUS_SERVICES_DIR)
sentinel_in_files = org.beepmediaplayer.sentinel.service.in
sentinel_DATA = org.beepmediaplayer.sentinel.service
$(sentinel_DATA): $(sentinel_in_files) Makefile
	@sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@

docdir=$(datadir)/doc/@PACKAGE_NAME@
htmldir=$(docdir)/html

CLEANFILES =  $(service_DATA) \
              $(sentinel_DATA) 

DISTCLEANFILES = $(CLEANFILES) intltool-extract intltool-merge intltool-update

SUBDIRS =		\
	scripts		\
	po			\
	include		\
	mcs			\
	widgets		\
	jnetlib		\
	json						

if HAVE_HAL
SUBDIRS += libhal++
endif #HAVE_HAL

SUBDIRS += data docs xpi	
SUBDIRS += remote sentinel plugins src 

man_MANS = beep-media-player-2.1

pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = bmp-2.0.pc

EXTRA_DIST =									\
												\
	org.mpris.bmp.service.in					\
	org.beepmediaplayer.sentinel.service.in		\
												\
    autogen.sh									\
												\
	beep-media-player-2.1.in					\
	bmp-2.0.pc.in								\
												\
	build.h.in									\
	revision.h.in								\
												\
	mkrevision_h.sh								\
	mkbuild_h.sh								\
												\
	intltool-extract.in							\
	intltool-merge.in							\
	intltool-update.in

noinst_HEADERS = build.h revision.h
BUILT_SOURCES = build.h revision.h

revision.h: Makefile
	$(abs_top_srcdir)/mkrevision_h.sh $(abs_top_srcdir) $(abs_top_srcdir)

build.h: Makefile
	$(abs_top_srcdir)/mkbuild_h.sh $(abs_top_srcdir) $(abs_top_srcdir)

dist-post-hook:
	sha1sum bmpx-$(VERSION).tar.bz2 > bmpx-$(VERSION).tar.bz2.sha1
	sha1sum bmpx-$(VERSION).tar.gz > bmpx-$(VERSION).tar.gz.sha1

