


pixmapdir = $(datadir)/pixmaps/mahjongg
bgdir = $(datadir)/pixmaps/mahjongg/bg
Gamesdir = $(datadir)/applications
appicondir=$(datadir)/pixmaps

schemadir   = @GCONF_SCHEMA_FILE_DIR@
schema_in_files = mahjongg.schemas.in
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@

INCLUDES =						\
	-I$(top_srcdir)/libgames-support		\
	-I..						\
	-I$(srcdir)/..					\
	$(GNOME_GAMES_CFLAGS)				\
	-DDATADIR=\""$(datadir)"\"		   \
	-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED \
	-DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED \
	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"

bin_PROGRAMS = mahjongg

mahjongg_SOURCES = 	\
	mahjongg.c	\
	solubility.c	\
	solubility.h	\
	mahjongg.h	\
	button-images.h \
	gnome-canvas-pimage.h \
	gnome-canvas-pimage.c

mahjongg_LDADD =					\
	$(GNOME_GAMES_LIBS)				\
	../libgames-support/libgames-support.la		\
	$(INTLLIBS)

pixmap_DATA = default.png seta.png

bg_DATA = bg1.png bg2.png bg3.png bg4.png

appicon_DATA = gnome-mahjongg.png

EXTRA_DIST = mahjongg.desktop.in $(pixmap_DATA) $(appicon_DATA) $(bg_DATA) \
	$(schema_in_files)

Games_in_files = mahjongg.desktop.in
Games_DATA = $(Games_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

SUBDIRS = help

install-data-local:
if GCONF_SCHEMAS_INSTALL
	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
endif
	-$(mkinstalldirs) $(DESTDIR)$(scoredir)
	$(mkinstalldirs) $(DESTDIR)$(bgdir)
	-for i in easy difficult ; do \
		touch $(DESTDIR)$(scoredir)/mahjongg.$$i.scores; \
		chown $(scores_user):$(scores_group) $(DESTDIR)$(scoredir)/mahjongg.$$i.scores; \
		chmod 664 $(DESTDIR)$(scoredir)/mahjongg.$$i.scores; \
	done
	-if test "x$(setgid)" = "xtrue"; then chgrp $(scores_group) $(DESTDIR)$(bindir)/mahjongg && chmod 2555 $(DESTDIR)$(bindir)/mahjongg ; fi
	$(mkinstalldirs) $(DESTDIR)$(Gamesdir)

CLEANFILES = $(Games_DATA) $(schema_DATA)
