####### Various modules for artsmodules

SUBDIRS = mcopclass
INCLUDES= -I$(top_builddir)/arts/runtime -I$(srcdir)/freeverb -I$(arts_includes) $(all_includes)

lib_LTLIBRARIES = libartsmidi_idl.la libartsmidi.la

bin_PROGRAMS = midisend
noinst_PROGRAMS = midisynctest

midisend_SOURCES = midisend.cpp midimsg.c
midisend_LDFLAGS = $(all_libraries) $(LIB_TQT) $(KDE_RPATH) $(LIBPTHREAD) $(LIB_TQT) -lmcop -lartsflow_idl
midisend_LDADD   = libartsmidi_idl.la -lartsflow_idl
midisend_COMPILE_FIRST = artsmidi.h

midisynctest_SOURCES = midisynctest.cpp
midisynctest_LDFLAGS = $(all_libraries) $(LIB_TQT) $(KDE_RPATH) $(LIBPTHREAD) $(LIB_TQT) -lmcop -lartsflow_idl -lartsmidi_idl
midisynctest_LDADD   = libartsmidi.la -lsoundserver_idl -lartsflow_idl -lartsmidi_idl
midisynctest_COMPILE_FIRST = artsmidi.h

libartsmidi_idl_la_SOURCES = artsmidi.cpp
libartsmidi_idl_la_LIBADD = -lmcop -lartsflow -lartsflow_idl
libartsmidi_idl_la_LDFLAGS = $(all_libraries) -L$(arts_libraries) \
  -no-undefined -lartsflow_idl

libartsmidi_la_SOURCES = midimanager_impl.cpp midiclient_impl.cpp \
	miditest_impl.cpp midimanagerport_impl.cpp rawmidiport_impl.cpp \
	systemmiditimer_impl.cpp audiomiditimer_impl.cpp miditimercommon.cpp \
	audiosync_impl.cpp audiotimer.cpp alsamidigateway_impl.cpp \
	alsamidiport_impl.cpp midisyncgroup_impl.cpp timestampmath.cpp
libartsmidi_la_COMPILE_FIRST = artsmidi.h

libartsmidi_la_LIBADD = libartsmidi_idl.la -lartsflow_idl -lartsflow $(ARTS_LIBASOUND)
libartsmidi_la_LDFLAGS = $(all_libraries) -L$(arts_libraries) \
  -no-undefined -lartsflow_idl

artsmidi.mcopclass: artsmidi.h
artsmidi.mcoptype: artsmidi.h
artsmidi.cpp artsmidi.h: $(srcdir)/artsmidi.idl $(MCOPIDL)
	$(MCOPIDL) -t -I$(arts_includes) $(srcdir)/artsmidi.idl

DISTCLEANFILES = artsmidi.cpp artsmidi.h \
  artsmidi.mcoptype artsmidi.mcopclass

####### install idl files

artsincludedir = $(includedir)/arts
artsinclude_HEADERS = artsmidi.h artsmidi.idl

mcoptypedir = $(libdir)/mcop
mcoptype_DATA = artsmidi.mcoptype artsmidi.mcopclass

artsmidi.lo: artsmidi.h
