# Library makefile for the Simply Powerful Tool Kit (SPTK).
# Copyright 2000-2003 by Alexey Parshin.

# ./sptk3 contains headers, and Makefile.am in there is used
# during install to copy them where needed
SUBDIRS=. sptk3
if BUILD_EXAMPLES
    SUBDIRS+=examples
endif

lib_LTLIBRARIES = libsputil3.la libspdb3.la

if BUILD_EXCEL
    lib_LTLIBRARIES+=libspxl3.la
endif
if USE_FLTK
    lib_LTLIBRARIES+=libsptk3.la
    SUBDIRS+=.themes.sptk
endif

LDADD = @FLTK_LDFLAGS@ @ODBC_LIBS@ @ASPELL_LIBS@
AM_CFLAGS=@FLTK_CFLAGS@ @DEBUGFLAG@ -Wall -pedantic
AM_CXXFLAGS=@FLTK_CXXFLAGS@ @DEBUGFLAG@ -Wall -pedantic

libsputil3_la_SOURCES = \
    src/CBase64.cpp \
    src/CBaseMailConnect.cpp \
    src/CBuffer.cpp \
    src/CCGI.cpp \
    src/CDateTime.cpp \
    src/CException.cpp \
    src/CField.cpp \
    src/CFieldList.cpp \
    src/CFTPConnect.cpp \
    src/CHttpConnect.cpp \
    src/CHttpParams.cpp \
    src/CImapConnect.cpp \
    src/CIntList.cpp \
    src/CLogFile.cpp \
    src/CMailConnect.cpp \
    src/CMailMessageBody.cpp \
    src/CRWLock.cpp \
    src/CRegistry.cpp \
    src/CSmtpConnect.cpp \
    src/CSocket.cpp \
    src/CStrings.cpp \
    src/CThread.cpp \
    src/CUniqueInstance.cpp \
    src/CVariant.cpp \
    src/CWaiter.cpp \
    src/xml/CXmlDoc.cpp \
    src/xml/CXmlNode.cpp \
    src/xml/CXmlParser.cpp \
    src/xml/CXmlTokenizer.cpp \
    src/istring.cpp \
    src/string_ext.cpp

libspdb3_la_LIBADD = 

libspdb3_la_SOURCES = \
	src/CParams.cpp \
	src/CQuery.cpp \
	src/CDatabase.cpp \
	src/CDataSource.cpp \
	src/CTransaction.cpp \
	src/drivers/CDatabaseField.cpp
if USE_ODBC
    libspdb3_la_SOURCES+= \
	src/drivers/odbc/CODBC.cpp \
	src/drivers/odbc/CODBCDatabase.cpp 
    libspdb3_la_LIBADD+=@ODBC_LIBS@
endif

if USE_SQLITE3
    libspdb3_la_SOURCES+= \
	src/drivers/SQLite3/CSQLite3Database.cpp 
    libspdb3_la_LIBADD+=@SQLITE3_LIBS@
endif

libspxl3_la_SOURCES = src/excel/CExcelBAT.cpp src/excel/CExcelBook.cpp \
    src/excel/CExcelDBCellRecord.cpp src/excel/CExcelCellFormat.cpp \
    src/excel/CExcelNumericFormat.cpp src/excel/CExcelFont.cpp src/excel/CExcelColumn.cpp \
    src/excel/CExcelHeader.cpp src/excel/CExcelIndex.cpp src/excel/CExcelProperty.cpp \
    src/excel/CExcelRecord.cpp src/excel/CExcelRecordsBuffer.cpp src/excel/CExcelRowRecord.cpp \
    src/excel/CExcelSST.cpp src/excel/CExcelSheet.cpp src/excel/CExcelStyle.cpp \
    src/excel/CExcelPalette.cpp src/excel/CExcelRow.cpp src/excel/CExcelRows.cpp

libsptk3_la_SOURCES =     src/CButton.cpp \
    src/CButtonGroup.cpp \
    src/CCalendar.cpp \
    src/CCheckButtons.cpp \
    src/CColumn.cpp \
    src/CComboBox.cpp \
    src/CControl.cpp \
    src/CControlList.cpp \
    src/CDateControl.cpp \
    src/CMemoryDS.cpp \
    src/CDirectoryDS.cpp \
    src/CDBListView.cpp \
    src/CDialog.cpp \
    src/CDropDownBox.cpp \
    src/CEditor.cpp \
    src/CFileDialog.cpp \
    src/CFileOpenDialog.cpp \
    src/CFileSaveDialog.cpp \
    src/CFontComboBox.cpp \
    src/CFtpDS.cpp \
    src/CGroup.cpp \
    src/CImapDS.cpp \
    src/CInput.cpp \
    src/CLayoutManager.cpp \
    src/CListView.cpp \
    src/CListViewRows.cpp \
    src/CListViewSelection.cpp \
    src/CMessageDialog.cpp \
    src/CPackedStrings.cpp \
    src/CPopupWindow.cpp \
    src/CProgressBar.cpp \
    src/CRadioButtons.cpp \
    src/CScroll.cpp \
    src/CScrollBar.cpp \
    src/CSmallPixmaps.cpp \
    src/CSplitter.cpp \
    src/CTabs.cpp \
    src/CThemes.cpp \
    src/CToolBar.cpp \
    src/CTreeControl.cpp \
    src/CTreeView.cpp \
    src/CWindow.cpp \
    src/CDataControl.cpp
if USE_ASPELL
    libsptk3_la_SOURCES+=src/CEditorSpellChecker.cpp
endif
libsptk3_la_LIBADD=@ASPELL_LIBS@ @FLTK_LDFLAGS@

########### I'm not sure this is 100% cosher
examples:
	$(MAKE) -C examples

.PHONY: examples

