diff options
Diffstat (limited to 'tmake/lib/win32-msvc')
-rwxr-xr-x | tmake/lib/win32-msvc/app.t | 6 | ||||
-rwxr-xr-x | tmake/lib/win32-msvc/generic.t | 221 | ||||
-rwxr-xr-x | tmake/lib/win32-msvc/lib.t | 6 | ||||
-rwxr-xr-x | tmake/lib/win32-msvc/subdirs.t | 2 | ||||
-rwxr-xr-x | tmake/lib/win32-msvc/tmake.conf | 64 | ||||
-rwxr-xr-x | tmake/lib/win32-msvc/vcapp.t | 226 | ||||
-rwxr-xr-x | tmake/lib/win32-msvc/vclib.t | 178 |
7 files changed, 703 insertions, 0 deletions
diff --git a/tmake/lib/win32-msvc/app.t b/tmake/lib/win32-msvc/app.t new file mode 100755 index 0000000..fc4dc2c --- /dev/null +++ b/tmake/lib/win32-msvc/app.t @@ -0,0 +1,6 @@ +############################################################################# +#! +#! This is a tmake template for building Win32 applications. +#! +#$ Project('TMAKE_APP_FLAG = 1'); +#$ IncludeTemplate("generic.t"); diff --git a/tmake/lib/win32-msvc/generic.t b/tmake/lib/win32-msvc/generic.t new file mode 100755 index 0000000..e57180d --- /dev/null +++ b/tmake/lib/win32-msvc/generic.t @@ -0,0 +1,221 @@ +#! +#! This is a tmake template for building Win32 applications or libraries. +#! +#${ + if ( Config("qt") ) { + if ( !(Project("DEFINES") =~ /QT_NODLL/) && + ((Project("DEFINES") =~ /QT_(?:MAKE)?DLL/) || + ($ENV{"QT_DLL"} && !$ENV{"QT_NODLL"})) ) { + Project('TMAKE_QT_DLL = 1'); + if ( (Project("TARGET") eq "qt") && Project("TMAKE_LIB_FLAG") ) { + Project('CONFIG += dll'); + } + } + } + if ( Config("dll") || Project("TMAKE_APP_FLAG") ) { + Project('CONFIG -= staticlib'); + Project('TMAKE_APP_OR_DLL = 1'); + } else { + Project('CONFIG += staticlib'); + } + if ( Config("warn_off") ) { + Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_WARN_OFF'); + Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_WARN_OFF'); + } elsif ( Config("warn_on") ) { + Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_WARN_ON'); + Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_WARN_ON'); + } + if ( Config("debug") ) { + Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_DEBUG'); + Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_DEBUG'); + Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_DEBUG'); + } elsif ( Config("release") ) { + Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_RELEASE'); + Project('TMAKE_CXXFLAGS += $$TMAKE_CXXFLAGS_RELEASE'); + Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_RELEASE'); + } + if ( Config("qt") || Config("opengl") ) { + Project('CONFIG += windows' ); + } + if ( Config("qt") ) { + $moc_aware = 1; + AddIncludePath(Project("TMAKE_INCDIR_QT")); + if ( Config("opengl") ) { + Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_OPENGL'); + } + if ( (Project("TARGET") eq "qt") && Project("TMAKE_LIB_FLAG") ) { + if ( Project("TMAKE_QT_DLL") ) { + Project('DEFINES -= QT_DLL'); + Project('DEFINES *= QT_MAKEDLL'); + } + } else { + if ( Project("TMAKE_QT_DLL") ) { + Project('DEFINES *= QT_DLL'); + } + Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT'); + if ( Project("TMAKE_QT_DLL") ) { + my $qtver =FindHighestLibVersion($ENV{"QTDIR"} . "/lib", "qt"); + Project("TMAKE_LIBS /= s/qt.lib/qt${qtver}.lib/"); + Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_DLL'); + } + } + } + if ( Config("opengl") ) { + Project('TMAKE_LIBS *= $$TMAKE_LIBS_OPENGL'); + } + if ( Config("dll") ) { + Project('TMAKE_LFLAGS_CONSOLE_ANY = $$TMAKE_LFLAGS_CONSOLE_DLL'); + Project('TMAKE_LFLAGS_WINDOWS_ANY = $$TMAKE_LFLAGS_WINDOWS_DLL'); + if ( Project("TMAKE_LIB_FLAG") ) { + my $ver = Project("VERSION"); + $ver =~ s/\.//g; + $project{"TARGET_EXT"} = "${ver}.dll"; + } else { + $project{"TARGET_EXT"} = ".dll"; + } + } else { + Project('TMAKE_LFLAGS_CONSOLE_ANY = $$TMAKE_LFLAGS_CONSOLE'); + Project('TMAKE_LFLAGS_WINDOWS_ANY = $$TMAKE_LFLAGS_WINDOWS'); + if ( Project("TMAKE_APP_FLAG") ) { + $project{"TARGET_EXT"} = ".exe"; + } else { + $project{"TARGET_EXT"} = ".lib"; + } + } + if ( Config("windows") ) { + if ( Config("console") ) { + Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_CONSOLE_ANY'); + Project('TMAKE_LIBS *= $$TMAKE_LIBS_CONSOLE'); + } else { + Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_WINDOWS_ANY'); + } + Project('TMAKE_LIBS *= $$TMAKE_LIBS_WINDOWS'); + } else { + Project('TMAKE_LFLAGS *= $$TMAKE_LFLAGS_CONSOLE_ANY'); + Project('TMAKE_LIBS *= $$TMAKE_LIBS_CONSOLE'); + } + Project('TMAKE_LIBS += $$LIBS'); + Project('TMAKE_FILETAGS = HEADERS SOURCES DEF_FILE RC_FILE TARGET TMAKE_LIBS DESTDIR DLLDESTDIR $$FILETAGS'); + foreach ( split(/\s/,Project("TMAKE_FILETAGS")) ) { + $project{$_} =~ s-[/\\]+-\\-g; + } + if ( Project("DEF_FILE") ) { + Project('TMAKE_LFLAGS *= /DEF:$$DEF_FILE'); + } + if ( Project("RC_FILE") ) { + if ( Project("RES_FILE") ) { + tmake_error("Both .rc and .res file specified.\n" . + "Please specify one of them, not both."); + } + $project{"RES_FILE"} = $project{"RC_FILE"}; + $project{"RES_FILE"} =~ s/\.rc$/.res/i; + Project('TARGETDEPS += $$RES_FILE'); + } + if ( Project("RES_FILE") ) { + Project('TMAKE_LIBS *= $$RES_FILE'); + } + StdInit(); + $project{"DESTDIR"} = FixPath($project{"DESTDIR"}); + if ( Project("VERSION") ) { + $project{"VER_MAJ"} = $project{"VERSION"}; + $project{"VER_MAJ"} =~ s/\.\d+$//; + $project{"VER_MIN"} = $project{"VERSION"}; + $project{"VER_MIN"} =~ s/^\d+\.//; + } + Project('debug:TMAKE_CLEAN += $$TARGET.pdb vc*.pdb $$TARGET.ilk'); +#$} +#! +# Makefile for building #$ Expand("TARGET") +# Generated by tmake at #$ Now(); +# Project: #$ Expand("PROJECT"); +# Template: #$ Expand("TEMPLATE"); +############################################################################# + +####### Compiler, tools and options + +CC = #$ Expand("TMAKE_CC"); +CXX = #$ Expand("TMAKE_CXX"); +CFLAGS = #$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D",""); +CXXFLAGS= #$ Expand("TMAKE_CXXFLAGS"); ExpandGlue("DEFINES","-D"," -D",""); +INCPATH = #$ ExpandGlue("INCPATH",'-I"','" -I"','"'); +#$ !Project("TMAKE_APP_OR_DLL") && DisableOutput(); +LINK = #$ Expand("TMAKE_LINK"); +LFLAGS = #$ Expand("TMAKE_LFLAGS"); +LIBS = #$ Expand("TMAKE_LIBS"); +#$ !Project("TMAKE_APP_OR_DLL") && EnableOutput(); +#$ Project("TMAKE_APP_OR_DLL") && DisableOutput(); +LIB = #$ Expand("TMAKE_LIB"); +#$ Project("TMAKE_APP_OR_DLL") && EnableOutput(); +MOC = #$ Expand("TMAKE_MOC"); + +ZIP = #$ Expand("TMAKE_ZIP"); + +####### Files + +HEADERS = #$ ExpandList("HEADERS"); +SOURCES = #$ ExpandList("SOURCES"); +OBJECTS = #$ ExpandList("OBJECTS"); +SRCMOC = #$ ExpandList("SRCMOC"); +OBJMOC = #$ ExpandList("OBJMOC"); +DIST = #$ ExpandList("DISTFILES"); +TARGET = #$ ExpandGlue("TARGET",$project{"DESTDIR"},"",$project{"TARGET_EXT"}); + +####### Implicit rules + +.SUFFIXES: .cpp .cxx .cc .c + +.cpp.obj: + #$ Expand("TMAKE_RUN_CXX_IMP"); + +.cxx.obj: + #$ Expand("TMAKE_RUN_CXX_IMP"); + +.cc.obj: + #$ Expand("TMAKE_RUN_CXX_IMP"); + +.c.obj: + #$ Expand("TMAKE_RUN_CC_IMP"); + +####### Build rules + +all: #$ ExpandGlue("ALL_DEPS",""," "," "); $text .= '$(TARGET)'; + +$(TARGET): $(OBJECTS) $(OBJMOC) #$ Expand("TARGETDEPS"); +#$ Project("TMAKE_APP_OR_DLL") || DisableOutput(); + $(LINK) $(LFLAGS) /OUT:$(TARGET) @<< + $(OBJECTS) $(OBJMOC) $(LIBS) +#$ Project("TMAKE_APP_OR_DLL") || EnableOutput(); +#$ Project("TMAKE_APP_OR_DLL") && DisableOutput(); + $(LIB) /OUT:$(TARGET) @<< + $(OBJECTS) $(OBJMOC) +#$ Project("TMAKE_APP_OR_DLL") && EnableOutput(); +<< +#$ (Config("dll") && Project("DLLDESTDIR")) || DisableOutput(); + -copy $(TARGET) #$ Expand("DLLDESTDIR"); +#$ (Config("dll") && Project("DLLDESTDIR")) || EnableOutput(); +#$ Project("RC_FILE") || DisableOutput(); + +#$ Substitute("\$\$RES_FILE: \$\$RC_FILE\n\t\$\$TMAKE_RC \$\$RC_FILE"); +#$ Project("RC_FILE") || EnableOutput(); + +moc: $(SRCMOC) + +#$ TmakeSelf(); + +dist: + #$ Substitute('$(ZIP) $$PROJECT.zip $$PROJECT.pro $(SOURCES) $(HEADERS) $(DIST)'); + +clean: + #$ ExpandGlue("OBJECTS","-del ","\n\t-del ",""); + #$ ExpandGlue("SRCMOC" ,"-del ","\n\t-del ",""); + #$ ExpandGlue("OBJMOC" ,"-del ","\n\t-del ",""); + -del $(TARGET) + #$ ExpandGlue("TMAKE_CLEAN","-del ","\n\t-del ",""); + #$ ExpandGlue("CLEAN_FILES","-del ","\n\t-del ",""); + +####### Compile + +#$ BuildObj(Project("OBJECTS"),Project("SOURCES")); +#$ BuildMocObj(Project("OBJMOC"),Project("SRCMOC")); +#$ BuildMocSrc(Project("HEADERS")); +#$ BuildMocSrc(Project("SOURCES")); diff --git a/tmake/lib/win32-msvc/lib.t b/tmake/lib/win32-msvc/lib.t new file mode 100755 index 0000000..d8ac6c7 --- /dev/null +++ b/tmake/lib/win32-msvc/lib.t @@ -0,0 +1,6 @@ +############################################################################# +#! +#! This is a tmake template for building Win32 libraries. +#! +#$ Project('TMAKE_LIB_FLAG = 1'); +#$ IncludeTemplate("generic.t"); diff --git a/tmake/lib/win32-msvc/subdirs.t b/tmake/lib/win32-msvc/subdirs.t new file mode 100755 index 0000000..8b881ab --- /dev/null +++ b/tmake/lib/win32-msvc/subdirs.t @@ -0,0 +1,2 @@ +#! Use the common Win32 template +#$ IncludeTemplate("../win32/subdirs.t"); diff --git a/tmake/lib/win32-msvc/tmake.conf b/tmake/lib/win32-msvc/tmake.conf new file mode 100755 index 0000000..cb64ac9 --- /dev/null +++ b/tmake/lib/win32-msvc/tmake.conf @@ -0,0 +1,64 @@ +# +# $Id$ +# +# tmake configuration for Win32/Microsoft C++ +# + +TEMPLATE = app +CONFIG = qt warn_on release + +TMAKE_CC = cl +TMAKE_CFLAGS = -nologo +TMAKE_CFLAGS_WARN_ON = -W3 +TMAKE_CFLAGS_WARN_OFF = -W0 +TMAKE_CFLAGS_RELEASE = -O2 +TMAKE_CFLAGS_DEBUG = -Zi +TMAKE_CFLAGS_MT = -MT +TMAKE_CFLAGS_MT_DBG = -MTd +TMAKE_CFLAGS_MT_DLL = -MD +TMAKE_CFLAGS_MT_DLLDBG = -MDd +TMAKE_CFLAGS_YACC = + +TMAKE_CXX = $$TMAKE_CC +TMAKE_CXXFLAGS = $$TMAKE_CFLAGS +TMAKE_CXXFLAGS_WARN_ON = $$TMAKE_CFLAGS_WARN_ON +TMAKE_CXXFLAGS_WARN_OFF = $$TMAKE_CFLAGS_WARN_OFF +TMAKE_CXXFLAGS_RELEASE = $$TMAKE_CFLAGS_RELEASE +TMAKE_CXXFLAGS_DEBUG = $$TMAKE_CFLAGS_DEBUG +TMAKE_CXXFLAGS_MT = $$TMAKE_CFLAGS_MT +TMAKE_CXXFLAGS_MT_DBG = $$TMAKE_CFLAGS_MT_DBG +TMAKE_CXXFLAGS_MT_DLL = $$TMAKE_CFLAGS_MT_DLL +TMAKE_CXXFLAGS_MT_DLLDBG= $$TMAKE_CFLAGS_MT_DLLDBG +TMAKE_CXXFLAGS_YACC = $$TMAKE_CFLAGS_YACC + +TMAKE_INCDIR = +TMAKE_INCDIR_QT = $(QTDIR)\include + +TMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src +TMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< +TMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$obj $src +TMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ $< + +TMAKE_LINK = link +TMAKE_LFLAGS = /NOLOGO +TMAKE_LFLAGS_RELEASE = +TMAKE_LFLAGS_DEBUG = /DEBUG +TMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:console +TMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:windows +TMAKE_LFLAGS_CONSOLE_DLL= /SUBSYSTEM:console /DLL +TMAKE_LFLAGS_WINDOWS_DLL= /SUBSYSTEM:windows /DLL + +TMAKE_LIBS = +TMAKE_LIBS_CONSOLE = +TMAKE_LIBS_WINDOWS = user32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib wsock32.lib +TMAKE_LIBS_QT = $(QTDIR)\lib\qt.lib +TMAKE_LIBS_QT_DLL = $(QTDIR)\lib\qtmain.lib +TMAKE_LIBS_QT_OPENGL = $(QTDIR)\lib\qgl.lib +TMAKE_LIBS_OPENGL = opengl32.lib glu32.lib + +TMAKE_MOC = moc + +TMAKE_LIB = lib /NOLOGO +TMAKE_RC = rc + +TMAKE_ZIP = zip -r -9 diff --git a/tmake/lib/win32-msvc/vcapp.t b/tmake/lib/win32-msvc/vcapp.t new file mode 100755 index 0000000..02e15e4 --- /dev/null +++ b/tmake/lib/win32-msvc/vcapp.t @@ -0,0 +1,226 @@ +#! +#! This TMAKE template - Microsoft Visual C++ 5.0 applications +#! +#${ + if ( Config("qt") || Config("opengl") ) { + Project('CONFIG += windows'); + } + if ( Config("qt") ) { + $moc_aware = 1; + AddIncludePath(Project('TMAKE_INCDIR_QT')); + if ( Config("opengl") ) { + Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT_OPENGL'); + } + Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT'); + } + if ( Config("opengl") ) { + Project('TMAKE_LIBS *= $$TMAKE_LIBS_OPENGL'); + } + Project('TMAKE_LIBS += $$LIBS'); + + if ( Config("windows") ) { + $project{"VC_PROJ_TYPE"} = 'Win32 (x86) Application'; + $project{"VC_PROJ_CODE"} = '0x0101'; + $vc_base_libs = 'kernel32.lib user32.lib gdi32.lib winspool.lib ' . + 'comdlg32.lib advapi32.lib shell32.lib ole32.lib ' . + 'oleaut32.lib uuid.lib odbc32.lib odbccp32.lib '; + $vc_libs = $vc_base_libs . 'wsock32.lib '; + $vc_link_release = '/nologo /subsystem:windows /machine:I386'; + $vc_link_debug = '/nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept'; + $vc_cpp_def_release = '/D "NDEBUG" /D "WIN32" /D "_WINDOWS" '; + $vc_cpp_def_debug = '/D "_DEBUG" /D "WIN32" /D "_WINDOWS" '; + } else { + $project{"VC_PROJ_TYPE"} = 'Win32 (x86) Console Application'; + $project{"VC_PROJ_CODE"} = '0x0103'; + $vc_base_libs = 'kernel32.lib user32.lib gdi32.lib winspool.lib ' . + 'comdlg32.lib advapi32.lib shell32.lib ole32.lib ' . + 'oleaut32.lib uuid.lib odbc32.lib odbccp32.lib '; + $vc_libs = $vc_base_libs; + $vc_link_release = '/nologo /subsystem:console /machine:I386'; + $vc_link_debug = '/nologo /subsystem:console /debug /machine:I386 /pdbtype:sept'; + $vc_cpp_def_release = '/D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" '; + $vc_cpp_def_debug = '/D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" '; + } + $project{"VC_BASE_LINK_RELEASE"} = $vc_base_libs . $vc_link_release; + $project{"VC_BASE_LINK_DEBUG"} = $vc_base_libs . $vc_link_debug; + $tmake_libs = Project('TMAKE_LIBS') ? (Project('TMAKE_LIBS') . " ") : ""; + $project{"VC_LINK_RELEASE"} = $vc_libs . $tmake_libs . $vc_link_release; + $project{"VC_LINK_DEBUG"} = $vc_libs . $tmake_libs . $vc_link_debug; + + $vc_cpp_opt_release = '/nologo /W3 /GX /O2 '; + $vc_cpp_opt_debug = '/nologo /W3 /Gm /GX /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; + $project{"VC_BASE_CPP_DEBUG"} = $vc_cpp_opt_debug . $vc_cpp_def_debug . $vc_cpp_opt_common; + ExpandGlue("INCPATH",'/I "','" /I "','"'); + if ( $text ne "" ) { $vc_inc = $text . " "; $text = ""; } else { $vc_inc = ""; } + ExpandGlue("DEFINES",'/D "','" /D "','"'); + if ( $text ne "" ) { $vc_def = $text . " "; $text = ""; } else { $vc_def = ""; } + $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{"MAKEFILE"} = $project{"PROJECT"} . ".mak"; + $project{"TARGETAPP"} = $project{"TARGET"} . ".exe"; + Project('TMAKE_FILETAGS = HEADERS SOURCES TARGET DESTDIR $$FILETAGS'); + foreach ( split(/\s/,Project('TMAKE_FILETAGS')) ) { + $project{$_} =~ s-/-\\-g; + } + StdInit(); + if ( defined($project{"DESTDIR"}) ) { + $project{"TARGETAPP"} = $project{"DESTDIR"} . "\\" . $project{"TARGETAPP"}; + $project{"TARGETAPP"} =~ s/\\+/\\/g; + } + %all_files = (); + @files = split(/\s+/,$project{"HEADERS"}); + foreach ( @files ) { $all_files{$_} = "h" }; + @files = split(/\s+/,$project{"SOURCES"}); + foreach ( @files ) { $all_files{$_} = "s" }; + 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; + $n =~ s/^.*\\//; + $file_names{$n} = $f; + $file_path{$n} = ".\\" . $f; + $file_path2{$n} = (($f =~ /^\./) ? "" : ".\\") . $f; + } +#$} +# Microsoft Developer Studio Project File - #$ Substitute('Name="$$TARGET" - Package Owner=<4>'); +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE #$ Substitute('"$$VC_PROJ_TYPE" $$VC_PROJ_CODE'); + +CFG=#$ Substitute('$$TARGET - Win32 Debug'); +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "#$ ExpandGlue('MAKEFILE','','','".'); +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f #$ Substitute('"$$MAKEFILE" CFG="$$TARGET - Win32 Debug"'); +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE #$ Substitute('"$$TARGET - Win32 Release" (based on "$$VC_PROJ_TYPE")'); +!MESSAGE #$ Substitute('"$$TARGET - Win32 Debug" (based on "$$VC_PROJ_TYPE")'); +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +#$ Config("windows") && ($text='MTL=midl.exe'); +RSC=rc.exe + +!IF "$(CFG)" == #$ Substitute('"$$TARGET - Win32 Release"'); + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +#$ Config("windows") && ($text='# PROP Ignore_Export_Lib 0'); +# PROP Target_Dir "" +# ADD BASE CPP #$ Expand("VC_BASE_CPP_RELEASE"); +# ADD CPP #$ Expand("VC_CPP_RELEASE"); +#$ Config("windows") || DisableOutput(); +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32 +#$ Config("windows") || EnableOutput(); +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 #$ Expand("VC_BASE_LINK_RELEASE"); +# ADD LINK32 #$ Expand("VC_LINK_RELEASE"); + +!ELSEIF "$(CFG)" == #$ Substitute('"$$TARGET - Win32 Debug"'); + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +#$ Config("windows") && ($text='# PROP Ignore_Export_Lib 0'); +# PROP Target_Dir "" +# ADD BASE CPP #$ Expand("VC_BASE_CPP_DEBUG"); +# ADD CPP #$ Expand("VC_CPP_DEBUG"); +#$ Config("windows") || DisableOutput(); +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 +#$ Config("windows") || EnableOutput(); +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 #$ Expand("VC_BASE_LINK_DEBUG"); +# ADD LINK32 #$ Expand("VC_LINK_DEBUG"); + +!ENDIF + +# Begin Target + +# Name #$Substitute('"$$TARGET - Win32 Release"'); +# Name #$Substitute('"$$TARGET - Win32 Debug"'); +#${ + foreach $n ( sort keys %file_names ) { + $f = $file_names{$n}; + $p = $file_path{$n}; + $p2 = $file_path2{$n}; + $t = $all_files{$f}; + if ( ($t eq "h") && $moc_output{$f} ) { + my($build); + $build = "\n\n# Begin Custom Build - Running moc...\nInputPath=" . $p2 . "\n\n" + . '"' . $moc_output{$f} . '" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"' + . "\n\tmoc $p2 -o " . $moc_output{$f} . "\n\n" + . "# End Custom Build\n\n"; + $text .= ("# Begin Source File\n\nSOURCE=$p\n\n" + . '!IF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Release"' + . $build); + $text .= ('!ELSEIF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Debug"' + . $build + . "!ENDIF \n\n# End Source File\n"); + } elsif ( $t eq "i" ) { + my($build,$dn); + $build = "\n\n# Begin Custom Build - Running moc...\nInputPath=" . $p2 . "\n\n" + . '"' . $f . '" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"' + . "\n\tmoc ". $moc_input{$f} . " -o $f\n\n" + . "# End Custom Build\n\n"; + $dn = $n; + $dn =~ s/\..*//; + $dn =~ tr/a-z/A-Z/; + $text .= ("# Begin Source File\n\nSOURCE=$p\n" + . "USERDEP__$dn=" . '"' . $moc_input{$f} . '"' . "\n\n" + . '!IF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Release"' + . $build); + $text .= ('!ELSEIF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Debug"' + . $build + . "!ENDIF \n\n# End Source File\n"); + } elsif ( $t eq "s" || $t eq "m" || $t eq "h" ) { + $text .= "# Begin Source File\n\nSOURCE=$p\n# End Source File\n"; + } + } + chop $text; +#$} +# End Target +# End Project diff --git a/tmake/lib/win32-msvc/vclib.t b/tmake/lib/win32-msvc/vclib.t new file mode 100755 index 0000000..e56409e --- /dev/null +++ b/tmake/lib/win32-msvc/vclib.t @@ -0,0 +1,178 @@ +#! +#! This TMAKE template - Microsoft Visual C++ 5.0 libraries +#! +#${ + if ( Config("qt") || Config("opengl") ) { + Project('CONFIG += windows'); + } + if ( Config("qt") ) { + $moc_aware = 1; + AddIncludePath(Project('TMAKE_INCDIR_QT')); + } + + $project{"VC_PROJ_TYPE"} = 'Win32 (x86) Static Library'; + $project{"VC_PROJ_CODE"} = '0x0104'; + + $vc_cpp_def_release = '/D "NDEBUG" /D "WIN32" /D "_WINDOWS" '; + $vc_cpp_def_debug = '/D "_DEBUG" /D "WIN32" /D "_WINDOWS" '; + $vc_cpp_opt_release = '/nologo /W3 /GX /O2 '; + $vc_cpp_opt_debug = '/nologo /W3 /Gm /GX /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; + $project{"VC_BASE_CPP_DEBUG"} = $vc_cpp_opt_debug . $vc_cpp_def_debug . $vc_cpp_opt_common; + ExpandGlue("INCPATH",'/I "','" /I "','"'); + if ( $text ne "" ) { $vc_inc = $text . " "; $text = ""; } else { $vc_inc = ""; } + ExpandGlue("DEFINES",'/D "','" /D "','"'); + if ( $text ne "" ) { $vc_def = $text . " "; $text = ""; } else { $vc_def = ""; } + $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{"MAKEFILE"} = $project{"PROJECT"} . ".mak"; + $project{"TARGETLIB"} = $project{"TARGET"} . ".lib"; + Project('TMAKE_FILETAGS = HEADERS SOURCES TARGET DESTDIR $$FILETAGS'); + foreach ( split(/\s/,Project('TMAKE_FILETAGS')) ) { + $project{$_} =~ s-/-\\-g; + } + StdInit(); + if ( defined($project{"DESTDIR"}) ) { + $project{"TARGETLIB"} = $project{"DESTDIR"} . "\\" . $project{"TARGETLIB"}; + $project{"TARGETLIB"} =~ s/\\+/\\/g; + } + %all_files = (); + @files = split(/\s+/,$project{"HEADERS"}); + foreach ( @files ) { $all_files{$_} = "h" }; + @files = split(/\s+/,$project{"SOURCES"}); + foreach ( @files ) { $all_files{$_} = "s" }; + 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; + $n =~ s/^.*\\//; + $file_names{$n} = $f; + $file_path{$n} = ".\\" . $f; + $file_path2{$n} = (($f =~ /^\./) ? "" : ".\\") . $f; + } +#$} +# Microsoft Developer Studio Project File - #$ Substitute('Name="$$TARGET" - Package Owner=<4>'); +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE #$ Substitute('"$$VC_PROJ_TYPE" $$VC_PROJ_CODE'); + +CFG=#$ Substitute('$$TARGET - Win32 Debug'); +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "#$ ExpandGlue('MAKEFILE','','','".'); +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f #$ Substitute('"$$MAKEFILE" CFG="$$TARGET - Win32 Debug"'); +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE #$ Substitute('"$$TARGET - Win32 Release" (based on "$$VC_PROJ_TYPE")'); +!MESSAGE #$ Substitute('"$$TARGET - Win32 Debug" (based on "$$VC_PROJ_TYPE")'); +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe + +!IF "$(CFG)" == #$ Substitute('"$$TARGET - Win32 Release"'); + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP #$ Expand("VC_BASE_CPP_RELEASE"); +# ADD CPP #$ Expand("VC_CPP_RELEASE"); +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo #$ Project("TARGETLIB") && Substitute('/out:"$$TARGETLIB"'); + +!ELSEIF "$(CFG)" == #$ Substitute('"$$TARGET - Win32 Debug"'); + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP #$ Expand("VC_BASE_CPP_DEBUG"); +# ADD CPP #$ Expand("VC_CPP_DEBUG"); +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo #$ Project("TARGETLIB") && Substitute('/out:"$$TARGETLIB"'); + +!ENDIF + +# Begin Target + +# Name #$Substitute('"$$TARGET - Win32 Release"'); +# Name #$Substitute('"$$TARGET - Win32 Debug"'); +#${ + foreach $n ( sort keys %file_names ) { + $f = $file_names{$n}; + $p = $file_path{$n}; + $p2 = $file_path2{$n}; + $t = $all_files{$f}; + if ( ($t eq "h") && $moc_output{$f} ) { + my($build); + $build = "\n\n# Begin Custom Build - Running moc...\nInputPath=" . $p2 . "\n\n" + . '"' . $moc_output{$f} . '" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"' + . "\n\tmoc $p2 -o " . $moc_output{$f} . "\n\n" + . "# End Custom Build\n\n"; + $text .= ("# Begin Source File\n\nSOURCE=$p\n\n" + . '!IF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Release"' + . $build); + $text .= ('!ELSEIF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Debug"' + . $build + . "!ENDIF \n\n# End Source File\n"); + } elsif ( $t eq "i" ) { + my($build,$dn); + $build = "\n\n# Begin Custom Build - Running moc...\nInputPath=" . $p2 . "\n\n" + . '"' . $f . '" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"' + . "\n\tmoc ". $moc_input{$f} . " -o $f\n\n" + . "# End Custom Build\n\n"; + $dn = $n; + $dn =~ s/\..*//; + $dn =~ tr/a-z/A-Z/; + $text .= ("# Begin Source File\n\nSOURCE=$p\n" + . "USERDEP__$dn=" . '"' . $moc_input{$f} . '"' . "\n\n" + . '!IF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Release"' + . $build); + $text .= ('!ELSEIF "$(CFG)" == "' . $project{"TARGET"} . ' - Win32 Debug"' + . $build + . "!ENDIF \n\n# End Source File\n"); + } elsif ( $t eq "s" || $t eq "m" || $t eq "h" ) { + $text .= "# Begin Source File\n\nSOURCE=$p\n# End Source File\n"; + } + } + chop $text; +#$} +# End Target +# End Project |