SUBDIRS = docs icons sounds ui ts

bin_PROGRAMS = valknut

# any header that includes a class which inherits QObject must be
# processed by moc to produce a source file
# QThread is a QObject in QT4 but not in QT3
NON_MOC_H = \
$(srcdir)/about.h \
$(srcdir)/dcevent.h \
$(srcdir)/dcfilebrowseritems.h \
$(srcdir)/dcfiletool.h \
$(srcdir)/dcfriendobject.h \
$(srcdir)/dcguiutils.h \
$(srcdir)/dchublistitems.h \
$(srcdir)/dciconloader.h \
$(srcdir)/dcmenuhandler.h \
$(srcdir)/dcpluginmanager.h \
$(srcdir)/dctransferviewitems.h

MOC_H = \
$(srcdir)/dcapplicationevents.h \
$(srcdir)/dcchat.h \
$(srcdir)/dcclient.h \
$(srcdir)/dcconfig.h \
$(srcdir)/dcconnectionmanager.h \
$(srcdir)/dcdebug.h \
$(srcdir)/dceditserver.h \
$(srcdir)/dcedittransfer.h \
$(srcdir)/dcfilebrowser.h \
$(srcdir)/dcfilelistdecompressor.h \
$(srcdir)/dcfiletransferinfo.h \
$(srcdir)/dcgui.h \
$(srcdir)/dchubfilter.h \
$(srcdir)/dchublistmanager.h \
$(srcdir)/dchubprofile.h \
$(srcdir)/dchubsearch.h \
$(srcdir)/dcoptions.h \
$(srcdir)/dcshellcommandrunner.h \
$(srcdir)/dcsigterm.h \
$(srcdir)/dcsplash.h \
$(srcdir)/dcspy.h \
$(srcdir)/dctransferview.h \
$(srcdir)/dctranslator.h \
$(srcdir)/dcusercommandeditor.h \
$(srcdir)/dcuserslist.h

MOC_CPP = \
dcapplicationevents.moc.cpp \
dcchat.moc.cpp \
dcclient.moc.cpp \
dcconfig.moc.cpp \
dcconnectionmanager.moc.cpp \
dcdebug.moc.cpp \
dceditserver.moc.cpp \
dcedittransfer.moc.cpp \
dcfilebrowser.moc.cpp \
dcfilelistdecompressor.moc.cpp \
dcfiletransferinfo.moc.cpp \
dcgui.moc.cpp \
dchubfilter.moc.cpp \
dchublistmanager.moc.cpp \
dchubprofile.moc.cpp \
dchubsearch.moc.cpp \
dcoptions.moc.cpp \
dcshellcommandrunner.moc.cpp \
dcsigterm.moc.cpp \
dcsplash.moc.cpp \
dcspy.moc.cpp \
dctransferview.moc.cpp \
dctranslator.moc.cpp \
dcusercommandeditor.moc.cpp \
dcuserslist.moc.cpp

valknut_SOURCES = \
$(srcdir)/dcapplicationevents.cpp \
$(srcdir)/dcchat.cpp \
$(srcdir)/dcclient.cpp \
$(srcdir)/dcconfig.cpp \
$(srcdir)/dcconnectionmanager.cpp \
$(srcdir)/dcdebug.cpp \
$(srcdir)/dceditserver.cpp \
$(srcdir)/dcedittransfer.cpp \
$(srcdir)/dcevent.cpp \
$(srcdir)/dcfilebrowser.cpp \
$(srcdir)/dcfilebrowseritems.cpp \
$(srcdir)/dcfilelistdecompressor.cpp \
$(srcdir)/dcfiletool.cpp \
$(srcdir)/dcfiletransferinfo.cpp \
$(srcdir)/dcgui.cpp \
$(srcdir)/dcguiutils.cpp \
$(srcdir)/dchubfilter.cpp \
$(srcdir)/dchublistmanager.cpp \
$(srcdir)/dchubprofile.cpp \
$(srcdir)/dchubsearch.cpp \
$(srcdir)/dciconloader.cpp \
$(srcdir)/dcmenuhandler.cpp \
$(srcdir)/dcoptions.cpp \
$(srcdir)/dcpluginmanager.cpp \
$(srcdir)/dcshellcommandrunner.cpp \
$(srcdir)/dcsigterm.cpp \
$(srcdir)/dcsplash.cpp \
$(srcdir)/dcspy.cpp \
$(srcdir)/dctransferview.cpp \
$(srcdir)/dctranslator.cpp \
$(srcdir)/dcusercommandeditor.cpp \
$(srcdir)/dcuserslist.cpp \
$(srcdir)/main.cpp

nodist_valknut_SOURCES = \
$(MOC_CPP)

# apparently this is needed otherwise automake tries incredibly
# hard not to run moc
BUILT_SOURCES = $(MOC_CPP)

valknut_LDADD   = ui/libui.la

# the library search path. 
valknut_LDFLAGS = $(QTCORE_LIBS) $(QTGUI_LIBS) $(QTNETWORK_LIBS) $(QT3SUPPORT_LIBS) $(DCLIB_LIBS)

# generated headers will be in ui but proper headers will be in $(srcdir)/ui
AM_CPPFLAGS = -I$(top_srcdir) -Iui -I$(srcdir)/ui -I $(PACKAGE_FLAGS) -DVALKNUT_DATAPATH='"$(pkgdatadir)"'
AM_CXXFLAGS = @CXXFLAGS@ $(PACKAGE_FLAGS) $(QTCORE_CFLAGS) $(QTGUI_CFLAGS) $(QTNETWORK_CFLAGS) $(QT3SUPPORT_CFLAGS) $(DCLIB_CFLAGS) -DVALKNUT_DATAPATH='"$(pkgdatadir)"' $(DEBUGCOMPILE)

DISTCLEANFILES = $(MOC_CPP)



dcapplicationevents.moc.cpp : $(srcdir)/dcapplicationevents.h
	$(MOC) -o $@ $<

dcchat.moc.cpp : $(srcdir)/dcchat.h
	$(MOC) -o $@ $<

dcclient.moc.cpp : $(srcdir)/dcclient.h
	$(MOC) -o $@ $<

dcconfig.moc.cpp : $(srcdir)/dcconfig.h
	$(MOC) -o $@ $<

dcconnectionmanager.moc.cpp : $(srcdir)/dcconnectionmanager.h
	$(MOC) -o $@ $<

dcdebug.moc.cpp : $(srcdir)/dcdebug.h
	$(MOC) -o $@ $<

dceditserver.moc.cpp : $(srcdir)/dceditserver.h
	$(MOC) -o $@ $<

dcedittransfer.moc.cpp : $(srcdir)/dcedittransfer.h
	$(MOC) -o $@ $<

dcfilebrowser.moc.cpp : $(srcdir)/dcfilebrowser.h
	$(MOC) -o $@ $<

dcfilelistdecompressor.moc.cpp : $(srcdir)/dcfilelistdecompressor.h
	$(MOC) -o $@ $<

dcfiletransferinfo.moc.cpp : $(srcdir)/dcfiletransferinfo.h
	$(MOC) -o $@ $<

dcgui.moc.cpp : $(srcdir)/dcgui.h
	$(MOC) -o $@ $<

dchubfilter.moc.cpp : $(srcdir)/dchubfilter.h
	$(MOC) -o $@ $<

dchublistmanager.moc.cpp : $(srcdir)/dchublistmanager.h
	$(MOC) -o $@ $<

dchubprofile.moc.cpp : $(srcdir)/dchubprofile.h
	$(MOC) -o $@ $<

dchubsearch.moc.cpp : $(srcdir)/dchubsearch.h
	$(MOC) -o $@ $<

dcoptions.moc.cpp : $(srcdir)/dcoptions.h
	$(MOC) -o $@ $<

dcshellcommandrunner.moc.cpp : $(srcdir)/dcshellcommandrunner.h
	$(MOC) -o $@ $<

dcsigterm.moc.cpp : $(srcdir)/dcsigterm.h
	$(MOC) -o $@ $<

dcsplash.moc.cpp : $(srcdir)/dcsplash.h
	$(MOC) -o $@ $<

dcspy.moc.cpp : $(srcdir)/dcspy.h
	$(MOC) -o $@ $<

dctransferview.moc.cpp : $(srcdir)/dctransferview.h
	$(MOC) -o $@ $<

dctranslator.moc.cpp : $(srcdir)/dctranslator.h
	$(MOC) -o $@ $<

dcusercommandeditor.moc.cpp : $(srcdir)/dcusercommandeditor.h
	$(MOC) -o $@ $<

dcuserslist.moc.cpp : $(srcdir)/dcuserslist.h
	$(MOC) -o $@ $<
