Drop Borland compiler specific code

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/202/head
Michele Calgaro 1 month ago
parent c9a75bccc6
commit 69e1261df6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -10,7 +10,7 @@ Supported platforms and compilers:
aix-xlc-64 irix-cc linux-icc solaris-g++-64 win32-msvc
freebsd-g++ irix-cc-64 macx-g++ tru64-cxx win32-msvc.net
freebsd-icc irix-g++ macx-pbuilder tru64-g++
hpux-acc linux-ecc-64 solaris-cc win32-borland
hpux-acc linux-ecc-64 solaris-cc
Compilation problems:

@ -13,7 +13,6 @@ applications compiled for 3.2 will continue to run with 3.3.
For this release, the following platforms have been tested:
win32-borland
win32-g++
win32-icc
win32-msvc

@ -40,7 +40,7 @@ body { background: #ffffff; color: black; }
<pre>
SOURCES += main.cpp
</pre>
<p>You can then use <tt>qmake</tt> to generate the Makefile. (For example <tt>qmake -o Makefile myproject.pro</tt>.) Running <tt>make</tt> (Linux, Unix or Borland compilers), or <tt>nmake</tt> (Visual C++), will then call <tt>tquic</tt>, <tt>tqmoc</tt> and your compiler as necessary to build your application.</p>
<p>You can then use <tt>qmake</tt> to generate the Makefile. (For example <tt>qmake -o Makefile myproject.pro</tt>.) Running <tt>make</tt> (Linux or Unix compilers), or <tt>nmake</tt> (Visual C++), will then call <tt>tquic</tt>, <tt>tqmoc</tt> and your compiler as necessary to build your application.</p>
<!-- index Errors!Undefined reference --><!-- index Undefined references, Error --><!-- index qmake!HEADERS --><!-- index qmake!SOURCES --><p>If you use <em>TQt Designer</em> to create your main window and dialogs, but also add other C++ files, or if you subclass any of your forms you will need to add these files to the<!-- index .pro --> <tt>.pro</tt> file so that they are compiled with the rest of your application's source files. Each<!-- index .h --> <tt>.h</tt> file that you create separately from <em>TQt Designer</em> should be added to the <tt>HEADERS</tt> line, and each<!-- index .cpp --> <tt>.cpp</tt> file should be added to the <tt>SOURCES</tt> line, just as we've done for<!-- index main.cpp --> <tt>main.cpp</tt>. If you get undefined reference errors it is worth checking that you've added the names of all your header and implementation files to the<!-- index .pro --> <tt>.pro</tt> file.</p>
<h4><a name="1-2"></a>Subclassing a Form</h4>
<!-- index Subclassing --><p>When subclassing a form it is helpful to use a naming convention to help us identify which files are generated from <em>TQt Designer</em>'s<!-- index .ui --> <tt>.ui</tt> files and which are hand coded.</p>

@ -37,7 +37,7 @@ body { background: #ffffff; color: black; }
<p>Before building TQt manually the following environment variables must be set:</p>
<ul><li><p>QMAKESPEC <br> This must be set to the platform and compiler combination that you are using on your system. <br> For example, if you are using Windows and Microsoft Visual Studio, you would set this environment variable to <em>win32-msvc</em>. If you are using Solaris and g++, you would set this environment variable to <em>solaris-g++</em>.</p>
<p>The following is a list of environment variables available to choose from when setting QMAKESPEC:</p>
<p>aix-64 hpux-cc irix-032 netbsd-g++ solaris-cc unixware7-g++ aix-g++ hpux-g++ linux-cxx openbsd-g++ solaris-g++ win32-borland aix-xlc hpux-n64 linux-g++ openunix-cc sunos-g++ win32-g++ bsdi-g++ hpux-o64 linux-icc qnx-g++ tru64-cxx win32-msvc dgux-g++ hurd-g++ linux-kcc reliant-64 tru64-g++ win32-watc freebsd-g++ irix-64 macx-pbuilder reliant-cds ultrix-g++ win32-visa hpux-acc irix-g++ macx-g++ sco-g++ unixware-g hpux-acc irix-n32 solaris-64 unixware7-cc</p>
<p>aix-64 hpux-cc irix-032 netbsd-g++ solaris-cc unixware7-g++ aix-g++ hpux-g++ linux-cxx openbsd-g++ solaris-g++ aix-xlc hpux-n64 linux-g++ openunix-cc sunos-g++ win32-g++ bsdi-g++ hpux-o64 linux-icc qnx-g++ tru64-cxx win32-msvc dgux-g++ hurd-g++ linux-kcc reliant-64 tru64-g++ win32-watc freebsd-g++ irix-64 macx-pbuilder reliant-cds ultrix-g++ win32-visa hpux-acc irix-g++ macx-g++ sco-g++ unixware-g hpux-acc irix-n32 solaris-64 unixware7-cc</p>
<li><p>TQTDIR <br> This must be set to where TQt is (or will be) installed. For example, <em>c:\qt</em> and <em>\local\qt</em></p>
</ul><p>Once the environment variables are set go into the qmake directory, <em>$TQTDIR/qmake</em>, e.g. <em>C:\qt\qmake</em>. Now run <em>make</em> or <em>nmake</em> depending on your compiler.</p>
<p>When the make has completed, <em>qmake</em> is ready for use.</p>

@ -452,9 +452,6 @@ app {
<p>This variable contains all the libraries needed to link against if OpenGL support is turned on. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<h5><a name="4-2-73"></a>QMAKE_LIBS_QT_THREAD</h5>
<p>This variable contains all the libraries needed to link against if thread support is turned on. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<h5><a name="4-2-74"></a>QMAKE_LIBS_RT</h5>
<p><em>This is used with Borland compilers only</em></p>
<p>This variable contains the runtime library needed to link against when building an application. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>
<h5><a name="4-2-75"></a>QMAKE_LIBS_RTMT</h5>
<p><em>This is used with Borland compilers only</em></p>
<p>This variable contains the runtime library needed to link against when building a multi-threaded application. The value of this variable is typically handled by <em>qmake</em> or <a href="qmake-manual-8.html#QMAKESPEC">qmake.conf</a> and rarely needs to be modified.</p>

@ -110,7 +110,7 @@ class TQCanvasItem;
class TQCanvasView;
class TQCanvasPixmap;
#if defined(Q_TEMPLATEDLL) &amp;&amp; ( !defined(Q_CC_BOR) || !defined(QT_MAKEDLL) || defined(Q_EXPORT_TEMPLATES) )
#if defined(Q_TEMPLATEDLL) &amp;&amp; ( !defined(QT_MAKEDLL) || defined(Q_EXPORT_TEMPLATES) )
// MOC_SKIP_BEGIN
TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQValueListIterator&lt; TQCanvasItem* &gt;;
TQM_TEMPLATE_EXTERN_CANVAS template class TQM_EXPORT_CANVAS TQValueList&lt; TQCanvasItem* &gt;;

@ -232,7 +232,6 @@ body { background: #ffffff; color: black; }
MPW - MPW C++
MWERKS - Metrowerks CodeWarrior
MSVC - Microsoft Visual C/C++, Intel C++ for Windows
BOR - Borland/Turbo C++
WAT - Watcom C++
GNU - GNU C++
COMEAU - Comeau C++
@ -299,14 +298,6 @@ body { background: #ffffff; color: black; }
# define Q_NO_USING_KEYWORD /* ### check "using" status */
# endif
#elif defined(__BORLANDC__) || defined(__TURBOC__)
# define Q_CC_BOR
# if __BORLANDC__ &lt; 0x502
# define Q_NO_BOOL_TYPE
# define Q_NO_EXPLICIT_KEYWORD
# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
#elif defined(__WATCOMC__)
# define Q_CC_WAT
# if defined(Q_OS_QNX4)
@ -870,17 +861,6 @@ class TQDataStream;
# endif
# undef TQ_DISABLE_COPY /* avoid unresolved externals */
# endif
#elif defined(Q_OS_LINUX) &amp;&amp; defined(Q_CC_BOR)
# if defined(QT_SHARED) /* create a TQt shared library */
# define TQ_EXPORT __declspec(dllexport)
# define Q_TEMPLATEDLL
# define Q_TEMPLATE_EXTERN
# undef TQ_DISABLE_COPY /* avoid unresolved externals */
# else
# define Q_TEMPLATEDLL
# define Q_TEMPLATE_EXTERN
# undef TQ_DISABLE_COPY /* avoid unresolved externals */
# endif
#else
# undef QT_MAKEDLL /* ignore these for other platforms */
# undef QT_DLL
@ -1090,14 +1070,6 @@ TQ_EXPORT const char *tqInstallPathSysconf();
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
# pragma warning(disable: 4710) // function not inlined
# elif defined(Q_CC_BOR)
# pragma option -w-inl
# pragma option -w-aus
# pragma warn -inl
# pragma warn -pia
# pragma warn -ccc
# pragma warn -rch
# pragma warn -sig
# endif
#endif

@ -1,106 +0,0 @@
#
#
# qmake configuration for win32-borland
#
# Written for Borland C++.
#
MAKEFILE_GENERATOR = BMAKE
TEMPLATE = app
CONFIG += qt warn_on release link_prl
DEFINES += UNICODE
QMAKE_NOFORCE = 1
exists( $(TQTDIR)\.qtwinconfig ) {
include( $(TQTDIR)\.qtwinconfig )
}
QMAKE_CC = bcc32
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = byacc
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -tWR
QMAKE_CFLAGS_WARN_ON = -w -w-hid
QMAKE_CFLAGS_WARN_OFF = -w-
QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_DEBUG = -v
QMAKE_CFLAGS_MT = -tWM
QMAKE_CFLAGS_MT_DBG = -tWM
QMAKE_CFLAGS_MT_DLL = -tWM
QMAKE_CFLAGS_MT_DLLDBG = -tWM
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_CONSOLE = -tWC
QMAKE_CFLAGS_STL_ON =
QMAKE_CFLAGS_STL_OFF =
QMAKE_CFLAGS_RTTI_ON =
QMAKE_CFLAGS_RTTI_OFF = -RT-
QMAKE_CFLAGS_EXCEPTIONS_ON =
QMAKE_CFLAGS_EXCEPTIONS_OFF = -x-
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_MT = $$QMAKE_CFLAGS_MT
QMAKE_CXXFLAGS_MT_DBG = $$QMAKE_CFLAGS_MT_DBG
QMAKE_CXXFLAGS_MT_DLL = $$QMAKE_CFLAGS_MT_DLL
QMAKE_CXXFLAGS_MT_DLLDBG= $$QMAKE_CFLAGS_MT_DLLDBG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_CONSOLE = $$QMAKE_CFLAGS_CONSOLE
QMAKE_CXXFLAGS_STL_ON = $$QMAKE_CFLAGS_STL_ON
QMAKE_CXXFLAGS_STL_OFF = $$QMAKE_CFLAGS_STL_OFF
QMAKE_CXXFLAGS_RTTI_ON = $$QMAKE_CFLAGS_RTTI_ON
QMAKE_CXXFLAGS_RTTI_OFF = $$QMAKE_CFLAGS_RTTI_OFF
QMAKE_CXXFLAGS_EXCEPTIONS_ON = $$QMAKE_CFLAGS_EXCEPTIONS_ON
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = $$QMAKE_CFLAGS_EXCEPTIONS_OFF
QMAKE_INCDIR =
QMAKE_INCDIR_TQT = $(TQTDIR)\include
QMAKE_LIBDIR = $(BCB)\lib
QMAKE_LIBDIR_TQT = $(TQTDIR)\lib
QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o$obj $src
QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o$@ $<
QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o$obj $src
QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o$@ $<
QMAKE_LINK = ilink32
QMAKE_LFLAGS = -c -x -Gn
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG = -v
QMAKE_LFLAGS_CONSOLE = -ap -Tpe c0x32.obj
QMAKE_LFLAGS_WINDOWS = -aa -Tpe c0w32.obj
QMAKE_LFLAGS_CONSOLE_DLL= -Gi -ap -Tpd c0d32.obj
QMAKE_LFLAGS_WINDOWS_DLL= -Gi -aa -Tpd c0d32.obj
QMAKE_LIBS = import32.lib
QMAKE_LIBS_RT = cw32i.lib
QMAKE_LIBS_RTMT = cw32mti.lib
QMAKE_LIBS_CONSOLE =
QMAKE_LIBS_WINDOWS =
QMAKE_LIBS_QT = qt.lib
QMAKE_LIBS_QT_THREAD = qtmt.lib
QMAKE_LIBS_QT_ENTRY = qtmain.lib
QMAKE_LIBS_OPENGL =
QMAKE_LFLAGS_OPENGL = /dopengl32.dll
QMAKE_MOC = $(TQTDIR)\bin\tqmoc.exe
QMAKE_UIC = $(TQTDIR)\bin\tquic.exe
QMAKE_IDC = $(TQTDIR)\bin\idc.exe
QMAKE_IDL = midl
QMAKE_LIB = tlib /C /P256
QMAKE_RC = brcc32 -dQ_CC_BOR
QMAKE_ZIP = zip -r -9
QMAKE_COPY = copy
QMAKE_MOVE = move
QMAKE_DEL_FILE = del
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = if not exist
QMAKE_MKDIR = mkdir

@ -1,154 +0,0 @@
#ifndef TQPLATFORMDEFS_H
#define TQPLATFORMDEFS_H
#ifdef UNICODE
#ifndef _UNICODE
#define _UNICODE
#endif
#endif
// Get TQt defines/settings
#include "tqglobal.h"
#define Q_FS_FAT
#define _POSIX_
#include <limits.h>
#undef _POSIX_
#include <tchar.h>
#include <io.h>
#include <direct.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/stat.h>
#include <dos.h>
#include <stdlib.h>
#include <windows.h>
#if __BORLANDC__ >= 0x550
// Borland Builder 6
#ifdef QT_LARGEFILE_SUPPORT
# define QT_STATBUF struct stati64 // non-ANSI defs
# define QT_STATBUF4TSTAT struct stati64 // non-ANSI defs
# define QT_STAT ::_stati64
# define QT_FSTAT ::fstati64
# define QT_LSEEK ::_lseeki64
# define QT_TSTAT ::_tstati64
#else
# define QT_STATBUF struct stat // non-ANSI defs
# define QT_STATBUF4TSTAT struct _stat // non-ANSI defs
# define QT_STAT ::stat
# define QT_FSTAT ::fstat
# define QT_LSEEK ::_lseek
# define QT_TSTAT ::_tstat
#endif
#define QT_STAT_REG _S_IFREG
#define QT_STAT_DIR _S_IFDIR
#define QT_STAT_MASK _S_IFMT
#if defined(_S_IFLNK)
# define QT_STAT_LNK _S_IFLNK
#endif
#define QT_FILENO _fileno
#define QT_OPEN ::open
#define QT_CLOSE ::_close
#define QT_READ ::_read
#define QT_WRITE ::_write
#define QT_ACCESS ::_access
#define QT_GETCWD ::_getcwd
#define QT_CHDIR ::chdir
#define QT_MKDIR ::_mkdir
#define QT_RMDIR ::_rmdir
#define QT_OPEN_RDONLY _O_RDONLY
#define QT_OPEN_WRONLY _O_WRONLY
#define QT_OPEN_RDWR _O_RDWR
#define QT_OPEN_CREAT _O_CREAT
#define QT_OPEN_TRUNC _O_TRUNC
#define QT_OPEN_APPEND _O_APPEND
#if defined(O_TEXT)
# define QT_OPEN_TEXT _O_TEXT
# define QT_OPEN_BINARY _O_BINARY
#endif
#else
// Borland Builder 5
#ifdef QT_LARGEFILE_SUPPORT
# define QT_STATBUF struct stati64 // non-ANSI defs
# define QT_STATBUF4TSTAT struct stati64 // non-ANSI defs
# define QT_STAT ::stati64
# define QT_FSTAT ::fstati64
# define QT_LSEEK ::lseeki64
# define QT_TSTAT ::tstati64
#else
# define QT_STATBUF struct stat // non-ANSI defs
# define QT_STATBUF4TSTAT struct stat // non-ANSI defs
# define QT_STAT ::stat
# define QT_FSTAT ::fstat
# define QT_LSEEK ::lseek
# define QT_TSTAT ::tstat
#endif
#define QT_STAT_REG S_IFREG
#define QT_STAT_DIR S_IFDIR
#define QT_STAT_MASK S_IFMT
#if defined(S_IFLNK)
# define QT_STAT_LNK S_IFLNK
#endif
#define QT_FILENO fileno
#define QT_OPEN ::open
#define QT_CLOSE ::close
#define QT_READ ::read
#define QT_WRITE ::write
#define QT_ACCESS ::access
#if defined(Q_OS_OS2EMX)
// This is documented in the un*x to OS/2-EMX Porting FAQ:
// http://homepages.tu-darmstadt.de/~st002279/os2/porting.html
# define QT_GETCWD ::_getcwd2
# define QT_CHDIR ::_chdir2
#else
# define QT_GETCWD ::getcwd
# define QT_CHDIR ::chdir
#endif
#define QT_MKDIR ::mkdir
#define QT_RMDIR ::rmdir
#define QT_OPEN_RDONLY O_RDONLY
#define QT_OPEN_WRONLY O_WRONLY
#define QT_OPEN_RDWR O_RDWR
#define QT_OPEN_CREAT O_CREAT
#define QT_OPEN_TRUNC O_TRUNC
#define QT_OPEN_APPEND O_APPEND
#if defined(O_TEXT)
# define QT_OPEN_TEXT O_TEXT
# define QT_OPEN_BINARY O_BINARY
#endif
#endif // __BORLANDC__ >= 0x550
// Borland Builder 5 and 6
#define QT_SIGNAL_ARGS int
#define QT_VSNPRINTF ::_vsnprintf
#define QT_SNPRINTF ::_snprintf
# define F_OK 0
# define X_OK 1
# define W_OK 2
# define R_OK 4
#endif // TQPLATFORMDEFS_H

@ -9,10 +9,6 @@ REQUIRES = !no-mng !mng
SOURCES += main.cpp
win32-borland {
QMAKE_CFLAGS_WARN_ON += -w-par
QMAKE_CXXFLAGS_WARN_ON += -w-par
}
win32: CONFIG-=zlib system-zlib jpeg system-jpeg
system-mng {

@ -17,8 +17,7 @@ unix {
}
win32 {
OBJECTS_DIR = obj
!win32-borland:LIBS *= gds32_ms.lib
win32-borland:LIBS += gds32.lib
LIBS *= gds32_ms.lib
}
REQUIRES = sql

@ -22,9 +22,6 @@ win32 {
# LIBS *= delayimp.lib
# QMAKE_LFLAGS += /DELAYLOAD:libmysql.dll
# }
# win32-borland: {
# QMAKE_LFLAGS += /dlibmysql.dll
# }
}
REQUIRES = sql

@ -23,8 +23,7 @@ unix {
win32 {
OBJECTS_DIR = obj
!win32-borland:LIBS *= -lodbc32
win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
LIBS *= -lodbc32
}
REQUIRES = sql

@ -21,9 +21,6 @@ win32 {
# LIBS *= delayimp.lib
# QMAKE_LFLAGS += /DELAYLOAD:libpq.dll
# }
# win32-borland: {
# QMAKE_LFLAGS += /dlibpq.dll
# }
}
REQUIRES = sql

@ -18,9 +18,6 @@ win32 {
# LIBS *= delayimp.lib
# QMAKE_LFLAGS += /DELAYLOAD:libsqlite.dll
# }
# win32-borland: {
# QMAKE_LFLAGS += /dlibsqlite.dll
# }
}
!contains( LIBS, .*sqlite.* ) {

@ -22,9 +22,6 @@ win32 {
# LIBS *= delayimp.lib
# QMAKE_LFLAGS += /DELAYLOAD:sqlite3.dll
# }
# win32-borland: {
# QMAKE_LFLAGS += /dsqlite3.dll
# }
}
REQUIRES = sql

@ -1,6 +1,6 @@
#tqmake code
OBJS=project.o property.o main.o makefile.o unixmake2.o unixmake.o msvc_nmake.o \
borland_bmake.o mingw_make.o msvc_dsp.o msvc_vcproj.o option.o \
mingw_make.o msvc_dsp.o msvc_vcproj.o option.o \
winmakefile.o projectgenerator.o metrowerks_xml.o pbuilder_pbx.o \
msvc_objectmodel.o meta.o qtmd5.o
@ -13,7 +13,7 @@ QOBJS=tqstring.o tqtextstream.o tqiodevice.o tqglobal.o tqgdict.o tqcstring.o \
#all sources, used for the depend target
DEPEND_SRC=project.cpp property.cpp meta.cpp main.cpp qtmd5.cpp generators/makefile.cpp generators/unix/unixmake2.cpp \
generators/unix/unixmake.cpp generators/win32/msvc_nmake.cpp generators/win32/borland_bmake.cpp \
generators/unix/unixmake.cpp generators/win32/msvc_nmake.cpp \
generators/win32/winmakefile.cpp generators/projectgenerator.cpp generators/mac/metrowerks_xml.cpp \
generators/mac/pbuilder_pbx.cpp generators/win32/msvc_objectmodel.cpp \
@SOURCE_PATH@/src/tools/tqstring.cpp @SOURCE_PATH@/src/tools/tqtextstream.cpp \
@ -183,9 +183,6 @@ unixmake.o: generators/unix/unixmake.cpp
unixmake2.o: generators/unix/unixmake2.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/unix/unixmake2.cpp
borland_bmake.o: generators/win32/borland_bmake.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/win32/borland_bmake.cpp
mingw_make.o: generators/win32/mingw_make.cpp
$(CXX) -c -o $@ $(CXXFLAGS) generators/win32/mingw_make.cpp

@ -14,7 +14,7 @@ ADDCLEAN =
#tqmake code
OBJS=project.o main.o makefile.o unixmake.o unixmake2.o borland_bmake.o mingw_make.o \
OBJS=project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o \
msvc_nmake.o msvc_dsp.o msvc_vcproj.o option.o winmakefile.o projectgenerator.o \
metrowerks_xml.o pbuilder_pbx.o msvc_objectmodel.o property.o meta.o qtmd5.o
@ -154,9 +154,6 @@ unixmake2.o: generators\unix\unixmake2.cpp
winmakefile.o: generators/win32/winmakefile.cpp
$(CXX) $(CXXFLAGS) generators/win32/winmakefile.cpp
borland_bmake.o: generators/win32/borland_bmake.cpp
$(CXX) $(CXXFLAGS) generators/win32/borland_bmake.cpp
mingw_make.o: generators/win32/mingw_make.cpp
$(CXX) $(CXXFLAGS) generators/win32/mingw_make.cpp

@ -1378,30 +1378,6 @@ value of this variable is typically handled by \e qmake or
\section3 QMAKE_LIBS_RT
\e {This is used with Borland compilers only}
This variable contains the runtime library needed to link against when
building an application. The
value of this variable is typically handled by \e qmake or
\link #QMAKESPEC qmake.conf \endlink and rarely needs to be modified.
\section3 QMAKE_LIBS_RTMT
\e {This is used with Borland compilers only}
This variable contains the runtime library needed to link against when
building a multi-threaded application. The
value of this variable is typically handled by \e qmake or
\link #QMAKESPEC qmake.conf \endlink and rarely needs to be modified.
\section3 QMAKE_LIBS_THREAD
\e {This is used on Unix platforms only}

@ -23,7 +23,7 @@ The following is a list of environment variables available to choose
from when setting QMAKESPEC:
aix-64 hpux-cc irix-032 netbsd-g++ solaris-cc unixware7-g++
aix-g++ hpux-g++ linux-cxx openbsd-g++ solaris-g++ win32-borland
aix-g++ hpux-g++ linux-cxx openbsd-g++ solaris-g++
aix-xlc hpux-n64 linux-g++ openunix-cc sunos-g++ win32-g++
bsdi-g++ hpux-o64 linux-icc qnx-g++ tru64-cxx win32-msvc
dgux-g++ hurd-g++ linux-kcc reliant-64 tru64-g++ win32-watc

@ -1809,10 +1809,6 @@ MakefileGenerator::writeImageSrc(TQTextStream &t, const TQString &src)
t << (*it) << ": " << findDependencies((*it)).join(" \\\n\t\t") << "\n\t"
<< "$(TQUIC) -o " << (*it) << " -embed " << project->first("QMAKE_ORIG_TARGET")
<< " -f <<\n" << findDependencies((*it)).join(" ") << "\n<<" << endl << endl;
} else if ( gen == "BMAKE" ) {
t << (*it) << ": " << findDependencies((*it)).join(" \\\n\t\t") << "\n\t"
<< "$(TQUIC) " << " -embed " << project->first("QMAKE_ORIG_TARGET")
<< " -f &&|\n" << findDependencies((*it)).join(" ") << "\n| -o " << (*it) << endl << endl;
} else {
t << (*it) << ": " << findDependencies((*it)).join(" \\\n\t\t") << "\n\t"
<< "$(TQUIC) " << " -embed " << project->first("QMAKE_ORIG_TARGET")
@ -2447,7 +2443,6 @@ MakefileGenerator::openOutput(TQFile &file) const
//Factory thing
#include "unixmake.h"
#include "msvc_nmake.h"
#include "borland_bmake.h"
#include "mingw_make.h"
#include "msvc_dsp.h"
#include "msvc_vcproj.h"
@ -2480,8 +2475,6 @@ MakefileGenerator::create(TQMakeProject *proj)
mkfile = new VcprojGenerator(proj);
else
mkfile = new NmakeMakefileGenerator(proj);
} else if(gen == "BMAKE") {
mkfile = new BorlandMakefileGenerator(proj);
} else if(gen == "MINGW") {
mkfile = new MingwMakefileGenerator(proj);
} else if(gen == "METROWERKS") {

@ -1,637 +0,0 @@
/****************************************************************************
**
** NmakeMakefileGenerator of BorlandMakefileGenerator class.
**
** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
**
** This file is part of qmake.
**
** This file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free
** Software Foundation and appearing in the files LICENSE.GPL2
** and LICENSE.GPL3 included in the packaging of this file.
** Alternatively you may (at your option) use any later version
** of the GNU General Public License if such license has been
** publicly approved by Trolltech ASA (or its successors, if any)
** and the KDE Free TQt Foundation.
**
** Please review the following information to ensure GNU General
** Public Licensing requirements will be met:
** http://trolltech.com/products/qt/licenses/licensing/opensource/.
** If you are unsure which license is appropriate for your use, please
** review the following information:
** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
** or contact the sales department at sales@trolltech.com.
**
** This file may be used under the terms of the Q Public License as
** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
** included in the packaging of this file. Licensees holding valid TQt
** Commercial licenses may use this file in accordance with the TQt
** Commercial License Agreement provided with the Software.
**
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
** herein.
**
**********************************************************************/
#include "borland_bmake.h"
#include "option.h"
#include <tqdir.h>
#include <tqregexp.h>
#include <time.h>
#include <stdlib.h>
BorlandMakefileGenerator::BorlandMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE)
{
}
bool
BorlandMakefileGenerator::writeMakefile(TQTextStream &t)
{
writeHeader(t);
if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
t << "all clean:" << "\n\t"
<< "@echo \"Some of the required modules ("
<< var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
<< "@echo \"Skipped.\"" << endl << endl;
return TRUE;
}
if(project->first("TEMPLATE") == "app" ||
project->first("TEMPLATE") == "lib") {
writeBorlandParts(t);
return MakefileGenerator::writeMakefile(t);
}
else if(project->first("TEMPLATE") == "subdirs") {
writeSubDirs(t);
return TRUE;
}
return FALSE;
}
void
BorlandMakefileGenerator::writeBorlandParts(TQTextStream &t)
{
t << "!if !$d(BCB)" << endl;
t << "BCB = $(MAKEDIR)\\.." << endl;
t << "!endif" << endl << endl;
t << "####### Compiler, tools and options" << endl << endl;
t << "CC = " << var("QMAKE_CC") << endl;
t << "CXX = " << var("QMAKE_CXX") << endl;
t << "LEX = " << var("QMAKE_LEX") << endl;
t << "YACC = " << var("QMAKE_YACC") << endl;
t << "CFLAGS = " << var("QMAKE_CFLAGS") << " "
<< varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " "
<< varGlue("DEFINES","-D"," -D","") << endl;
t << "CXXFLAGS= " << var("QMAKE_CXXFLAGS") << " "
<< varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " "
<< varGlue("DEFINES","-D"," -D","") << endl;
t << "LEXFLAGS=" << var("QMAKE_LEXFLAGS") << endl;
t << "YACCFLAGS=" << var("QMAKE_YACCFLAGS") << endl;
t << "INCPATH = ";
TQStringList &incs = project->variables()["INCLUDEPATH"];
for(TQStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) {
TQString inc = (*incit);
inc.replace(TQRegExp("\\\\*$"), "");
inc.replace("\"", "");
t << " -I\"" << inc << "\"";
}
t << " -I\"" << specdir() << "\""
<< endl;
if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) {
t << "LINK = " << var("QMAKE_LINK") << endl;
t << "LFLAGS = ";
if ( !project->variables()["QMAKE_LIBDIR"].isEmpty() )
t << varGlue("QMAKE_LIBDIR","-L",";","") << " ";
t << var("QMAKE_LFLAGS") << endl;
t << "LIBS = " << var("QMAKE_LIBS") << endl;
}
else {
t << "LIB = " << var("QMAKE_LIB") << endl;
}
t << "MOC = " << (project->isEmpty("QMAKE_MOC") ? TQString("moc") :
Option::fixPathToTargetOS(var("QMAKE_MOC"), FALSE)) << endl;
t << "TQUIC = " << (project->isEmpty("QMAKE_UIC") ? TQString("tquic") :
Option::fixPathToTargetOS(var("QMAKE_UIC"), FALSE)) << endl;
t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? TQString("qmake") :
Option::fixPathToTargetOS(var("QMAKE_QMAKE"), FALSE)) << endl;
t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? TQString("idc") :
Option::fixPathToTargetOS(var("QMAKE_IDC"), FALSE)) << endl;
t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? TQString("midl") :
Option::fixPathToTargetOS(var("QMAKE_IDL"), FALSE)) << endl;
t << "ZIP = " << var("QMAKE_ZIP") << endl;
t << "DEF_FILE = " << varList("DEF_FILE") << endl;
t << "RES_FILE = " << varList("RES_FILE") << endl;
t << "COPY_FILE = " << var("QMAKE_COPY") << endl;
t << "COPY_DIR = " << var("QMAKE_COPY") << endl;
t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
t << "MOVE = " << var("QMAKE_MOVE") << endl;
t << "CHK_DIR_EXISTS = " << var("QMAKE_CHK_DIR_EXISTS") << endl;
t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
t << "INSTALL_FILE= " << var("QMAKE_INSTALL_FILE") << endl;
t << "INSTALL_DIR = " << var("QMAKE_INSTALL_DIR") << endl;
t << endl;
t << "####### Files" << endl << endl;
t << "HEADERS = " << varList("HEADERS") << endl;
t << "SOURCES = " << varList("SOURCES") << endl;
t << "OBJECTS = " << varList("OBJECTS") << endl;
t << "FORMS = " << varList("FORMS") << endl;
t << "UICDECLS = " << varList("UICDECLS") << endl;
t << "UICIMPLS = " << varList("UICIMPLS") << endl;
t << "SRCMOC = " << varList("SRCMOC") << endl;
t << "OBJMOC = " << varList("OBJMOC") << endl;
TQString extraCompilerDeps;
if(!project->isEmpty("QMAKE_EXTRA_WIN_COMPILERS")) {
t << "OBJCOMP = " << varList("OBJCOMP") << endl;
extraCompilerDeps += " $(OBJCOMP) ";
TQStringList &comps = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
for(TQStringList::Iterator compit = comps.begin(); compit != comps.end(); ++compit) {
TQStringList &vars = project->variables()[(*compit) + ".variables"];
for(TQStringList::Iterator varit = vars.begin(); varit != vars.end(); ++varit) {
TQStringList vals = project->variables()[(*varit)];
if(!vals.isEmpty())
t << "QMAKE_COMP_" << (*varit) << " = " << valList(vals) << endl;
}
}
}
t << "DIST = " << varList("DISTFILES") << endl;
t << "TARGET = "
<< varGlue("TARGET",project->first("DESTDIR"),"",project->first("TARGET_EXT"))
<< endl;
t << endl;
t << "####### Implicit rules" << endl << endl;
t << ".SUFFIXES: .c";
TQStringList::Iterator cppit;
for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
t << " " << (*cppit);
t << endl << endl;
for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
t << (*cppit) << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl;
t << ".c" << Option::obj_ext << ":\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl;
t << "####### Build rules" << endl << endl;
t << "all: " << fileFixify(Option::output.name()) << " " << varGlue("ALL_DEPS"," "," "," ") << " $(TARGET)" << endl << endl;
t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) "
<< extraCompilerDeps << var("POST_TARGETDEPS");
if(!project->variables()["QMAKE_APP_OR_DLL"].isEmpty()) {
t << "\n\t" << "$(LINK) @&&|" << "\n\t"
<< "$(LFLAGS) $(OBJECTS) $(OBJMOC),$(TARGET),,$(LIBS),$(DEF_FILE),$(RES_FILE)";
} else {
t << "\n\t-$(DEL_FILE) $(TARGET)"
<< "\n\t" << "$(LIB) $(TARGET) @&&|" << " \n+"
<< project->variables()["OBJECTS"].join(" \\\n+") << " \\\n+"
<< project->variables()["OBJMOC"].join(" \\\n+");
}
t << extraCompilerDeps;
t << endl << "|" << endl;
if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() )
t << "\t" <<var("QMAKE_POST_LINK") << endl;
if(project->isActiveConfig("dll") && !project->variables()["DLLDESTDIR"].isEmpty()) {
TQStringList dlldirs = project->variables()["DLLDESTDIR"];
for ( TQStringList::Iterator dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir ) {
t << "\n\t" << "-$(COPY_FILE) \"$(TARGET)\" " << *dlldir;
}
}
TQString targetfilename = project->variables()["TARGET"].first();
t << endl << endl;
if(!project->variables()["RC_FILE"].isEmpty()) {
t << var("RES_FILE") << ": " << var("RC_FILE") << "\n\t"
<< var("QMAKE_RC") << " " << var("RC_FILE") << endl << endl;
}
t << "mocables: $(SRCMOC)" << endl
<< "uicables: $(UICIMPLS) $(UICDECLS)" << endl << endl;
writeMakeQmake(t);
TQStringList dist_files = Option::mkfile::project_files;
if(!project->isEmpty("QMAKE_INTERNAL_INCLUDED_FILES"))
dist_files += project->variables()["QMAKE_INTERNAL_INCLUDED_FILES"];
if(!project->isEmpty("TRANSLATIONS"))
dist_files << var("TRANSLATIONS");
if(!project->isEmpty("FORMS")) {
TQStringList &forms = project->variables()["FORMS"];
for(TQStringList::Iterator formit = forms.begin(); formit != forms.end(); ++formit) {
TQString ui_h = fileFixify((*formit) + Option::h_ext.first());
if(TQFile::exists(ui_h) )
dist_files << ui_h;
}
}
t << "dist:" << "\n\t"
<< "$(ZIP) " << var("QMAKE_ORIG_TARGET") << ".zip " << "$(SOURCES) $(HEADERS) $(DIST) $(FORMS) "
<< dist_files.join(" ") << " " << var("TRANSLATIONS") << " " << var("IMAGES") << endl << endl;
t << "uiclean:";
TQString uiclean = varGlue("UICDECLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") + varGlue("UICIMPLS" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","");
if ( uiclean.isEmpty() ) {
// Borland make does not like an empty command section
uiclean = "\n\t@cd .";
}
t << uiclean << endl;
t << "mocclean:";
TQString mocclean = varGlue("SRCMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","") + varGlue("OBJMOC" ,"\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","");
if ( mocclean.isEmpty() ) {
// Borland make does not like an empty command section
mocclean = "\n\t@cd .";
}
t << mocclean << endl;
t << "clean: uiclean mocclean"
<< varGlue("OBJECTS","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
<< varGlue("QMAKE_CLEAN","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","")
<< varGlue("CLEAN_FILES","\n\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ","");
if(!project->isEmpty("IMAGES"))
t << varGlue("QMAKE_IMAGE_COLLECTION", "\n\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "");
t << endl;
// user defined targets
TQStringList::Iterator it;
TQStringList &qut = project->variables()["QMAKE_EXTRA_WIN_TARGETS"];
for(it = qut.begin(); it != qut.end(); ++it) {
TQString targ = var((*it) + ".target"),
cmd = var((*it) + ".commands"), deps;
if(targ.isEmpty())
targ = (*it);
TQStringList &deplist = project->variables()[(*it) + ".depends"];
for(TQStringList::Iterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
TQString dep = var((*dep_it) + ".target");
if(dep.isEmpty())
dep = (*dep_it);
deps += " " + dep;
}
if(!project->variables()["QMAKE_NOFORCE"].isEmpty() &&
project->variables()[(*it) + ".CONFIG"].findIndex("phony") != -1)
deps += TQString(" ") + "FORCE";
t << "\n\n" << targ << ":" << deps << "\n\t"
<< cmd;
}
t << endl << endl;
TQStringList &quc = project->variables()["QMAKE_EXTRA_WIN_COMPILERS"];
for(it = quc.begin(); it != quc.end(); ++it) {
TQString tmp_out = project->variables()[(*it) + ".output"].first();
TQString tmp_cmd = project->variables()[(*it) + ".commands"].join(" ");
TQString tmp_dep = project->variables()[(*it) + ".depends"].join(" ");
TQStringList &vars = project->variables()[(*it) + ".variables"];
if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
continue;
TQStringList &tmp = project->variables()[(*it) + ".input"];
for(TQStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
TQStringList &inputs = project->variables()[(*it2)];
for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
TQFileInfo fi(Option::fixPathToLocalOS((*input)));
TQString in = Option::fixPathToTargetOS((*input), FALSE),
out = tmp_out, cmd = tmp_cmd, deps;
out.replace("${QMAKE_FILE_BASE}", fi.baseName());
out.replace("${QMAKE_FILE_NAME}", fi.filePath());
cmd.replace("${QMAKE_FILE_BASE}", fi.baseName());
cmd.replace("${QMAKE_FILE_OUT}", out);
cmd.replace("${QMAKE_FILE_NAME}", fi.filePath());
for(TQStringList::Iterator it3 = vars.begin(); it3 != vars.end(); ++it3)
cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
if(!tmp_dep.isEmpty()) {
char buff[256];
TQString dep_cmd = tmp_dep;
dep_cmd.replace("${QMAKE_FILE_NAME}", fi.filePath());
if(FILE *proc = QT_POPEN(dep_cmd.latin1(), "r")) {
while(!feof(proc)) {
int read_in = int(fread(buff, 1, 255, proc));
if(!read_in)
break;
int l = 0;
for(int i = 0; i < read_in; i++) {
if(buff[i] == '\n' || buff[i] == ' ') {
deps += " " + TQCString(buff+l, (i - l) + 1);
l = i;
}
}
}
fclose(proc);
}
}
t << out << ": " << in << deps << "\n\t"
<< cmd << endl << endl;
}
}
}
t << endl;
t << "distclean: clean"
<< "\n\t-$(DEL_FILE) $(TARGET)"
<< endl << endl;
}
void
BorlandMakefileGenerator::init()
{
if(init_flag)
return;
init_flag = TRUE;
project->variables()["QMAKE_ORIG_TARGET"] = project->variables()["TARGET"];
/* this should probably not be here, but I'm using it to wrap the .t files */
if(project->first("TEMPLATE") == "app")
project->variables()["QMAKE_APP_FLAG"].append("1");
else if(project->first("TEMPLATE") == "lib")
project->variables()["QMAKE_LIB_FLAG"].append("1");
else if(project->first("TEMPLATE") == "subdirs") {
MakefileGenerator::init();
if(project->variables()["MAKEFILE"].isEmpty())
project->variables()["MAKEFILE"].append("Makefile");
if(project->variables()["QMAKE"].isEmpty())
project->variables()["QMAKE"].append("qmake");
return;
}
if(project->isEmpty("QMAKE_INSTALL_FILE"))
project->variables()["QMAKE_INSTALL_FILE"].append("$(COPY_FILE)");
if(project->isEmpty("QMAKE_INSTALL_DIR"))
project->variables()["QMAKE_INSTALL_DIR"].append("$(COPY_DIR)");
bool is_qt = (project->first("TARGET") == "qt" TQTDLL_POSTFIX || project->first("TARGET") == "qtmt" TQTDLL_POSTFIX);
TQStringList &configs = project->variables()["CONFIG"];
if (project->isActiveConfig("shared"))
project->variables()["DEFINES"].append("QT_DLL");
if (project->isActiveConfig("qt_dll"))
if(configs.findIndex("qt") == -1) configs.append("qt");
if ( project->isActiveConfig("qtopia") ) {
if(configs.findIndex("qtopialib") == -1)
configs.append("qtopialib");
if(configs.findIndex("qtopiainc") == -1)
configs.append("qtopiainc");
}
if ( project->isActiveConfig("qt") ) {
if ( project->isActiveConfig("plugin") ) {
project->variables()["CONFIG"].append("dll");
project->variables()["DEFINES"].append("QT_PLUGIN");
}
if ( (project->variables()["DEFINES"].findIndex("QT_NODLL") == -1) &&
((project->variables()["DEFINES"].findIndex("QT_MAKEDLL") != -1 ||
project->variables()["DEFINES"].findIndex("QT_DLL") != -1) ||
(getenv("QT_DLL") && !getenv("QT_NODLL"))) ) {
project->variables()["QMAKE_QT_DLL"].append("1");
if ( is_qt && !project->variables()["QMAKE_LIB_FLAG"].isEmpty() )
project->variables()["CONFIG"].append("dll");
}
}
if ( project->isActiveConfig("dll") || !project->variables()["QMAKE_APP_FLAG"].isEmpty() ) {
project->variables()["CONFIG"].remove("staticlib");
project->variables()["QMAKE_APP_OR_DLL"].append("1");
} else {
project->variables()["CONFIG"].append("staticlib");
}
if ( project->isActiveConfig("warn_off") ) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_WARN_OFF"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_WARN_OFF"];
} else if ( project->isActiveConfig("warn_on") ) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_WARN_ON"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_WARN_ON"];
}
if(project->isActiveConfig("qt")) {
if ( project->isActiveConfig("thread") )
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_THREAD_SUPPORT");
if ( project->isActiveConfig("accessibility" ) )
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_ACCESSIBILITY_SUPPORT");
if ( project->isActiveConfig("tablet") )
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("QT_TABLET_SUPPORT");
}
if ( project->isActiveConfig("debug") ) {
if ( project->isActiveConfig("thread") ) {
if ( project->isActiveConfig("dll") ) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_MT_DLLDBG"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_MT_DLLDBG"];
} else {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_MT_DBG"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_MT_DBG"];
}
}
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_DEBUG"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_DEBUG"];
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_DEBUG"];
} else {
if ( project->isActiveConfig("thread") ) {
if ( project->isActiveConfig("dll") ) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_MT_DLL"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_MT_DLL"];
} else {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_MT"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_MT"];
}
}
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RELEASE"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RELEASE"];
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_RELEASE"];
}
if ( !project->variables()["QMAKE_INCDIR"].isEmpty()) {
project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR"];
}
if ( project->isActiveConfig("qt") || project->isActiveConfig("opengl") ) {
project->variables()["CONFIG"].append("windows");
}
if ( project->isActiveConfig("qtopiainc") )
project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_TQTOPIA"];
if ( project->isActiveConfig("qtopialib") ) {
if(!project->isEmpty("QMAKE_LIBDIR_TQTOPIA"))
project->variables()["QMAKE_LIBDIR"] += project->variables()["QMAKE_LIBDIR_TQTOPIA"];
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QTOPIA"];
}
if ( project->isActiveConfig("qt") ) {
project->variables()["CONFIG"].append("moc");
project->variables()["INCLUDEPATH"] += project->variables()["QMAKE_INCDIR_TQT"];
project->variables()["QMAKE_LIBDIR"] += project->variables()["QMAKE_LIBDIR_TQT"];
if ( !project->isActiveConfig("debug") )
project->variables()[is_qt ? "PRL_EXPORT_DEFINES" : "DEFINES"].append("TQT_NO_DEBUG");
if ( is_qt && !project->variables()["QMAKE_LIB_FLAG"].isEmpty() ) {
if ( !project->variables()["QMAKE_QT_DLL"].isEmpty()) {
project->variables()["DEFINES"].append("QT_MAKEDLL");
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_QT_DLL"];
}
} else {
if(project->isActiveConfig("thread"))
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_THREAD"];
else
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT"];
if ( !project->variables()["QMAKE_QT_DLL"].isEmpty() ) {
int hver = findHighestVersion(project->first("QMAKE_LIBDIR_TQT"), "qt");
if ( hver == -1 )
hver = findHighestVersion(project->first("QMAKE_LIBDIR_TQT"), "qtmt");
if(hver != -1) {
TQString ver;
ver.sprintf("qt%s" TQTDLL_POSTFIX "%d.lib", (project->isActiveConfig("thread") ? "mt" : ""), hver);
TQStringList &libs = project->variables()["QMAKE_LIBS"];
for(TQStringList::Iterator libit = libs.begin(); libit != libs.end(); ++libit)
(*libit).replace(TQRegExp("qt(mt)?\\.lib"), ver);
}
}
if ( !project->isActiveConfig("dll") && !project->isActiveConfig("plugin") ) {
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_QT_ENTRY"];
}
}
}
if ( project->isActiveConfig("opengl") ) {
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_OPENGL"];
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_OPENGL"];
}
if ( project->isActiveConfig("dll") ) {
project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CFLAGS_CONSOLE_DLL"];
project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CXXFLAGS_CONSOLE_DLL"];
project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_LFLAGS_CONSOLE_DLL"];
project->variables()["QMAKE_LFLAGS_WINDOWS_ANY"] = project->variables()["QMAKE_LFLAGS_WINDOWS_DLL"];
if ( !project->variables()["QMAKE_LIB_FLAG"].isEmpty()) {
project->variables()["TARGET_EXT"].append(
TQStringList::split('.',project->first("VERSION")).join("") + ".dll");
} else {
project->variables()["TARGET_EXT"].append(".dll");
}
} else {
project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CFLAGS_CONSOLE"];
project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_CXXFLAGS_CONSOLE"];
project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"] = project->variables()["QMAKE_LFLAGS_CONSOLE"];
project->variables()["QMAKE_LFLAGS_WINDOWS_ANY"] = project->variables()["QMAKE_LFLAGS_WINDOWS"];
if ( !project->variables()["QMAKE_APP_FLAG"].isEmpty()) {
project->variables()["TARGET_EXT"].append(".exe");
} else {
project->variables()["TARGET_EXT"].append(".lib");
}
}
if ( project->isActiveConfig("windows") ) {
if ( project->isActiveConfig("console") ) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"];
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"];
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"];
} else {
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_WINDOWS_ANY"];
}
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_WINDOWS"];
} else {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_CONSOLE_ANY"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_CONSOLE_ANY"];
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_CONSOLE_ANY"];
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_CONSOLE"];
}
if ( project->isActiveConfig("stl") ) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_STL_ON"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_STL_ON"];
} else {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_STL_OFF"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_STL_OFF"];
}
if ( project->isActiveConfig("exceptions") ) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_EXCEPTIONS_ON"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_EXCEPTIONS_ON"];
} else {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_EXCEPTIONS_OFF"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_EXCEPTIONS_OFF"];
}
if ( project->isActiveConfig("rtti") ) {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RTTI_ON"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_ON"];
} else {
project->variables()["QMAKE_CFLAGS"] += project->variables()["QMAKE_CFLAGS_RTTI_OFF"];
project->variables()["QMAKE_CXXFLAGS"] += project->variables()["QMAKE_CXXFLAGS_RTTI_OFF"];
}
if ( project->isActiveConfig("thread") ) {
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_RTMT"];
} else {
project->variables()["QMAKE_LIBS"] += project->variables()["QMAKE_LIBS_RT"];
}
if ( project->isActiveConfig("moc") ) {
setTQMocAware(TRUE);
}
project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"];
// Update -lname to name.lib, and -Ldir to
TQStringList &libList = project->variables()["QMAKE_LIBS"];
for( TQStringList::Iterator stIt = libList.begin(); stIt != libList.end(); ) {
TQString s = *stIt;
if( s.startsWith( "-l" ) ) {
stIt = libList.remove( stIt );
stIt = libList.insert( stIt, s.mid( 2 ) + ".lib" );
} else if( s.startsWith( "-L" ) ) {
stIt = libList.remove( stIt );
project->variables()["QMAKE_LIBDIR"].append(TQDir::convertSeparators(s.mid( 2 )));
} else {
stIt++;
}
}
project->variables()["QMAKE_FILETAGS"] += TQStringList::split(' ',
"HEADERS SOURCES DEF_FILE RC_FILE TARGET QMAKE_LIBS DESTDIR DLLDESTDIR INCLUDEPATH");
TQStringList &l = project->variables()["QMAKE_FILETAGS"];
TQStringList::Iterator it;
for(it = l.begin(); it != l.end(); ++it) {
TQStringList &gdmf = project->variables()[(*it)];
for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner)
(*inner) = Option::fixPathToTargetOS((*inner), FALSE);
}
if ( !project->variables()["RC_FILE"].isEmpty()) {
if ( !project->variables()["RES_FILE"].isEmpty()) {
fprintf(stderr, "Both .rc and .res file specified.\n");
fprintf(stderr, "Please specify one of them, not both.");
exit(666);