
# 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
APPSDIR = $(kde_appsdir)/Internet
# set the include path for X, qt and KDE
INCLUDES= @all_includes@
# claim, which subdirectories you want to install
SUBDIRS = doc sounds

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

# Which sources should be compiled for kISDN.
kISDN_SOURCES	= kISDN.cpp kISDNdata.cpp logo.cpp devwidget.cpp ipwidget.cpp \
		  dnswidget.cpp authwidget.cpp accwidget.cpp genwidget.cpp drvwidget.cpp \
		  logwidget.cpp adapter.cpp display.cpp connection.cpp comwidget.cpp advdlg.cpp

# the library search path
kISDN_LDFLAGS = -g @all_libraries@

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

# this option you can leave out. Just, if you use "make dist", you need it
noinst_HEADERS = kISDN.h prefdlg.h accdlg.h kISDNdata.h mytypes.h logo.h adapter.h \
                 display.h connection.h

# just to make sure, automake makes them 
BUILTSOURCES =	kISDN.moc prefdlg.moc accdlg.moc display.moc

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

# make messages.po. Move this one to ../po/ and "make merge" in po
messages:
	$(XGETTEXT) -C -ktranslate $(kISDN_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) kISDN.kdelnk $(APPSDIR)
	$(mkinstalldirs) $(kde_icondir)
	$(INSTALL_DATA) pixmaps/kISDN.xpm $(kde_icondir)
	$(mkinstalldirs) $(kde_minidir)
	$(INSTALL_DATA) pixmaps/mini-kISDN.xpm $(kde_minidir)/kISDN.xpm

# remove ALL you have installed in install-data-local or install-exec-local
uninstall-local:
	-rm -f $(APPSDIR)/kISDN.kdelnk
	-rm -f $(kde_icondir)/kISDN.xpm
	-rm -f $(kde_minidir)/kISDN.xpm
	-rm -f $(KDEDIR)/share/sounds/beep.wav
	
# add a dependency for every moc file to be full portable
kISDN.cpp     : kISDN.moc prefdlg.moc accdlg.moc display.moc
kISDN.moc     : kISDN.h
	$(MOC) kISDN.h -o kISDN.moc
prefdlg.moc: prefdlg.h
	$(MOC) prefdlg.h -o prefdlg.moc
accdlg.moc    : accdlg.h
	$(MOC) accdlg.h -o accdlg.moc
display.moc   : display.h
	$(MOC) display.h -o display.moc 
