From 04e0670135ad16a743cbcee81a79ea9e38b3deb8 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 19 Mar 2009 14:34:33 +0000 Subject: [PATCH] 2009-03-19 15:33 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * INSTALL * contrib/Makefile + Added QT to the mainstream build. See INSTALL how to enable it. We will disable it before release if it will be a build blocker. + contrib/hbqt/hbqt_base.cpp + Added missing file from previous commit. * utils/hbmk2/hbmk2.prg + Added -dflag: and -aflag: options. --- harbour/ChangeLog | 13 ++++++ harbour/INSTALL | 1 + harbour/contrib/Makefile | 1 + harbour/contrib/hbqt/hbqt_base.cpp | 65 ++++++++++++++++++++++++++++++ harbour/utils/hbmk2/hbmk2.prg | 18 ++++++++- 5 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 harbour/contrib/hbqt/hbqt_base.cpp diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b1e032e07b..b2fec6cc5b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,19 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-19 15:33 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * INSTALL + * contrib/Makefile + + Added QT to the mainstream build. See INSTALL how to + enable it. We will disable it before release if it will + be a build blocker. + + + contrib/hbqt/hbqt_base.cpp + + Added missing file from previous commit. + + * utils/hbmk2/hbmk2.prg + + Added -dflag: and -aflag: options. + 2009-03-19 12:58 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * config/rules.cf % Removed -ko option as it slightly decreases performance in -gc3 mode. diff --git a/harbour/INSTALL b/harbour/INSTALL index 133f8e30af..c7a713ddb4 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -147,6 +147,7 @@ HOW TO ENABLE OPTIONAL COMPONENTS BEFORE BUILD HB_INC_MYSQL=C:\mysql\include HB_INC_OPENSSL=C:\openssl\inc32 HB_INC_PGSQL=C:\pgsql\include + HB_INC_QT=C:\Qt\2009.01\qt\include NOTES: - For mingw and cygwin you have to use forward slashes and also cygwin drive notation for cygwin. diff --git a/harbour/contrib/Makefile b/harbour/contrib/Makefile index 52cc7715d4..6f21e1cd6d 100644 --- a/harbour/contrib/Makefile +++ b/harbour/contrib/Makefile @@ -42,6 +42,7 @@ DIRS +=\ hbmsql \ hbmysql \ hbpgsql \ + hbqt \ hbssl \ rddads \ rddsql \ diff --git a/harbour/contrib/hbqt/hbqt_base.cpp b/harbour/contrib/hbqt/hbqt_base.cpp new file mode 100644 index 0000000000..ab40d29aee --- /dev/null +++ b/harbour/contrib/hbqt/hbqt_base.cpp @@ -0,0 +1,65 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * QT base routines + * + * Copyright 2009 Viktor Szakats + * www - http://www.harbour-project.org + * + * 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; either version 2, or (at your option) + * any later version. + * + * 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 software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#include "hbapi.h" + +#include "hbqt.h" + +HB_FUNC( QT_VERSION ) +{ + hb_retnint( QT_VERSION ); +} + +HB_FUNC( QT_VERSION_STR ) +{ + hb_retc_const( QT_VERSION_STR ); +} diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 60facd76ae..c0ef2803e8 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -874,6 +874,20 @@ FUNCTION Main( ... ) AAdd( s_aOPTL , PathSepToTarget( cParam, 2 ) ) ENDIF + CASE Left( cParamL, Len( "-dflag:" ) ) == "-dflag:" + + cParam := ArchCompFilter( SubStr( cParam, Len( "-dflag:" ) + 1 ) ) + IF Left( cParam, 1 ) $ cOptPrefix + AAdd( s_aOPTD , PathSepToTarget( cParam, 2 ) ) + ENDIF + + CASE Left( cParamL, Len( "-aflag:" ) ) == "-aflag:" + + cParam := ArchCompFilter( SubStr( cParam, Len( "-aflag:" ) + 1 ) ) + IF Left( cParam, 1 ) $ cOptPrefix + AAdd( s_aOPTA , PathSepToTarget( cParam, 2 ) ) + ENDIF + CASE Left( cParam, 2 ) == "-l" .AND. ; Len( cParam ) > 2 .AND. ; !( Left( cParam, 3 ) == "-l-" ) @@ -3172,7 +3186,9 @@ STATIC PROCEDURE ShowHelp( lLong ) " -bldf=[p][c][l] inherit .prg/.c/linker flags (or none) from Harbour build" ,; " -prgflag: pass flag to Harbour" ,; " -cflag: pass flag to C compiler" ,; - " -ldflag: pass flag to linker" ,; + " -ldflag: pass flag to linker (executable)" ,; + " -aflag: pass flag to linker (static library)" ,; + " -dflag: pass flag to linker (dynamic library)" ,; " -hbcmp stop after creating the object files" ,; " create link/copy hbmk to hbcmp for the same effect" ,; " -hbcc stop after creating the object files and accept raw C flags" ,;