if UNINSTALLED
shareddir = $(abs_top_builddir)/data
sysconfigdir = $(shareddir)
desktopdir = $(shareddir)
plugindir = $(abs_top_builddir)/src/plugins
enginedir = $(abs_top_builddir)/src/media-engines
icondir = $(shareddir)/icons/32x32
presetdir = $(shareddir)/presets

install: all-am
	@echo "You called configure with --enable-uninstalled. Cannot install"

else
shareddir = $(datadir)/rygel
sysconfigdir = $(sysconfdir)
desktopdir = $(datadir)/applications
plugindir = @RYGEL_PLUGIN_DIR@
enginedir = @RYGEL_MEDIA_ENGINE_DIR@
icondir = $(datadir)/icons/hicolor/32x32/apps
presetdir = $(shareddir)/presets
endif

smallicondir = $(shareddir)/icons/48x48
bigicondir = $(shareddir)/icons/120x120

librygelcoredir = $(top_srcdir)/src/librygel-core
librygelserverdir = $(top_srcdir)/src/librygel-server
librygelrendererdir = $(top_srcdir)/src/librygel-renderer
librygelruihdir = $(top_srcdir)/src/librygel-ruih

MAINTAINERCLEANFILES = Makefile.in

RYGEL_COMMON_DEFINES_CFLAGS = \
	-DDATA_DIR='"$(shareddir)"' \
	-include config.h


RYGEL_COMMON_LIBRYGEL_CORE_VALAFLAGS = \
	--vapidir=$(librygelcoredir) \
	--pkg rygel-core-2.6 \
	--pkg uuid

RYGEL_COMMON_LIBRYGEL_CORE_CFLAGS = \
	$(RYGEL_COMMON_DEFINES_CFLAGS) \
	-I$(top_builddir)/src/librygel-core \
	-I$(top_srcdir)/src/librygel-core

RYGEL_COMMON_LIBRYGEL_CORE_LIBS = \
	$(top_builddir)/src/librygel-core/librygel-core-2.6.la


RYGEL_COMMON_LIBRYGEL_RENDERER_VALAFLAGS = \
	--vapidir=$(top_srcdir)/src/librygel-renderer \
	--pkg rygel-renderer-2.6 \
	$(RYGEL_COMMON_LIBRYGEL_CORE_VALAFLAGS)

RYGEL_COMMON_LIBRYGEL_RENDERER_CFLAGS = \
	$(RYGEL_COMMON_LIBRYGEL_CORE_CFLAGS) \
	-I$(top_builddir)/src/librygel-renderer \
	-I$(top_srcdir)/src/librygel-renderer

RYGEL_COMMON_LIBRYGEL_RENDERER_LIBS = \
	$(RYGEL_COMMON_LIBRYGEL_CORE_LIBS) \
	$(top_builddir)/src/librygel-renderer/librygel-renderer-2.6.la


RYGEL_COMMON_LIBRYGEL_RENDERER_GST_VALAFLAGS = \
	--vapidir=$(top_srcdir)/src/librygel-renderer-gst \
	--pkg rygel-renderer-gst-2.6 \
	$(RYGEL_COMMON_LIBRYGEL_RENDERER_VALAFLAGS)

RYGEL_COMMON_LIBRYGEL_RENDERER_GST_CFLAGS = \
	$(RYGEL_COMMON_LIBRYGEL_RENDERER_CFLAGS) \
	-I$(top_builddir)/src/librygel-renderer-gst \
	-I$(top_srcdir)/src/librygel-renderer-gst

RYGEL_COMMON_LIBRYGEL_RENDERER_GST_LIBS = \
	$(RYGEL_COMMON_LIBRYGEL_RENDERER_LIBS) \
	$(top_builddir)/src/librygel-renderer-gst/librygel-renderer-gst-2.6.la


RYGEL_COMMON_LIBRYGEL_SERVER_VALAFLAGS = \
	--vapidir=$(top_builddir)/src/librygel-server \
	--pkg rygel-server-2.6 \
	$(RYGEL_COMMON_LIBRYGEL_CORE_VALAFLAGS)

RYGEL_COMMON_LIBRYGEL_SERVER_CFLAGS = \
	$(RYGEL_COMMON_LIBRYGEL_CORE_CFLAGS) \
	-I$(top_builddir)/src/librygel-server \
	-I$(top_srcdir)/src/librygel-server

RYGEL_COMMON_LIBRYGEL_SERVER_LIBS = \
	$(RYGEL_COMMON_LIBRYGEL_CORE_LIBS) \
	$(top_builddir)/src/librygel-server/librygel-server-2.6.la

RYGEL_COMMON_LIBRYGEL_RUIH_VALAFLAGS = \
        --vapidir=$(top_builddir)/src/librygel-ruih \
        --pkg rygel-ruih-2.0 \
        $(RYGEL_COMMON_LIBRYGEL_CORE_VALAFLAGS)

RYGEL_COMMON_LIBRYGEL_RUIH_CFLAGS = \
        $(RYGEL_COMMON_LIBRYGEL_CORE_CFLAGS) \
        -I$(top_builddir)/src/librygel-ruih \
        -I$(top_srcdir)/src/librygel-ruih

RYGEL_COMMON_LIBRYGEL_RUIH_LIBS = \
        $(RYGEL_COMMON_LIBRYGEL_CORE_LIBS) \
        $(top_builddir)/src/librygel-ruih/librygel-ruih-2.0.la

RYGEL_COMMON_BUILD_CONFIG_VALAFLAGS = \
	--vapidir=$(librygelcoredir) \
	--pkg rygel-build-config

# Note: This must always be the last one in *_VALAFLAGS,
# because the -g needs to be at the end of VALAFLAGS to not break make dist.
RYGEL_COMMON_VALAFLAGS = \
	$(RYGEL_COMMON_BUILD_CONFIG_VALAFLAGS) \
	$(RYGEL_COMMON_VALAFLAGS_PKG) \
	$(COVERAGE_VALAFLAGS) \
	$(RYGEL_DEBUG_VALAFLAGS)


vala-clean:
	rm -f `find . -name "*.stamp"`
