
KDE_CXXFLAGS = $(USE_RTTI) $(USE_EXCEPTIONS) -UQT_NO_ASCII_CAST

# set the include path for X, qt and KDE
INCLUDES= -IKSOpenkSirc -IKSPrefs $(all_includes)

# claim, which subdirectories you want to install
SUBDIRS = KSProgress KSPrefs KSOpenkSirc img 

METASOURCES = AUTO

bin_PROGRAMS = ksirc

check_PROGRAMS = testview

testview_SOURCES = kstextviewtest.cpp
testview_LDADD = kstextview.lo $(LIB_KDEUI)
testview_LDFLAGS = $(all_libraries) $(KDE_RPATH)

lib_LTLIBRARIES = ksirc.la

noinst_PROGRAMS = getdate

# Which sources should be compiled for ksirc.

ksirc_la_SOURCES = \
	toplevel.cpp \
	charSelector.cpp \
	chanButtons.cpp \
	ksirc.cpp \
	alistbox.cpp \
	ahistlineedit.cpp \
	iocontroller.cpp \
	NewWindowDialog.cpp \
	messageReceiver.cpp \
	ioBroadcast.cpp \
	ksircprocess.cpp \
	servercontroller.cpp \
	FilterRuleEditor.cpp FilterRuleWidget.ui \
	ioDiscard.cpp \
	ioDCC.cpp dccDialog.cpp dccDialogData.cpp \
	ioLAG.cpp \
	ioNotify.cpp \
	ssfeprompt.cpp ssfepromptdata.cpp \
	usercontrolmenu.cpp \
	baserules.cpp \
	chanparser.cpp \
	objFinder.cpp \
	displayMgrSDI.cpp \
	displayMgrMDI.cpp \
	mditoplevel.cpp \
	ksopts.cpp \
	topic.cpp \
	ksview.cpp \
	logfile.cpp \
        kstextview.cpp \
        colorpicker.cpp

# the library search path
ksirc_la_LDFLAGS = $(all_libraries) -module -avoid-version
ksirc_la_COMPILE_FIRST = cdate.h

all_ksirc_libraries = \
	./KSPrefs/libksprefs.la \
	./KSProgress/libksprogress.la  \
	./KSOpenkSirc/libksopenksirc.la \
	$(LIB_KFILE) $(LIBDL) 

# the libraries to link against. Be aware of the order. First the libraries,
# that depend on the following ones.
ksirc_la_LIBADD   = $(all_ksirc_libraries)

ksirc_SOURCES = dummy.cpp
ksirc_LDADD = ksirc.la
ksirc_LDFLAGS = $(all_libraries) $(KDE_RPATH)

kdoc:
	kdoc -ddoc ksirc *.h

getdate_SOURCES = getdate.c

cdate.h: getdate
	./getdate > cdate.h

# this option you can leave out. Just, if you use "make dist", you need it
#
# DSIRC is on the bottom so make dist includes it!!!!!!!!!
#
noinst_HEADERS = \
	FilterRuleEditor.h \
	control_message.h \
	FilterRuleWidget.h \
	dccDialog.h \
	messageReceiver.h \
	dccDialogData.h \
	ioBroadcast.h \
	ioDCC.h \
	usercontrolmenu.h \
	ioDiscard.h \
	ahistlineedit.h \
	iocontroller.h \
	servercontroller.h \
	alistbox.h \
	chanparser.h \
	toplevel.h \
	ksircprocess.h \
	cdate.h \
	ioLAG.h \
	ioNotify.h \
	ssfeprompt.h \
	ssfepromptdata.h \
	usercontrolmenu.h \
	objFinder.h \
	baserules.h \
	displayMgr.h \
	displayMgrSDI.h \
	NewWindowDialog.h \
    ksopts.h \
	ksview.h \
	boundscheckingarray.h

messages: rc.cpp
	$(EXTRACTRC) KSOpenkSirc/*.ui >> rc.cpp
	$(EXTRACTRC) KSPrefs/*.ui >> rc.cpp
	$(XGETTEXT) *.cpp */*.cpp -o $(podir)/ksirc.pot

bin_SCRIPTS = dsirc

apps_DATA = ksirc.desktop
appsdir = $(kde_appsdir)/Internet

misc_DATA = ksirc.pl filters.pl sirc.help.gz relnotes eventsrc
miscdir = $(kde_datadir)/ksirc

conf_DATA = ksircrc
confdir = $(kde_confdir)

dummy.cpp:
	echo > dummy.cpp
