BIG CHANGE: added parsing of base classes; now CompareClasses() is much smarter since...
[wxWidgets.git] / build / bakefiles / config.bkl
index bba9e608483d4229fec632693f216a358e0c0c14..37ed41dc6d443c4fac3bc3f132c163b4aa0e5aac 100644 (file)
@@ -2,18 +2,45 @@
 <!-- $Id$ -->
 
 <makefile>
-    
+
+    <set var="IS_MSVC_PRJ">
+        $(FORMAT in ['msvc6prj','msevc4prj','msvs2003prj','msvs2005prj'])
+    </set>
+
     <set var="BUILDING_LIB" overwrite="0">0</set>
 
+    <set var="CPP_DEFAULT_VALUE">
+        <if cond="FORMAT=='borland'">
+            cpp32 -Sr -oCON
+        </if>
+        <if cond="FORMAT=='mingw'">
+            $(DOLLAR)(CC) -E
+        </if>
+        <if cond="FORMAT=='msvc'">
+            $(DOLLAR)(CC) /EP /nologo
+        </if>
+        <if cond="FORMAT=='watcom'">
+            $(DOLLAR)(CC) -p
+        </if>
+    </set>
+    <option name="CPP">
+        <default-value>
+            $(CPP_DEFAULT_VALUE)
+        </default-value>
+        <description>
+            The C preprocessor
+        </description>
+    </option>
+
     <option name="SHARED">
         <values>0,1</values>
         <values-description>,DLL</values-description>
-        <default-value>1</default-value>
+        <default-value>0</default-value>
         <description>
             What type of library to build?
         </description>
     </option>
-    
+
     <option name="WXUNIV">
         <values>0,1</values>
         <values-description>,Universal</values-description>
         </description>
     </option>
 
-    <option name="UNICODE">
-        <values>0,1</values>
-        <values-description>,Unicode</values-description>
-        <default-value>0</default-value>        
-        <description>
-            Compile Unicode build of wxWindows?
-        </description>
-    </option>
+    <!-- don't include ANSI configuration in project files, it's going to be
+         eventually removed anyway and it only doubles the number of build
+         configs in projects: -->
+    <if cond="IS_MSVC_PRJ=='1'">
+        <set var="UNICODE">1</set>
+    </if>
+    <if cond="IS_MSVC_PRJ=='0'">
+        <option name="UNICODE">
+            <values>0,1</values>
+            <values-description>,Unicode</values-description>
+            <default-value>1</default-value>
+            <description>
+                Compile Unicode build of wxWidgets?
+            </description>
+        </option>
+    </if>
+
+    <if cond="FORMAT!='autoconf' and FORMAT!='watcom'">
+        <option name="MSLU">
+            <values>0,1</values>
+            <default-value>0</default-value>
+            <description>
+                Use MSLU library when building Unicode version.
+            </description>
+        </option>
+    </if>
+    <if cond="FORMAT=='autoconf' or FORMAT=='watcom'">
+        <set var="MSLU">0</set>
+    </if>
 
     <option name="BUILD">
         <values>debug,release</values>
         <values-description>Debug,Release</values-description>
-        <default-value>release</default-value>
+        <default-value>debug</default-value>
         <description>
             Type of compiled binaries
         </description>
     </option>
-    
+
+    <if cond="FORMAT=='msvc'">
+        <option name="TARGET_CPU">
+            <default-value>$(DOLLAR)(CPU)</default-value>
+            <description>
+The target processor architecture must be specified when it is not X86.
+This does not affect the compiler output, so you still need to make sure
+your environment is set up appropriately with the correct compiler in the
+PATH. Rather it affects some options passed to some of the common build
+utilities such as the resource compiler and the linker.
+
+Accepted values: AMD64, IA64.
+            </description>
+        </option>
+    </if>
+    <if cond="FORMAT!='msvc'">
+        <set var="TARGET_CPU"/>
+    </if>
+
+    <set var="DEBUG_INFO_DEFAULT">
+        <if cond="IS_MSVC_PRJ=='1'">1</if>
+        <if cond="IS_MSVC_PRJ=='0'">default</if>
+    </set>
+
     <option name="DEBUG_INFO">
         <values>0,1,default</values>
-        <default-value>default</default-value>
+        <default-value>$(DEBUG_INFO_DEFAULT)</default-value>
         <description>
 Should debugging info be included in the executables? The default value
 "default" means that debug info will be included if BUILD=debug
 and not included if BUILD=release.
         </description>
     </option>
-    
+
     <option name="DEBUG_FLAG">
         <values>0,1,default</values>
         <default-value>default</default-value>
@@ -66,23 +137,41 @@ be defined if BUILD=debug and not defined if BUILD=release.
             <default-value>default</default-value>
             <description>
 Should link against debug RTL (msvcrtd.dll) or release (msvcrt.dll)?
-Acts according to DEBUG_INFO by default.
+Acts according to BUILD by default.
             </description>
         </option>
     </if>
     <if cond="FORMAT!='msvc'">
         <set var="DEBUG_RUNTIME_LIBS">default</set>
     </if>
-    
+
+    <set var="MONOLITHIC_DEFAULT">
+        <if cond="FORMAT=='watcom'">1</if>
+        <if cond="FORMAT!='watcom'">0</if>
+    </set>
     <option name="MONOLITHIC">
         <values>0,1</values>
         <values-description>Multilib,Monolithic</values-description>
-        <default-value>0</default-value>
+        <default-value>$(MONOLITHIC_DEFAULT)</default-value>
         <description>
             Multiple libraries or single huge monolithic one?
         </description>
     </option>
-    
+
+    <if cond="FORMAT=='autoconf'"> <!-- FIXME - temporary -->
+        <option name="USE_PLUGINS">
+            <values>0,1</values>
+            <default-value>1</default-value>
+            <description>
+                Build parts of the library as dynamically loadable plugins
+                (only supported in multilib build)?
+            </description>
+        </option>
+    </if>
+    <if cond="FORMAT!='autoconf'">
+        <set var="USE_PLUGINS">0</set> <!-- FIXME - temporary -->
+    </if>
+
     <option name="USE_GUI">
         <values>0,1</values>
         <values-description>Base,GUI</values-description>
@@ -91,7 +180,7 @@ Acts according to DEBUG_INFO by default.
             Build GUI libraries?
         </description>
     </option>
-    
+
     <option name="USE_HTML">
         <values>0,1</values>
         <default-value>1</default-value>
@@ -99,7 +188,55 @@ Acts according to DEBUG_INFO by default.
             Build wxHTML library (USE_GUI must be 1)?
         </description>
     </option>
-    
+
+    <option name="USE_MEDIA">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Build multimedia library (USE_GUI must be 1)?
+        </description>
+    </option>
+
+    <option name="USE_XRC">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Build wxXRC library (USE_GUI must be 1)?
+        </description>
+    </option>
+
+    <option name="USE_AUI">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Build wxAUI library (USE_GUI must be 1)?
+        </description>
+    </option>
+
+    <option name="USE_PROPGRID">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Build wxPropertyGrid library (USE_GUI must be 1)?
+        </description>
+    </option>
+
+    <option name="USE_RICHTEXT">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Build wxRichTextCtrl library (USE_GUI must be 1)?
+        </description>
+    </option>
+
+    <option name="USE_STC">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Build wxStyledTextCtrl library (USE_GUI must be 1)?
+        </description>
+    </option>
+
     <option name="USE_OPENGL">
         <values>0,1</values>
         <default-value>0</default-value>
@@ -107,20 +244,59 @@ Acts according to DEBUG_INFO by default.
             Build OpenGL canvas library (USE_GUI must be 1)?
         </description>
     </option>
-    
-    <option name="USE_ODBC">
+
+    <!-- currently only VC++ can compile wxDebugReport which is in QA lib -->
+    <set var="USE_QA_DEFAULT">
+        <if cond="FORMAT in ['msvc','msvc6prj','msvs2003prj','msvs2005prj']">1</if>
+        <if cond="FORMAT not in ['msvc','msvc6prj','msvs2003prj','msvs2005prj']">0</if>
+    </set>
+    <option name="USE_QA">
         <values>0,1</values>
-        <default-value>0</default-value>
+        <default-value>$(USE_QA_DEFAULT)</default-value>
+        <description>
+            Build quality assurance classes library (USE_GUI must be 1)?
+        </description>
+    </option>
+
+    <option name="USE_EXCEPTIONS">
+        <values>0,1</values>
+        <default-value>1</default-value>
         <description>
-            Build ODBC database classes (USE_GUI must be 1)?
+            Enable exceptions in compiled code.
         </description>
     </option>
-    
+
+    <option name="USE_RTTI">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Enable run-time type information (RTTI) in compiled code.
+        </description>
+    </option>
+
+    <option name="USE_THREADS">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Enable threading in compiled code.
+        </description>
+    </option>
+
+    <if cond="FORMAT!='autoconf'">
+        <option name="USE_GDIPLUS">
+            <values>0,1</values>
+            <default-value>0</default-value>
+            <description>
+                Link with gdiplus.lib? (Needed for wxGraphicsContext, will also set wxUSE_GRAPHICS_CONTEXT)
+            </description>
+       </option>
+    </if>
+
     <option name="OFFICIAL_BUILD">
         <values>0,1</values>
         <default-value>0</default-value>
         <description>
-            Is this official build by wxWindows developers?
+            Is this official build by wxWidgets developers?
         </description>
     </option>
     <option name="VENDOR">
@@ -129,6 +305,14 @@ Acts according to DEBUG_INFO by default.
             Use this to name your customized DLLs differently
         </description>
     </option>
+    <!-- These basically do what vendor does in the places it didn't. -->
+    <!-- They should all be unified under some suitable descriptor    -->
+    <option name="WX_FLAVOUR">
+        <default-value></default-value>
+    </option>
+    <option name="WX_LIB_FLAVOUR">
+        <default-value></default-value>
+    </option>
 
     <option name="CFG">
         <default-value></default-value>
@@ -139,33 +323,62 @@ compiled .lib files and setup.h under the lib/ toplevel directory.
         </description>
     </option>
 
+    <!-- unit tests support: -->
+    <option name="CPPUNIT_CFLAGS">
+        <default-value></default-value>
+        <description>
+Compiler flags needed to compile test suite in tests directory. If you want
+to run the tests, set it so that the compiler can find CppUnit headers.
+        </description>
+    </option>
+
+    <option name="CPPUNIT_LIBS">
+        <default-value></default-value>
+        <description>
+Linker flags needed to link test suite in tests directory. If you want
+to run the tests, include CppUnit library here.
+        </description>
+    </option>
+
 
     <!-- ================================================================== -->
     <!--                             Autoconf                               -->
     <!-- ================================================================== -->
-    
-    <if cond="FORMAT=='autoconf'"> 
+
+    <if cond="FORMAT=='autoconf'">
         <option name="DEREZ"/>
         <option name="TOOLKIT"/>
         <option name="TOOLKIT_LOWERCASE"/>
         <option name="TOOLKIT_VERSION"/>
         <option name="TOOLCHAIN_NAME"/>
+        <option name="TOOLCHAIN_FULLNAME"/>
         <option name="EXTRALIBS"/>
         <option name="EXTRALIBS_XML"/>
-        <option name="EXTRALIBS_ODBC"/>
+        <option name="EXTRALIBS_HTML"/>
+        <option name="EXTRALIBS_MEDIA"/>
         <option name="EXTRALIBS_GUI"/>
         <option name="EXTRALIBS_OPENGL"/>
-        <option name="SAMPLES_RPATH_FLAG"/>
+        <option name="EXTRALIBS_SDL"/>
+        <option name="EXTRALIBS_GNOMEPRINT"/>
+        <option name="CXXWARNINGS"/>
         <option name="HOST_SUFFIX"/>
-        
+        <option name="SAMPLES_RPATH_FLAG"/>
+        <option name="SAMPLES_RPATH_POSTLINK"/>
+
         <set var="TOP_SRCDIR">$(top_srcdir)/</set>
         <set var="RUNTIME_LIBS">dynamic</set>
         <set var="WXTOPDIR"/> <!-- to be overriden on bakefile cmd line -->
+
+        <option name="WITH_PLUGIN_SDL">
+            <values>0,1</values>
+        </option>
+
+        <option name="wx_top_builddir"/>
     </if>
 
-    
+
     <!-- ================================================================== -->
-    <!--                         Windows compilers                          -->
+    <!--                     windows/dos/os2 compilers                      -->
     <!-- ================================================================== -->
 
     <if cond="FORMAT!='autoconf'">
@@ -178,27 +391,42 @@ static if SHARED=0, but it is highly recommended to not do
 it if SHARED=1 unless you know what you are doing.
             </description>
         </option>
-        
+
         <set var="WXTOPDIR"/> <!-- to be overriden on bakefile cmd line -->
 
-        <set var="TOOLKIT">MSW</set>
+        <set var="TOOLKIT" overwrite="0">
+            <if cond="FORMAT=='msevc4prj'">WINCE</if>
+            <if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='pocketpc2003'">WINCE</if>
+            <if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='win32'">MSW</if>
+            <if cond="FORMAT not in ['msevc4prj','msvs2005prj'] and PLATFORM_WIN32=='1'">MSW</if>
+            <if cond="PLATFORM_MSDOS=='1'">MGL</if>
+            <if cond="PLATFORM_OS2=='1'">PM</if>
+        </set>
         <set var="TOOLKIT_LOWERCASE">$(TOOLKIT.lower())</set>
         <set var="TOOLKIT_VERSION"/>
-        <set var="SAMPLES_RPATH_FLAG"/>
         <set var="HOST_SUFFIX"/>
+        <set var="EXTRACFLAGS"/>
         <set var="EXTRALIBS"/>
         <set var="EXTRALIBS_XML"/>
-        <set var="EXTRALIBS_ODBC"/>
+        <set var="EXTRALIBS_HTML"/>
+        <set var="EXTRALIBS_MEDIA"/>
         <set var="EXTRALIBS_GUI"/>
-        <set var="EXTRACFLAGS"/>
-
-        <set var="SRCDIR">
-            <if cond="BUILDING_LIB=='1'">..$(DIRSEP)..</if>
-            <if cond="BUILDING_LIB=='0'">.</if>
+        <set var="EXTRALIBS_OPENGL">
+            <if cond="COMPILER=='wat' and TOOLKIT=='MSW'">opengl32.lib glu32.lib</if>
+            <if cond="COMPILER in ['vc','evc']">opengl32.lib glu32.lib</if>
+            <if cond="COMPILER=='gcc'">-lopengl32 -lglu32</if>
         </set>
+        <set var="EXTRALIBS_SDL"/>
+        <set var="EXTRALIBS_GNOMEPRINT"/>
+
+        <set var="WITH_PLUGIN_SDL">0</set>
+
+        <if cond="BUILDING_LIB=='1'">
+            <set-srcdir>../..</set-srcdir>
+        </if>
         <set var="TOP_SRCDIR">$(SRCDIR)/$(WXTOPDIR)</set>
     </if>
-    
+
     <if cond="FORMAT=='mingw'">
         <option name="GCC_VERSION">
             <values>3,2.95</values>
@@ -214,5 +442,68 @@ Set the version of your Mingw installation here.
         </set>
         <set var="EXTRACFLAGS">$(GCCFLAGS) -DHAVE_W32API_H</set>
     </if>
-    
+
+
+    <!-- ================================================================== -->
+    <!--            Project files - hardcode some defaults                  -->
+    <!-- ================================================================== -->
+
+    <if cond="FORMAT_SUPPORTS_CONDITIONS=='0'">
+        <set var="RUNTIME_LIBS">dynamic</set>
+        <set var="OFFICIAL_BUILD">0</set>
+        <set var="USE_AUI">1</set>
+        <set var="USE_PROPGRID">1</set>
+        <set var="USE_RICHTEXT">1</set>
+        <set var="USE_STC">1</set>
+        <set var="USE_HTML">1</set>
+        <set var="USE_MEDIA">1</set>
+        <set var="USE_XRC">1</set>
+        <set var="USE_OPENGL">1</set>
+        <set var="USE_QA">1</set>
+        <set var="MONOLITHIC">0</set>
+        <set var="USE_GUI">1</set>
+        <set var="USE_EXCEPTIONS">1</set>
+        <set var="USE_RTTI">1</set>
+        <set var="USE_THREADS">1</set>
+        <if cond="FORMAT!='autoconf'"><set var="USE_GDIPLUS">0</set></if>
+        <set var="DEBUG_INFO">$(DEBUG_INFO_DEFAULT)</set>
+        <set var="DEBUG_FLAG">default</set>
+        <set var="MSLU">0</set>
+    </if>
+
+
+    <!-- DigitalMars make is braindead, it doesn't have conditional
+         processing: -->
+    <if cond="FORMAT=='dmars'">
+        <set var="RUNTIME_LIBS">static</set>
+        <set var="BUILD">debug</set>
+        <set var="SHARED">0</set>
+        <set var="WXUNIV">0</set>
+        <set var="UNICODE">1</set>
+        <!-- Free version does not distribute OpenGL,
+             in commercial distribution better use dmars_smake format -->
+        <set var="USE_OPENGL">0</set>
+    </if>
+
+    <!-- No need for wxUniv on embedded devices (yet): -->
+    <if cond="FORMAT=='msevc4prj' or (FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='pocketpc2003')">
+        <set var="WXUNIV">0</set>
+        <!-- Uploading debug reports from PDAs seems impractical -->
+        <set var="USE_QA">0</set>
+        <set var="MONOLITHIC">1</set> <!-- sic! -->
+        <set var="USE_OPENGL">0</set> <!-- need OpenGL ES support first -->
+        <!-- RTTI and exceptions need separate cccrtti.lib with eVC4 -->
+        <if cond="FORMAT=='msevc4prj'">
+            <set var="USE_RTTI">0</set>
+            <set var="USE_EXCEPTIONS">0</set>
+        </if>
+    </if>
+
+    <!-- Need for wxUniv within wxMGL: -->
+    <if cond="FORMAT!='autoconf' and TOOLKIT=='MGL'">
+        <set var="WXUNIV">1</set>
+        <set var="USE_THREADS">0</set>
+        <set var="RUNTIME_LIBS">static</set>
+    </if>
+
 </makefile>