INCLUDES= $(all_includes)
METASOURCES = AUTO
SUBDIRS = pics

# it's basicly impossible to get this done with all the X headers used ;(
KDE_OPTIONS = nofinal

bin_PROGRAMS = kxkb

kxkb_SOURCES = dummy.cpp
kxkb_LDFLAGS = $(all_libraries) $(KDE_RPATH)
kxkb_LDADD = kxkb.la -lxkbfile

lib_LTLIBRARIES = kxkb.la
kde_module_LTLIBRARIES = kcm_keyboard.la

kcm_keyboard_la_SOURCES = rules.cpp kcmlayout.cpp pixmap.cpp kcmmisc.cpp kcmmiscwidget.ui
kcm_keyboard_la_LDFLAGS  = $(all_libraries) -module -avoid-version -no-undefined
kcm_keyboard_la_LIBADD = $(XTESTLIB) $(LIB_KIO) -lxkbfile

kxkb_la_SOURCES = kxkb.cpp rules.cpp extension.cpp pixmap.cpp
kxkb_la_LDFLAGS = $(all_libraries) -module -avoid-version
kxkb_la_LIBADD = -lX11 -lXext $(LIB_KDEUI) -lxkbfile

data_DATA = keyboard.desktop
datadir = $(kde_appsdir)/Settings/Peripherals
data2_DATA = keyboard_layout.desktop
data2dir = $(kde_appsdir)/Settings/Accessibility

install-data-local: uninstall.desktop
	$(mkinstalldirs) $(DESTDIR)$(kde_appsdir)/Settings/Personalization
	$(INSTALL_DATA) $(srcdir)/uninstall.desktop $(DESTDIR)$(kde_appsdir)/Settings/Personalization/kcmlayout.desktop

servicesdir = $(kde_servicesdir)
services_DATA = kxkb.desktop

messages: rc.cpp
	$(XGETTEXT) $(kxkb_la_SOURCES) kxkbbindings.cpp -o $(podir)/kxkb.pot
	$(XGETTEXT) rules.cpp kcmlayout.cpp pixmap.cpp kcmmisc.cpp rc.cpp kxkbbindings.cpp -o $(podir)/kcmlayout.pot 

dummy.cpp:
	echo > dummy.cpp
