Other types of source files

To compile Qt-designer UI files, use

foo_SOURCES = mydialog.ui

To compile a DCOP stub (the client side, calling methods) or skel (the "server" side, where the object is implemented), use

foo_SOURCES = client.stub obj.skel
if the header file is in the current directory. Otherwise you need to specify where it is, with for instance:

KDesktopIface_DIR = $(top_srcdir)/kdesktop
foo_SOURCES = KDesktopIface.stub

To generate sources yourself, e.g. with a perl script, use

generated.cpp: $(srcdir)/myscript $(srcdir)/mydata
	$(PERL) $(srcdir)/myscript $(srcdir)/mydata -o $@

CLEANFILES = generated.cpp

For generated cpp files only, this is sufficient, simply add generated.cpp to a _SOURCES line. For a generated header file, you might have to ensure it's being compiled first, either with proper dependencies like

foo.lo: myheader.h
or with
target_COMPILE_FIRST = myheader.h

In case there is a big number of compiled files, you can use variables, to list them only once in CLEANFILES and target_COMPILE_FIRST, but you still need to write a two-line rule for each.