############################################################################
#
# tora - For DBA's and developers
# Copyright (C) 2003 Quest Software, Inc
# 
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation;  only version 2 of
# the License is valid for this program.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
#      As a special exception, you have permission to link this program
#      with the Oracle Client libraries and distribute executables, as long
#      as you follow the requirements of the GNU GPL in regard to all of the
#      software in the executable aside from Oracle client libraries.
#
#      Specifically you are not permitted to link this program with the
#      Qt/UNIX, Qt/Windows or Qt Non Commercial products of TrollTech.
#      And you are not permitted to distribute binaries compiled against
#      these libraries without written consent from Quest Software, Inc.
#      Observe that this does not disallow linking to the Qt Free Edition.
#
# All trademarks belong to their respective owners.
#
############################################################################

# WARNING!!! This file will be overwritten by the configure script.

# Where to install tora
INSTALLPREFIX=$(ROOT)/usr/local

# Where to install tora binary
INSTALLBIN=$(ROOT)/usr/local/bin

# Where to install tora plugins
INSTALLLIB=$(ROOT)/usr/local/lib

# Additional includes needed to compile program
INCLUDES="-I/opt/oracle/app/oracle/product/8.1.7/rdbms/demo" "-I/opt/oracle/app/oracle/product/8.1.7/plsql/public" "-I/opt/oracle/app/oracle/product/8.1.7/rdbms/public" "-I/opt/oracle/app/oracle/product/8.1.7/network/public" "-I/usr/lib/qt3//include"

# C++ Compiler to use
GCC="/usr/bin/cc"

# Additional libraries to link with
LIBS_GLOB=-lm -lpthread -lkdeprint -lkdecore -lkdeui -lDCOP -lkhtml -lkparts -lkio -lcrypt -ldl

# Standard C++ library
STDCPP_SHARED=-lstdc++

# Static version of C++ library (Only needed when linking statically
STDCPP_STATIC=

# Qt library
QT_SHARED= -lqt-mt

# Static Qt library
QT_STATIC=/usr/local/qt3/lib/libqt-mt.a

# Path to Qt meta compiler
MOC="/usr/lib/qt3//bin/moc"

# Path to Qt interface compiler
UIC="/usr/local/qt3/bin/uic"

# Path to Qt translation compiler
LRELEASE="/usr/lib/qt3//bin/lrelease"

# Path to Qt translation update
LUPDATE="/usr/lib/qt3//bin/lupdate"

# Additional paths to find libraries
LFLAGS="-L/usr/lib" -Xlinker "--rpath=/usr/lib" "-L/opt/oracle/app/oracle/product/8.1.7/lib" "-L/usr/lib/qt3//lib" -Xlinker "--rpath=/opt/oracle/app/oracle/product/8.1.7/lib" -Xlinker "--rpath=/usr/lib/qt3//lib" 

# Oracle library
ORACLE_SHARED=-lclntsh

# Static Oracle libraries
ORACLE_STATIC=$(STATIC_ORACLETTLIBS)

# Oracle home path
ORACLE_HOME=/opt/oracle/app/oracle/product/8.1.7

# What to compile, can be tora for plugin version, tora-mono for monolithic, tora-static for static version
TARGET=tora-plugin

# Static MySQL libraries
MYSQL_STATIC=/usr/lib/libmysqlclient.a

# Base directory of KDE installation
KDE_BASE=$(ROOT)/usr

# Additional defines to use while compiling, except for the normal these are available
#   OTL_ORA9I          - Compile for Oracle 9.x
#   OTL_ORA8I          - Compile for Oracle 8.1.x
#   OTL_ORA8           - Compile for Oracle 8.0.x
#   OTL_ORA_TIMESTAMP  - Include support for timestamps
#   TO_NEW_CHECK       - Disable new version check globally
#   TO_KDE             - Compile as KDE application
DEFINES+=-DOTL_ORA8I -DOTL_ORA_TIMESTAMP -DOTL_ANSI_CPP
DEFINES+=-D_REENTRANT -DDEFAULT_PLUGIN_DIR=\"$(INSTALLLIB)/tora\"
DEFINES+=-DQT_THREAD_SUPPORT
DEFINES+=-DTO_KDE

# Where to find perl on your system
PERL=/usr/bin/perl

# Comment out this line if you want more output from compile
.SILENT:

# Additional flags set when using only the precompiler.
CPPFLAGS_GLOB=

# Additional flags to set when linking.
LFLAGS_GLOB=-g -O3

# Additional flags set when compiling.
CFLAGS_GLOB=-g -O3 -fPIC -W -Wall

############################################################################
#
# End of configuration part of Makefile
#
############################################################################

TITLE=tora

API=	\
	tochangeconnection.h	\
	tobackground.h		\
	tobarchart.h		\
	toconf.h		\
	toconnection.h		\
	todatatype.h		\
	todefaultkeywords.h	\
	toeditwidget.h		\
	toextract.h		\
	tofilesize.h		\
	tohelp.h		\
	tohelpbrowser.h		\
	tohighlightedtext.h	\
	tohtml.h		\
	tolegendchart.h		\
	tolinechart.h		\
	tomain.h		\
	tomainwindow.kde.h	\
	tomarkedtext.2.h	\
	tomarkedtext.h		\
	tomemoeditor.h		\
	tonoblockquery.h	\
	toparamget.h		\
	topiechart.h		\
	toqvalue.h		\
	toreport.h              \
	toresult.h		\
	toresultbar.h		\
	toresultcols.h		\
	toresultcombo.h         \
	toresultconstraint.h	\
	toresultcontent.h	\
	toresultdepend.h	\
	toresultfield.h		\
	toresultindexes.h	\
	toresultitem.h		\
	toresultlabel.h		\
	toresultline.h		\
	toresultlong.h		\
	toresultpie.h		\
	toresultplan.h		\
	toresultreferences.h	\
	toresultresources.h	\
	toresultstats.h		\
	toresultview.h		\
	tosgastatement.h	\
	tosmtp.h                \
	tosql.h			\
	tosqlparse.h		\
	totabwidget.h		\
	totemplate.h		\
	totextview.h            \
	tothread.h		\
	totool.h		\
	tovisualize.h		\
	utils.h

SOURCES=\
	toabout.cpp \
	toaboutui.cpp \
	toalert.cpp \
	toanalyze.cpp \
	tobackground.cpp \
	tobackup.cpp \
	tobarchart.cpp \
	tobrowser.cpp \
	tobrowserconstraint.cpp \
	tobrowserconstraintui.cpp \
	tobrowserfilterui.cpp \
	tobrowserindex.cpp \
	tobrowserindexui.cpp \
	tobrowsertable.cpp \
	tobrowsertableui.cpp \
	tochangeconnection.cpp \
	tochartalarmui.cpp \
	tochartmanager.cpp \
	tochartsetupui.cpp \
	toconnection.cpp \
	tocurrent.cpp \
	todatabasesettingui.cpp \
	todatatype.cpp \
	todebug.cpp \
	todebugchangeui.cpp \
	todebugtext.cpp \
	todebugwatch.cpp \
	toeditextensiongotoui.cpp \
	toeditextensions.cpp \
	toeditextensionsetupui.cpp \
	toeditwidget.cpp \
	toextract.cpp \
	tofilesize.cpp \
	toglobalsetting.cpp \
	toglobalsettingui.cpp \
	tohelp.cpp \
	tohelpaddfileui.cpp \
	tohelpsetupui.cpp \
	tohighlightedtext.cpp \
	tohtml.cpp \
	toinvalid.cpp \
	tolegendchart.cpp \
	tolinechart.cpp \
	tolinechartsetupui.cpp \
	tomain.cpp \
	tomarkedtext.cpp \
	tomemoeditor.cpp \
	tomessageui.cpp \
	tonewconnection.cpp \
	tonewconnectionui.cpp \
	tonoblockquery.cpp \
	tooracleconnection.cpp \
	tooracleextract.cpp \
	tooraclepreload.cpp \
	tooraclesettingui.cpp \
	tooutput.cpp \
	toparamget.cpp \
	topassword.cpp \
	topiechart.cpp \
	topreferences.cpp \
	topreferencesui.cpp \
	toprofiler.cpp \
	toproject.cpp \
	toqsqlconnection.cpp \
	toreport.cpp \
	toresult.cpp \
	toresultbar.cpp \
	toresultcols.cpp \
	toresultcombo.cpp \
	toresultconstraint.cpp \
	toresultcontent.cpp \
	toresultcontentfilterui.cpp \
	toresultdepend.cpp \
	toresultextract.cpp \
	toresultfield.cpp \
	toresultindexes.cpp \
	toresultitem.cpp \
	toresultlabel.cpp \
	toresultline.cpp \
	toresultlistformatui.cpp \
	toresultlock.cpp \
	toresultlong.cpp \
	toresultparam.cpp \
	toresultpie.cpp \
	toresultplan.cpp \
	toresultreferences.cpp \
	toresultstats.cpp \
	toresultstorage.cpp \
	toresultview.cpp \
	torollback.cpp \
	torollbackdialogui.cpp \
	toscript.cpp \
	toscriptui.cpp \
	tosearchreplace.cpp \
	tosearchreplaceui.cpp \
	tosecurity.cpp \
	tosecurityquotaui.cpp \
	tosecurityroleui.cpp \
	tosecurityuserui.cpp \
	tosession.cpp \
	tosgastatement.cpp \
	tosgatrace.cpp \
	tosmtp.cpp \
	tosql.cpp \
	tosqledit.cpp \
	tosqlparse.cpp \
	tostorage.cpp \
	tostoragedatafileui.cpp \
	tostoragedefinition.cpp \
	tostoragedefinitionui.cpp \
	tostoragedialogui.cpp \
	tostorageprefsui.cpp \
	tostoragetablespaceui.cpp \
	tosyntaxsetup.cpp \
	tosyntaxsetupui.cpp \
	totableselect.cpp \
	totabwidget.cpp \
	totemplate.cpp \
	totemplateaddfileui.cpp \
	totemplateeditui.cpp \
	totemplateprovider.cpp \
	totemplatesetupui.cpp \
	totemporary.cpp \
	totextview.cpp \
	tothread.cpp \
	totool.cpp \
	totoolsettingui.cpp \
	totuning.cpp \
	totuningoverviewui.cpp \
	totuningsettingui.cpp \
	tovisualize.cpp \
	towaitevents.cpp \
	toworksheet.cpp \
	toworksheetsetupui.cpp \
	toworksheetstatistic.cpp \
	utils.cpp

default: all
include $(ORACLE_HOME)/rdbms/lib/env_rdbms.mk

TRANSLATIONS=\
	tora_se.ts\
	tora_fr.ts\
	tora_it.ts\

CPPFLAGS=$(CPPFLAGS_GLOB) $(DEFINES) $(INCLUDES)
CFLAGS=$(CFLAGS_GLOB) $(INCLUDES) $(DEFINES)

OBJECTS=$(filter %.o,$(SOURCES:%.cpp=objs/%.o))
TRANSOBJ=$(filter %.qm,$(TRANSLATIONS:%.ts=%.qm))

DEPENDS=$(filter %.d,$(SOURCES:%.cpp=.depends/%.d)) .depends/main.d

vpath %.h $(INCLUDE)

.PHONY: all clean fixmod install distclean

all: $(TARGET) lrelease

#$(OBJECTS): Makefile Makefile.common

.depends/%.d: %.cpp
	@echo Making dependencies for $<
	if [ ! -d .depends ] ; then mkdir -p .depends ; fi
	$(GCC) -MM $(CPPFLAGS) $< > $@.tmp && \
		( sed "s/^\(.*\.\)o\([ :]*\)/objs\/\1o \
		$(subst /,\\/,$@)\2/g" < $@.tmp > $@ ; rm -f $@.tmp )

include $(DEPENDS)

%.moc: %.h
	@echo Metacompiling $<
	$(MOC) -o $@ $<

%.cpp %.h: %.ui
	echo Generating $(<:%.ui=%.cpp) \& $(<:%.ui=%.h)
	$(UIC) -o $(<:%.ui=%.h) $<
	$(UIC) -i $(<:%.ui=%.h) -o  $(<:%.ui=%.cpp) $<

plugins/%.tso:
	@echo Linking plugin $@
	if [ ! -d plugins ] ; then mkdir -p plugins ; fi
	$(GCC) -shared $(LFLAGS) $(LFLAGS_GLOB) $(CFLAGS) $(QT_SHARED) -o $@ $^

objs/%.o: %.cpp
	@echo Compiling $<
	if [ ! -d objs ] ; then mkdir -p objs ; fi
	$(GCC) $(CFLAGS) -o $@ -c $<

%.o : objs/%.o
	@echo Faulty dependency, forgot the objs/ part

install-common: lrelease
	if [ \! -f $(TARGET) ] ; then cp tora $(TARGET) ; fi
	mkdir -p $(INSTALLBIN)
	mkdir -p $(INSTALLLIB)/tora/help
	-cp templates/*.tpl $(INSTALLLIB)/tora >/dev/null 2>&1
	-cp -r help/* $(INSTALLLIB)/tora/help >/dev/null 2>&1
	-cp  *.qm $(INSTALLLIB)/tora >/dev/null 2>&1

install: $(TARGET) install-common install-kde
	@echo Install $(TARGET) to $(INSTALLBIN)
	if [ \! -f $(TARGET) ] ; then cp tora $(TARGET) ; fi
	-strip $(TARGET) plugins/* >/dev/null 2>&1
	cp $(TARGET) $(INSTALLBIN)/tora
	if [ -f tora-plugin ] ; \
	    then cp $(TARGET) $(INSTALLBIN)/tora ; \
	    rm -f tora-plugin ; \
	else cp $(TARGET) $(INSTALLBIN)/tora.real ; \
	    cp rpm/tora.sh $(INSTALLBIN)/tora ; \
	fi
	rm -f $(INSTALLLIB)/tora/*.tso
	-cp plugins/* $(INSTALLLIB)/tora >/dev/null 2>&1

install-debug: tora-mono install-common
	@echo Install tora with debugging symbols to $(INSTALLBIN)
	cp tora-mono $(INSTALLBIN)/tora

install-kde:
	mkdir -p $(KDE_BASE)/share/icons/hicolor/32x32/apps
	mkdir -p $(KDE_BASE)/share/icons/hicolor/16x16/apps 
	mkdir -p $(KDE_BASE)/share/applnk/Development
	cp -f icons/tora.xpm $(KDE_BASE)/share/icons/hicolor/32x32/apps/tora.xpm
	cp -f icons/toramini.xpm $(KDE_BASE)/share/icons/hicolor/16x16/apps/tora.xpm
	cp -f rpm/tora.desktop $(KDE_BASE)/share/applnk/Development/tora.desktop

uninstall:
	@echo Uninstalling from $(INSTALLPREFIX)
	-rm -f $(INSTALLBIN)/tora
	-rm -rf $(INSTALLLIB)/tora

clean:
	@echo Cleaning $(TITLE)
	-rm -rf objs tora tora-static tora-mono >/dev/null 2>&1
	-rm -f *~ >/dev/null 2>&1
	-rm -f *~ */*~ >/dev/null 2>&1
	-rm -f *.bak >/dev/null 2>&1
	-rm -rf plugins >/dev/null 2>&1
	-for a in *.ui ; \
             do rm -f `$(PERL) -e '$$_=shift(@ARGV); s/\.[^\.]*$$//; print "$$_.h\n$$_.cpp";' $$a`; \
         done

distclean: clean
	-rm -rf .depends >/dev/null 2>&1
	-rm -rf .xvpics >/dev/null 2>&1
	-rm -rf icons/.xvpics >/dev/null 2>&1
	-rm -f *.moc qtlegacy/*.moc >/dev/null 2>&1 
	-rm -f rpmcommon rpmoracle >/dev/null 2>&1 
	-rm -f \#*\# >/dev/null 2>&1
	-rm -f Makefile >/dev/null 2>&1
	-rm -f LICENSE.h >/dev/null 2>&1
	-rm -f configure.setup >/dev/null 2>&1

# This pretty requires a kdoc installtion and reference files for Qt and KDE Libs.
# configure won't try to detect those. It's up to you.

apidoc: $(API)
	mkdir -p help/api
	kdoc -n tora -d help/api $^ -lqt -lkdeui -lkhtml

# Plugin definitions

plugins/toalert.tso:\
	objs/toalert.o
plugins/toanalyze.tso:\
	objs/toanalyze.o \
	objs/toworksheetstatistic.o
plugins/tobackup.tso:\
	objs/tobackup.o
plugins/tobrowser.tso:\
	objs/tobrowser.o \
	objs/tobrowserconstraint.o \
	objs/tobrowserconstraintui.o \
	objs/tobrowserfilterui.o \
	objs/tobrowserindex.o \
	objs/tobrowserindexui.o \
	objs/tobrowsertable.o \
	objs/tobrowsertableui.o
plugins/tochart.tso:\
	objs/tobarchart.o \
	objs/tochartalarmui.o \
	objs/tochartmanager.o \
	objs/tochartsetupui.o \
	objs/tolegendchart.o \
	objs/tolinechart.o \
	objs/tolinechartsetupui.o \
	objs/topiechart.o \
	objs/toresultbar.o \
	objs/toresultline.o \
	objs/toresultpie.o
plugins/tocurrent.tso:\
	objs/tocurrent.o
plugins/todebug.tso:\
	objs/todebug.o \
	objs/todebugwatch.o \
	objs/todebugtext.o \
	objs/todebugchangeui.o
plugins/toeditextensions.tso:\
	objs/toeditextensions.o \
	objs/toeditextensiongotoui.o \
	objs/toeditextensionsetupui.o
plugins/toextract.tso:\
	objs/todatatype.o \
	objs/toextract.o \
	objs/toreport.o \
	objs/toresultconstraint.o \
	objs/toresultextract.o
plugins/toinvalid.tso:\
	objs/toinvalid.o
plugins/tooracleconnection.tso:\
	objs/tooracleconnection.o \
	objs/tooracleextract.o \
	objs/tooraclesettingui.o
	@echo Linking plugin $@
	if [ ! -d plugins ] ; then mkdir -p plugins ; fi
	$(GCC) -shared $(CFLAGS) $(LFLAGS) $(LFLAGS_GLOB) -o $@ $^ $(ORACLE_SHARED)
plugins/tooraclepreload.tso:\
	objs/tooraclepreload.o
plugins/tooutput.tso:\
	objs/tooutput.o
plugins/topassword.tso:\
	objs/topassword.o
plugins/toprofiler.tso:\
	objs/toprofiler.o
plugins/toproject.tso:\
	objs/toproject.o
plugins/toqsqlconnection.tso:\
	objs/toqsqlconnection.o
plugins/toresult.tso:\
	objs/toresultcols.o \
	objs/toresultcombo.o \
	objs/toresultcontent.o \
	objs/toresultcontentfilterui.o \
	objs/toresultdepend.o \
	objs/toresultindexes.o \
	objs/toresultlabel.o \
	objs/toresultlock.o \
	objs/toresultlong.o \
	objs/toresultplan.o \
	objs/toresultparam.o \
	objs/toresultreferences.o \
	objs/toresultstorage.o
plugins/torollback.tso:\
	objs/torollback.o \
	objs/torollbackdialogui.o
plugins/toscript.tso:\
	objs/toscript.o \
	objs/toscriptui.o
plugins/tosecurity.tso:\
	objs/tosecurity.o \
	objs/tosecurityquotaui.o \
	objs/tosecurityroleui.o \
	objs/tosecurityuserui.o
plugins/tosession.tso:\
	objs/tosession.o
plugins/tosgatrace.tso:\
	objs/tosgatrace.o
plugins/tosqledit.tso:\
	objs/tosqledit.o
plugins/tostorage.tso:\
	objs/tostorage.o \
	objs/tostoragedatafileui.o \
	objs/tostoragedialogui.o \
	objs/tostorageprefsui.o \
	objs/tostoragetablespaceui.o
plugins/tostoragedefinition.tso:\
	objs/tostoragedefinition.o \
	objs/tostoragedefinitionui.o
plugins/totemplate.tso:\
	objs/totemplate.o \
	objs/totemplateaddfileui.o \
	objs/totemplateeditui.o \
	objs/totemplatesetupui.o
plugins/totemporary.tso:\
	objs/totemporary.o
plugins/totuning.tso:\
	objs/totuning.o \
	objs/totuningoverviewui.o \
	objs/totuningsettingui.o
plugins/towidget.tso:\
	objs/tochangeconnection.o \
	objs/tofilesize.o \
	objs/tosgastatement.o \
	objs/totableselect.o \
	objs/tovisualize.o \
	objs/towaitevents.o
plugins/toworksheet.tso:\
	objs/toworksheet.o \
	objs/toworksheetsetupui.o

# Plugin based binary and its plugins

tora-plugin:\
	tora \
	plugins/toalert.tso \
	plugins/toanalyze.tso \
	plugins/tobackup.tso \
	plugins/tobrowser.tso \
	plugins/tochart.tso \
	plugins/tocurrent.tso \
	plugins/todebug.tso \
	plugins/toeditextensions.tso \
	plugins/toextract.tso \
	plugins/toinvalid.tso \
	plugins/tooracleconnection.tso \
	plugins/tooraclepreload.tso \
	plugins/tooutput.tso \
	plugins/topassword.tso \
	plugins/toprofiler.tso \
	plugins/toproject.tso \
	plugins/toqsqlconnection.tso \
	plugins/toresult.tso \
	plugins/torollback.tso \
	plugins/toscript.tso \
	plugins/tosecurity.tso \
	plugins/tosession.tso \
	plugins/tosgatrace.tso \
	plugins/tosqledit.tso \
	plugins/tostorage.tso \
	plugins/tostoragedefinition.tso \
	plugins/totemplate.tso \
	plugins/totemporary.tso \
	plugins/totuning.tso \
	plugins/towidget.tso \
	plugins/toworksheet.tso
# Keyboard shortcuts

main.cpp: tora_toad.h

tora_toad.h: tora_toad.qm
	$(PERL) chex.pl < $< > $@

tora_toad.qm: tora_toad.ts
	$(LRELEASE) $<

# Monolithic target, for non ELF platforms

tora-mono: $(OBJECTS) main.cpp
	@echo Linking $@
	$(GCC) $(CFLAGS) $(LFLAGS) $(LFLAGS_GLOB) -DTOMONOLITHIC -o $@ $(OBJECTS) main.cpp \
		$(LIBS_GLOB) $(STDCPP_SHARED) $(ORACLE_SHARED) $(QT_SHARED)

# Static target, easier to distribute

tora-static: $(OBJECTS) main.cpp
	@echo Linking $@
	$(GCC) $(LFLAGS) $(CFLAGS) $(LFLAGS_GLOB) -DTOMONOLITHIC -o $@ $(OBJECTS) main.cpp \
		$(QT_STATIC) $(STDCPP_STATIC) $(ORACLE_SHARED) $(LIBS_GLOB) \
		-L/usr/X11R6/lib -lXext -lX11 \
		$(MYSQL_STATIC) /usr/lib/libpq.a /usr/lib/libssl.a /usr/lib/libcrypto.a

# The binary for the pluginbased tora

tora.pro: Makefile
	echo "# Not indended to be used for anything except lupdate" > tora.pro
	echo 'SOURCES=	license/tolicense.cpp\' >> tora.pro
	echo '	license/tolicenseui.cpp\' >> tora.pro
	echo '	main.cpp\' >> tora.pro
	echo '	toextratranslations.cpp\' >> tora.pro
	echo "	$(SOURCES)" >> tora.pro
	echo 'TRANSLATIONS=$(TRANSLATIONS)' >> tora.pro

lupdate: tora.pro
	$(LUPDATE) tora.pro

lrelease: tora.pro $(TRANSLATIONS)
	$(LRELEASE) tora.pro

tora:\
	objs/toabout.o \
	objs/toaboutui.o \
	objs/tobackground.o \
	objs/toconnection.o \
	objs/todatabasesettingui.o \
	objs/toeditwidget.o \
	objs/toglobalsetting.o \
	objs/toglobalsettingui.o \
	objs/tohelp.o \
	objs/tohelpaddfileui.o \
	objs/tohelpsetupui.o \
	objs/tohighlightedtext.o \
	objs/tohtml.o \
	objs/tomain.o \
	objs/tomarkedtext.o \
	objs/tomemoeditor.o \
	objs/tomessageui.o \
	objs/tonewconnection.o \
	objs/tonewconnectionui.o \
	objs/tonoblockquery.o \
	objs/toparamget.o \
	objs/topreferences.o \
	objs/topreferencesui.o \
	objs/toresult.o \
	objs/toresultfield.o \
	objs/toresultitem.o \
	objs/toresultlistformatui.o \
	objs/toresultstats.o \
	objs/toresultview.o \
	objs/tosearchreplace.o \
	objs/tosearchreplaceui.o \
	objs/tosmtp.o \
	objs/tosql.o \
	objs/tosqlparse.o \
	objs/tosyntaxsetup.o \
	objs/tosyntaxsetupui.o \
	objs/totabwidget.o \
	objs/totemplateprovider.o \
	objs/totextview.o \
	objs/tothread.o \
	objs/totool.o \
	objs/totoolsettingui.o \
	objs/utils.o\
	main.cpp
	@echo Linking $@
	$(GCC) $(CFLAGS) $(LFLAGS) -Xlinker "--export-dynamic" $(LFLAGS_GLOB) \
		-o $@ $^ $(LIBS_GLOB) $(STDCPP_SHARED) $(QT_SHARED)
