diff -uNr kdevelop/languages/cpp/Makefile.am kdevelop-new/languages/cpp/Makefile.am
--- kdevelop/languages/cpp/Makefile.am	Fri Nov 14 11:21:25 2003
+++ kdevelop-new/languages/cpp/Makefile.am	Sat Nov 22 17:47:07 2003
@@ -4,11 +4,19 @@
 
 INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/catalog -I$(top_srcdir)/lib/cppparser $(all_includes)
 
+noinst_LTLIBRARIES = libkdevcppcommon.la
 kde_module_LTLIBRARIES = libkdevcppsupport.la
+
+libkdevcppcommon_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+libkdevcppcommon_la_LIBADD = $(top_builddir)/lib/libkdevelop.la $(top_builddir)/lib/catalog/libkdevcatalog.la $(top_builddir)/lib/cppparser/libkdevcppparser.la
+libkdevcppcommon_la_SOURCES = cppsupportpart.cpp ccconfigwidget.cpp ccconfigwidgetbase.ui kdevdriver.cpp cppcodecompletion.cpp problemreporter.cpp configproblemreporter.ui backgroundparser.cpp ast_utils.cpp store_walker.cpp KDevCppSupportIface.cpp KDevCppSupportIface.skel cppsupportfactory.cpp tag_creator.cpp codeinformationrepository.cpp doxydoc.cpp cppcodecompletionconfig.cpp cppnewclassdlgbase.ui cppnewclassdlg.cpp classgeneratorconfig.cpp classgeneratorconfigbase.ui subclassingdlg.cpp subclassingdlgbase.ui addattributedialogbase.ui addmethoddialogbase.ui addattributedialog.cpp addmethoddialog.cpp cppsupport_utils.cpp createpcsdialogbase.ui createpcsdialog.cpp
+
 libkdevcppsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
-libkdevcppsupport_la_LIBADD = $(top_builddir)/lib/libkdevelop.la $(top_builddir)/lib/catalog/libkdevcatalog.la $(top_builddir)/lib/cppparser/libkdevcppparser.la
+libkdevcppsupport_la_LIBADD  = libkdevcppcommon.la
+libkdevcppsupport_la_SOURCES = dummy.cpp
 
-libkdevcppsupport_la_SOURCES = cppsupportpart.cpp ccconfigwidget.cpp ccconfigwidgetbase.ui kdevdriver.cpp cppcodecompletion.cpp problemreporter.cpp configproblemreporter.ui backgroundparser.cpp ast_utils.cpp store_walker.cpp KDevCppSupportIface.cpp KDevCppSupportIface.skel cppsupportfactory.cpp tag_creator.cpp codeinformationrepository.cpp doxydoc.cpp cppcodecompletionconfig.cpp cppnewclassdlgbase.ui cppnewclassdlg.cpp classgeneratorconfig.cpp classgeneratorconfigbase.ui subclassingdlg.cpp subclassingdlgbase.ui addattributedialogbase.ui addmethoddialogbase.ui addattributedialog.cpp addmethoddialog.cpp cppsupport_utils.cpp createpcsdialogbase.ui createpcsdialog.cpp
+dummy.cpp:
+	echo > dummy.cpp
 
 METASOURCES = AUTO
 
@@ -29,5 +37,5 @@
 bin_PROGRAMS = r++
 r___LDFLAGS = $(all_libraries)
 r___SOURCES = main.cpp
-r___DEPENDENCIES = libkdevcppsupport.la
-r___LDADD = libkdevcppsupport.la $(top_builddir)/lib/catalog/libkdevcatalog.la $(top_builddir)/lib/cppparser/libkdevcppparser.la
+r___DEPENDENCIES = libkdevcppcommon.la
+r___LDADD = libkdevcppcommon.la $(top_builddir)/lib/catalog/libkdevcatalog.la $(top_builddir)/lib/cppparser/libkdevcppparser.la
diff -uNr kdevelop/languages/pascal/Makefile.am kdevelop-new/languages/pascal/Makefile.am
--- kdevelop/languages/pascal/Makefile.am	Sun Nov  9 07:14:14 2003
+++ kdevelop-new/languages/pascal/Makefile.am	Sat Nov 22 13:25:42 2003
@@ -4,7 +4,7 @@
 SUBDIRS = file_templates app_templates compiler doc
 
 kde_module_LTLIBRARIES = libkdevpascalsupport.la
-libkdevpascalsupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN)
+libkdevpascalsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
 libkdevpascalsupport_la_LIBADD = $(top_builddir)/lib/libkdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libkdevcatalog.la
 
 libkdevpascalsupport_la_SOURCES = pascalsupport_part.cpp PascalLexer.cpp PascalParser.cpp PascalStoreWalker.cpp backgroundparser.cpp configproblemreporter.ui problemreporter.cpp
diff -uNr kdevelop/languages/pascal/PascalLexer.cpp kdevelop-new/languages/pascal/PascalLexer.cpp
--- kdevelop/languages/pascal/PascalLexer.cpp	Sat Nov  1 16:10:51 2003
+++ kdevelop-new/languages/pascal/PascalLexer.cpp	Sat Nov 22 13:25:42 2003
@@ -1,4 +1,7 @@
 /* $ANTLR 2.7.2: "pascal.g" -> "PascalLexer.cpp"$ */
+
+#include "PascalTokenTypes.hpp"
+
 #include "PascalLexer.hpp"
 #include <antlr/CharBuffer.hpp>
 #include <antlr/TokenStreamException.hpp>
diff -uNr kdevelop/languages/pascal/PascalParser.cpp kdevelop-new/languages/pascal/PascalParser.cpp
--- kdevelop/languages/pascal/PascalParser.cpp	Sat Nov  1 16:10:51 2003
+++ kdevelop-new/languages/pascal/PascalParser.cpp	Sat Nov 22 13:25:42 2003
@@ -1,4 +1,7 @@
 /* $ANTLR 2.7.2: "pascal.g" -> "PascalParser.cpp"$ */
+
+#include "PascalTokenTypes.hpp"
+
 #include "PascalParser.hpp"
 #include <antlr/NoViableAltException.hpp>
 #include <antlr/SemanticException.hpp>
diff -uNr kdevelop/languages/pascal/PascalStoreWalker.cpp kdevelop-new/languages/pascal/PascalStoreWalker.cpp
--- kdevelop/languages/pascal/PascalStoreWalker.cpp	Sat Nov  1 15:28:04 2003
+++ kdevelop-new/languages/pascal/PascalStoreWalker.cpp	Sat Nov 22 13:25:42 2003
@@ -1,4 +1,5 @@
 /* $ANTLR 2.7.2: "pascal.tree.g" -> "PascalStoreWalker.cpp"$ */
+#include "PascalStoreWalkerTokenTypes.hpp"
 #include "PascalStoreWalker.hpp"
 #include <antlr/Token.hpp>
 #include <antlr/AST.hpp>
diff -uNr kdevelop/languages/pascal/backgroundparser.cpp kdevelop-new/languages/pascal/backgroundparser.cpp
--- kdevelop/languages/pascal/backgroundparser.cpp	Thu Oct 30 15:57:47 2003
+++ kdevelop-new/languages/pascal/backgroundparser.cpp	Sat Nov 22 13:25:42 2003
@@ -9,6 +9,8 @@
  *                                                                         *
  ***************************************************************************/
 
+#include "PascalTokenTypes.hpp"
+
 #include <strstream>
 
 #include "backgroundparser.h"
diff -uNr kdevelop/languages/pascal/pascalsupport_part.cpp kdevelop-new/languages/pascal/pascalsupport_part.cpp
--- kdevelop/languages/pascal/pascalsupport_part.cpp	Thu Oct 30 15:57:47 2003
+++ kdevelop-new/languages/pascal/pascalsupport_part.cpp	Sat Nov 22 13:25:42 2003
@@ -7,6 +7,10 @@
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  ***************************************************************************/
+
+#include "PascalTokenTypes.hpp"
+#include "PascalStoreWalkerTokenTypes.hpp"
+
 #include <fstream>
 
 #include <qdir.h>
diff -uNr kdevelop/lib/catalog/Makefile.am kdevelop-new/lib/catalog/Makefile.am
--- kdevelop/lib/catalog/Makefile.am	Tue Jul  8 10:38:45 2003
+++ kdevelop-new/lib/catalog/Makefile.am	Sat Nov 22 10:29:23 2003
@@ -1,7 +1,8 @@
 INCLUDES = $(all_includes)
 lib_LTLIBRARIES = libkdevcatalog.la
 libkdevcatalog_la_SOURCES = tag.cpp
-libkdevcatalog_la_LIBADD = -ldb
+libkdevcatalog_la_LIBADD = $(LIB_QT) $(LIB_X11) -ldb
+libkdevcatalog_la_LDFLAGS = $(all_libraries) -no-undefined
 
 kdevcatalogincludedir = $(includedir)/kdevelop/catalog
 kdevcataloginclude_HEADERS = gcatalog.h gcatalog.tcc catalog.h tag.h
diff -uNr kdevelop/lib/cppparser/Makefile.am kdevelop-new/lib/cppparser/Makefile.am
--- kdevelop/lib/cppparser/Makefile.am	Sat Sep 13 09:32:56 2003
+++ kdevelop-new/lib/cppparser/Makefile.am	Sat Nov 22 10:29:23 2003
@@ -1,7 +1,8 @@
 INCLUDES = $(all_includes)
 AM_CXXFLAGS = -DKDEVELOP_BGPARSER
 lib_LTLIBRARIES = libkdevcppparser.la
-libkdevcppparser_la_LDFLAGS = $(all_libraries)
+libkdevcppparser_la_LIBADD  = $(LIB_QT) $(LIB_KDECORE)
+libkdevcppparser_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined
 libkdevcppparser_la_SOURCES = ast.cpp driver.cpp errors.cpp lexer.cpp lookup.cpp parser.cpp tree_parser.cpp
 
 kdevcppparserincludedir = $(includedir)/kdevelop/cppparser
diff -uNr kdevelop/parts/doctreeview/htdigindex.cpp kdevelop-new/parts/doctreeview/htdigindex.cpp
--- kdevelop/parts/doctreeview/htdigindex.cpp	Sun Nov 16 19:52:22 2003
+++ kdevelop-new/parts/doctreeview/htdigindex.cpp	Sat Nov 22 11:38:27 2003
@@ -571,7 +571,7 @@
   }
 }
 
-int main(int argc, char *argv[])
+main(int argc, char *argv[])
 {
 #if 0
     static KCmdLineOptions options[] = {
diff -uNr kdevelop/src/Makefile.am kdevelop-new/src/Makefile.am
--- kdevelop/src/Makefile.am	Sat Nov  8 20:34:48 2003
+++ kdevelop-new/src/Makefile.am	Sat Nov 22 10:50:06 2003
@@ -1,12 +1,14 @@
 INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib $(KDEVMDI_INCLUDES) -I$(top_srcdir)/lib/structure $(all_includes)
 
-bin_PROGRAMS = kdevelop
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+kdeinit_LTLIBRARIES = kdevelop.la
 
-kdevelop_SOURCES = main.cpp mainwindow.cpp core.cpp partcontroller.cpp projectmanager.cpp plugincontroller.cpp api.cpp partselectwidget.cpp settingswidget.ui toplevel.cpp statusbar.cpp editorproxy.cpp debugger.cpp documentationpart.cpp splashscreen.cpp projectsession.cpp mainwindowshare.cpp generalinfowidgetbase.ui generalinfowidget.cpp languageselectwidget.cpp
+kdevelop_la_SOURCES = main.cpp mainwindow.cpp core.cpp partcontroller.cpp projectmanager.cpp plugincontroller.cpp api.cpp partselectwidget.cpp settingswidget.ui toplevel.cpp statusbar.cpp editorproxy.cpp debugger.cpp documentationpart.cpp splashscreen.cpp projectsession.cpp mainwindowshare.cpp generalinfowidgetbase.ui generalinfowidget.cpp languageselectwidget.cpp
 
-kdevelop_METASOURCES = AUTO
-kdevelop_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-kdevelop_LDADD = $(top_builddir)/lib/widgets/libwidgets.la $(LIB_KDEUI) $(LIB_KPARTS) $(LIB_KHTML) -lktexteditor $(LIB_KDEVMDI) $(top_builddir)/lib/libkdevelop.la
+kdevelop_la_METASOURCES = AUTO
+kdevelop_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module
+kdevelop_la_LIBADD = $(top_builddir)/lib/widgets/libwidgets.la $(LIB_KDEUI) $(LIB_KPARTS) $(LIB_KHTML) -lktexteditor $(LIB_KDEVMDI) $(top_builddir)/lib/libkdevelop.la
 
 rcdir = $(kde_datadir)/kdevelop
 rc_DATA = kdevelopui.rc eventsrc
diff -uNr kdevelop/src/main.cpp kdevelop-new/src/main.cpp
--- kdevelop/src/main.cpp	Fri Oct 31 14:24:25 2003
+++ kdevelop-new/src/main.cpp	Sat Nov 22 10:29:49 2003
@@ -25,7 +25,7 @@
     { 0,0,0 }
 };
 
-int main(int argc, char *argv[])
+extern "C" int kdemain(int argc, char *argv[])
 {
   static const char description[] = I18N_NOOP("The KDevelop Integrated Development Environment.");
   KAboutData aboutData("kdevelop", I18N_NOOP("KDevelop"),
