
# this 10 paths are KDE specific. Use them:
# kde_htmldir       Where your docs should go to. (contains lang subdirs)
# kde_appsdir       Where your application file (.kdelnk) should go to. 
# kde_icondir       Where your icon should go to.
# kde_minidir       Where your mini icon should go to.
# kde_datadir       Where you install application data. (Use a subdir)
# kde_locale        Where translation files should go to.(contains lang subdirs)
# kde_cgidir        Where cgi-bin executables should go to.
# kde_confdir       Where config files should go to.
# kde_mimedir       Where mimetypes should go to.
# kde_toolbardir    Where general toolbar icons should go to.
# kde_wallpaperdir  Where general wallpapers should go to.

# just set the variable
DATADIR = $(kde_datadir)/kfour
APPSDIR = $(kde_appsdir)/Games
# set the include path for X, qt and KDE
INCLUDES= @all_includes@
# claim, which subdirectories you want to install
SUBDIRS = 

####### This part is very kfour specific
# you can add here more. This one gets installed 
bin_PROGRAMS = 	kfour

# Which sources should be compiled for kfour.
kfour_SOURCES	= main.cpp mainwidget.cpp

# the library search path
kfour_LDFLAGS = @all_libraries@

# the libraries to link against. Be aware of the order. First the libraries,
# that depend on the following ones.
kfour_LDADD   = -lkdeui -lkdecore -lqt -lXext @LIBSOCKET@     

# this option you can leave out. Just, if you use "make dist", you need it
noinst_HEADERS = 

# just to make sure, automake makes them 
BUILTSOURCES =	mainwidget.moc

# if you "make distclean", this files get removed. If you want to remove
# them while "make clean", use CLEANFILES
DISTCLEANFILES = $(BUILTSOURCES)

# make messages.po. Move this one to ../po/ and "make merge" in po
#messages:
#	$(XGETTEXT) -C -ktranslate $(kfour_SOURCES)
#
# just install datas here. Use install-exec-data for scripts and etc.
# the binary itself is already installed from automake
# use mkinstalldirs, not "install -d"
# don't install a list of file. Just one file per install.
# if you have more of them, create a subdirectory with an extra Makefile 
install-data-local: 
	$(mkinstalldirs) $(APPSDIR)
	$(INSTALL_DATA) kfour.kdelnk $(APPSDIR)
	$(mkinstalldirs) $(DATADIR)/pics/
	$(INSTALL_DATA) stone1.xpm $(DATADIR)/pics/
	$(INSTALL_DATA) stone2.xpm $(DATADIR)/pics/
	$(INSTALL_DATA) board.xpm $(DATADIR)/pics/
	$(mkinstalldirs) $(kde_icondir)
	$(INSTALL_DATA) kfour.xpm $(kde_icondir)
	$(mkinstalldirs) $(kde_minidir)
	$(INSTALL_DATA) mini-kfour.xpm $(kde_minidir)/kfour.xpm

## remove ALL you have installed in install-data-local or install-exec-local
uninstall-local:
	-rm -f $(APPSDIR)/kfour.kdelnk
	-rm -f $(DATADIR)/pics/stone1.xpm
	-rm -f $(DATADIR)/pics/stone2.xpm
	-rm -f $(DATADIR)/pics/board.xpm
	-rmdir $(DATADIR)/pics
	-rmdir $(DATADIR)
	-rm -f $(kde_icondir)/kfour.xpm
	-rm -f $(kde_minidir)/kfour.xpm

# add a dependency for every moc file to be full portable
# I've added a key binding to emacs for this. 
mainwidget.cpp:mainwidget.moc
mainwidget.moc: mainwidget.h
	$(MOC) mainwidget.h -o mainwidget.moc
