INCLUDES = $(all_includes)

kde_module_LTLIBRARIES = libtdemidpart.la
lib_LTLIBRARIES = libtdemidlib.la

libtdemidlib_la_LDFLAGS = $(all_libraries)
libtdemidlib_la_LIBADD = $(LIB_TDEFILE) $(LIB_TDEPARTS) $(LIB_TDEIO) -ltdemid $(LIB_TQT) $(LIB_TDEUI) -lDCOP $(LIB_TDECORE)

libtdemidpart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
libtdemidpart_la_LIBADD = libtdemidlib.la

libtdemidlib_la_SOURCES = tdemidframe.cpp tdemidclient.cpp kdisptext.cpp \
	qslidertime.cpp klcdnumber.cpp ktrianglebutton.cpp \
	midicfgdlg.cpp collectdlg.cpp randomlist.cpp \
	channelview.cpp channel.cpp channel3d.cpp channel4d.cpp \
	channelcfgdlg.cpp instrname.cpp rhythmview.cpp \
	songlist.cpp slman.cpp tdemid_part.cpp tdemidIface.skel

libtdemidpart_la_SOURCES = part_dummy.cpp

part_dummy.cpp:
	touch part_dummy.cpp

noinst_HEADERS = tdemidframe.h tdemidclient.h kdisptext.h \
        qslidertime.h klcdnumber.h ktrianglebutton.h \
        midicfgdlg.h collectdlg.h randomlist.h \
        channelview.h channel.h channel3d.h channel4d.h \
        channelcfgdlg.h instrname.h rhythmview.h \
        songlist.h slman.h tdemid_part.h

tdemid_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
tdemid_SOURCES = main.cpp
tdemid_LDADD   = libtdemidlib.la

bin_PROGRAMS = tdemid
METASOURCES = AUTO

servicetype_DATA = audiomidi.desktop
servicetypedir = $(kde_servicetypesdir)

SUBDIRS = maps examples pics

xdg_apps_DATA = tdemid.desktop

mime_DATA = x-karaoke.desktop
mimedir = $(kde_mimedir)/audio

rc_DATA = tdemidui.rc
rcdir = $(kde_datadir)/tdemid

KDE_ICON = tdemid

fmpatches_DATA = std.sb drums.sb std.o3 drums.o3
fmpatchesdir = $(kde_datadir)/tdemid/fm

partdir   = $(kde_datadir)/tdemid
part_DATA = tdemid_partui.rc

channelview_DATA = keyboard.xpm button1.xpm button2.xpm
channelviewdir = $(kde_datadir)/tdemid/icons

EXTRA_DIST = $(xdg_apps_DATA) $(mime_DATA) $(fmpatches_DATA) $(part_DATA)

instrname.i18n: instrname.cpp
	echo "/* This is an automatically generated file" > instrname.i18n
	echo " * DO NOT EDIT !!!" >> instrname.i18n
	echo " * To create this file run : ""make instrname.i18n"" " >> instrname.i18n
	echo " */" >> instrname.i18n
	echo "" >> instrname.i18n
	awk -f instrfilter.awk instrname.cpp >> instrname.i18n


messages: instrname.i18n rc.cpp
	$(XGETTEXT) *.cpp instrname.i18n -o $(podir)/tdemid.pot
