#!#############################################################################
-#! File: vc6lib.t
+#! File: vc6app.t
#! Purpose: tmake template file from which the VC++ 6.0 project file for
-#! building static wxWindows library wxvc.dsp is generated by running
+#! building wxWindows applications are generated by running
#! tmake -t vc6lib wxwin.pro -o wxvc.dsp
+#! you may append CONFIG+= to the end of the line, i.e.
+#! tmake -t vc6lib wxwin.pro -o wxvc.dsp CONFIG+=unicode
+#! tmake -t vc6lib wxwin.pro -o wxvc.dsp CONFIG+=dll
#! Author: Vadim Zeitlin
#! Created: 29.09.01
#! Version: $Id$
#!#############################################################################
#${
+ #! what kind of app are we building - this is used as prefix for the build
+ #! output dir
+ $KIND="";
+
if ( Config("wx") ) {
Project('CONFIG += windows');
}
- if ( Config("wxbase") ) {
+ if ( Config("wxbase") || Config("wxuniv") ) {
Project('CONFIG += wx');
}
if ( Config("wx") ) {
$UNICODE_FLAGS=" ";
}
- if ( Config("dll") ) {
- $DLL="Dll";
- $DLL_OR_LIB=(Config("wxbase") ? "wxbase" : "wxmsw") . "232";
- $DLL_FLAGS="/D WXUSINGDLL ";
- $EXTRA_LIBS="";
+ if ( Config("wx") ) {
+ if ( Config("wxbase") ) {
+ $KIND="Base";
+ $DLL_OR_LIB="wxbase";
+ }
+ elsif ( Config("wxuniv") ) {
+ $KIND="Univ";
+ $DLL_OR_LIB="wxuniv";
+ }
+ else {
+ $DLL_OR_LIB="wxmsw"
+ }
- $project{"TARGET"} .= "Dll";
- $project{"MAKEFILE"} .= "Dll";
- }
- else {
- $DLL="";
- $DLL_OR_LIB=Config("wxbase") ? "wxbase" : "wxmsw";
- $DLL_FLAGS=" ";
- #! actually this should depend on the contents of setup.h!
- $EXTRA_LIBS="zlib regex";
- if ( !Config("wxbase") ) {
- $EXTRA_LIBS.=" png jpeg tiff";
+ if ( Config("dll") ) {
+ $DLL="Dll";
+
+ $DLL_OR_LIB .= "232";
+ $DLL_FLAGS="/D WXUSINGDLL ";
+ $EXTRA_LIBS="";
+
+ $project{"TARGET"} .= "Dll";
+ $project{"MAKEFILE"} .= "Dll";
+ }
+ else {
+ $DLL="";
+ $DLL_FLAGS=" ";
+ #! actually this should depend on the contents of setup.h!
+ $EXTRA_LIBS="zlib regex";
+ if ( !Config("wxbase") ) {
+ $EXTRA_LIBS.=" png jpeg tiff";
+ }
}
}
$vc_base_libs .= 'wsock32.lib ';
$vc_link_release = "$WXDIR\\lib\\$DLL_OR_LIB$UNICODE_SUFFIX.lib ";
$vc_link_debug = "$WXDIR\\lib\\$DLL_OR_LIB$UNICODE_SUFFIX$DEBUG_SUFFIX.lib ";
+ foreach ( split(/ /, $EXTRA_LIBS) ) {
+ $vc_link_release .= "$WXDIR\\lib\\$_.lib ";
+ $vc_link_debug .= "$WXDIR\\lib\\$_" . "d.lib ";
+ }
}
$vc_link_release .= '/nologo /subsystem:console /machine:I386';
$vc_link_debug .= '/nologo /subsystem:console /debug /machine:I386 /pdbtype:sept';
$vc_cpp_opt_common1 = '/nologo /W4 ';
- $vc_cpp_opt_release = $vc_cpp_opt_common1 . '/O1 ';
+ $vc_cpp_opt_release = $vc_cpp_opt_common1 . '/O2 ';
$vc_cpp_opt_debug = $vc_cpp_opt_common1 . '/Zi /Od ';
$vc_cpp_opt_common = '/YX /FD /c';
$project{"VC_BASE_CPP_RELEASE"} = $vc_cpp_opt_release . $vc_cpp_def_release . $vc_cpp_opt_common;
if ( $text ne "" ) { $vc_def = $text . " "; $text = ""; } else { $vc_def = ""; }
if ( Config("wx") ) {
#! define wxWindows compilation flags
- $vc_def .= '/D _WIN32 /D WINVER=0x400 /D _MT ';
+ $vc_def .= '/D WIN32 /D WINVER=0x400 /D _MT ';
if ( Config("wxbase") ) {
$vc_def .= '/D wxUSE_GUI=0 ';
+ $vc_inc_debug .= "/I$WXDIR\\lib\\based ";
+ $vc_inc_release .= "/I$WXDIR\\lib\\base ";
}
else {
$vc_def .= '/D wxUSE_GUI=1 ';
+
+ if ( Config("wxuniv") ) {
+ $vc_def .= '/D "__WXUNIVERSAL__" ';
+
+ $vc_inc_debug .= "/I$WXDIR\\lib\\univd ";
+ $vc_inc_release .= "/I$WXDIR\\lib\\univ ";
+ }
+ else {
+ $vc_inc_debug .= "/I$WXDIR\\lib\\mswd ";
+ $vc_inc_release .= "/I$WXDIR\\lib\\msw ";
+ }
}
}
+ else {
+ $vc_inc_debug =
+ $vc_inc_release = "";
+ }
$project{"VC_CPP_INCLUDE"} = $vc_inc;
- $project{"VC_CPP_RELEASE"} = $vc_cpp_opt_release . $vc_inc . $vc_cpp_def_release . $vc_def . $vc_cpp_opt_common;
- $project{"VC_CPP_DEBUG"} = $vc_cpp_opt_debug . $vc_inc . $vc_cpp_def_debug . $vc_def . $vc_cpp_opt_common;
+ $project{"VC_CPP_RELEASE"} = $vc_cpp_opt_release . $vc_inc . $vc_inc_release . $vc_cpp_def_release . $vc_def . $vc_cpp_opt_common;
+ $project{"VC_CPP_DEBUG"} = $vc_cpp_opt_debug . $vc_inc . $vc_inc_debug . $vc_cpp_def_debug . $vc_def . $vc_cpp_opt_common;
if ( Project('RES_FILE') ) {
tmake_error(".res files are not supported, use .rc.");
@files = split(/\s+/,$project{"RC_FILE"});
foreach ( @files ) { $all_files{$_} = "r" };
- if ( $moc_aware ) {
- @files = split(/\s+/,$project{"_HDRMOC"});
- foreach ( @files ) { $all_files{$_} = "m"; }
- @files = split(/\s+/,$project{"_SRCMOC"});
- foreach ( @files ) { $all_files{$_} = "i"; }
- }
%file_names = ();
foreach $f ( %all_files ) {
$n = $f;
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release#$ $text = "$UNICODE$DLL" . '"'
-# PROP BASE Intermediate_Dir "Release#$ $text = "$UNICODE$DLL" . '"'
+# PROP BASE Output_Dir #$ $text = "\"${KIND}Release$UNICODE$DLL\""
+# PROP BASE Intermediate_Dir #$ $text = "\"${KIND}Release$UNICODE$DLL\""
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release#$ $text = "$UNICODE$DLL" . '"'
-# PROP Intermediate_Dir "Release#$ $text = "$UNICODE$DLL" . '"'
+# PROP Output_Dir #$ $text = "\"${KIND}Release$UNICODE$DLL\""
+# PROP Intermediate_Dir #$ $text = "${KIND}Release$UNICODE$DLL\""
#$ Config("windows") && ($text='# PROP Ignore_Export_Lib 0');
# PROP Target_Dir ""
# ADD BASE CPP #$ Expand("VC_BASE_CPP_RELEASE");
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug#$ $text = "$UNICODE$DLL" . '"'
-# PROP BASE Intermediate_Dir "Debug#$ $text = "$UNICODE$DLL" . '"'
+# PROP BASE Output_Dir #$ $text = "\"${KIND}Debug$UNICODE$DLL\""
+# PROP BASE Intermediate_Dir #$ $text = "\"${KIND}Debug$UNICODE$DLL\""
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug#$ $text = "$UNICODE$DLL" . '"'
-# PROP Intermediate_Dir "Debug#$ $text = "$UNICODE$DLL" . '"'
+# PROP Output_Dir #$ $text = "\"${KIND}Debug$UNICODE$DLL\""
+# PROP Intermediate_Dir #$ $text = "\"${KIND}Debug$UNICODE$DLL\""
#$ Config("windows") && ($text='# PROP Ignore_Export_Lib 0');
# PROP Target_Dir ""
# ADD BASE CPP #$ Expand("VC_BASE_CPP_DEBUG");