diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 1999-12-15 19:25:10 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 1999-12-15 19:25:10 (GMT) |
commit | 322885a8700a209812bf5a94205260c9bef6ac1f (patch) | |
tree | cc1cd70cf5761ddf72ff114c0b65576c3f4c1d2a /tmake/lib/win32-g++ | |
parent | 361bf7915be13b5c74688e33c427aea30641814c (diff) | |
download | Doxygen-322885a8700a209812bf5a94205260c9bef6ac1f.zip Doxygen-322885a8700a209812bf5a94205260c9bef6ac1f.tar.gz Doxygen-322885a8700a209812bf5a94205260c9bef6ac1f.tar.bz2 |
initial version
Diffstat (limited to 'tmake/lib/win32-g++')
-rwxr-xr-x | tmake/lib/win32-g++/app.t | 6 | ||||
-rwxr-xr-x | tmake/lib/win32-g++/generic.t | 226 | ||||
-rwxr-xr-x | tmake/lib/win32-g++/lib.t | 6 | ||||
-rwxr-xr-x | tmake/lib/win32-g++/subdirs.t | 2 | ||||
-rwxr-xr-x | tmake/lib/win32-g++/tmake.conf | 56 |
5 files changed, 296 insertions, 0 deletions
diff --git a/tmake/lib/win32-g++/app.t b/tmake/lib/win32-g++/app.t new file mode 100755 index 0000000..fc4dc2c --- /dev/null +++ b/tmake/lib/win32-g++/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-g++/generic.t b/tmake/lib/win32-g++/generic.t new file mode 100755 index 0000000..253c401 --- /dev/null +++ b/tmake/lib/win32-g++/generic.t @@ -0,0 +1,226 @@ +#! +#! This is a tmake template for building Win32 applications or libraries. +#! +#${ + if ( Config("qt") ) { + if ( $ENV{"QT_DLL"} && !$ENV{"QT_NODLL"} ) { + Project('TMAKE_QT_DLL = 1'); + if ( Project("TARGET") eq "qt" ) { + 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'); + } elsif ( Config("warn_on") ) { + Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_WARN_ON'); + } + if ( Config("debug") ) { + Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_DEBUG'); + Project('TMAKE_LFLAGS += $$TMAKE_LFLAGS_DEBUG'); + } elsif ( Config("release") ) { + Project('TMAKE_CFLAGS += $$TMAKE_CFLAGS_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" ) { + if ( Project("TMAKE_QT_DLL") && !(Project("DEFINES") =~ /QT_NODLL/) ) { + Project('DEFINES *= QT_MAKEDLL'); + } + } else { + if ( Project("TMAKE_QT_DLL") && !(Project("DEFINES") =~ /QT_NODLL/) ) { + Project('DEFINES *= QT_DLL'); + } + Project('TMAKE_LIBS *= $$TMAKE_LIBS_QT'); + if ( (Project("DEFINES") =~ /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"} = ".a"; + } + } + 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; + } + $obj_ext = "o"; + $dir_sep = "/"; + $gnuwin32 = 1; + if ( Config("qt") ) { + $qtdir = $ENV{"QTDIR"}; + $project{"INCPATH"} =~ s/\$\(QTDIR\)/$qtdir/; + $project{"INCPATH"} =~ s/\\/\//g; + $project{"TMAKE_LIBS"} =~ s/\$\(QTDIR\)/$qtdir/; + $project{"TMAKE_LIBS"} =~ s/\\/\//g; + } + if ( Project('DEF_FILE') ) { + Project('TMAKE_LFLAGS *= $$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_LFLAGS *= $$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+\.//; + } + if ( Config("staticlib") ) { + $project{"TARGET"} = $project{"DESTDIR"} . "lib" . $project{"TARGET"} . + $project{"TARGET_EXT"}; + } else { + $project{"TARGET"} = $project{"DESTDIR"} . $project{"TARGET"} . + $project{"TARGET_EXT"}; + } +#$} +#! +# Makefile for building #$ Expand("TARGET") +# Generated by tmake at #$ Now(); +# Project: #$ Expand("PROJECT"); +# Template: #$ Expand("TEMPLATE"); +############################################################################# + +####### Compiler, tools and options + +CC = #$ Expand("TMAKE_CC"); +CFLAGS = #$ Expand("TMAKE_CFLAGS"); 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(); +AR = #$ Expand("TMAKE_AR"); +RANLIB = #$ Expand("TMAKE_RANLIB"); +#$ 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.o: + #$ Expand("TMAKE_COMPILE_IMP"); + +.cxx.o: + #$ Expand("TMAKE_COMPILE_IMP"); + +.cc.o: + #$ Expand("TMAKE_COMPILE_IMP"); + +.c.o: + #$ Expand("TMAKE_COMPILE_IMP"); + +####### Build rules + +all: #$ ExpandGlue("ALL_DEPS",""," "," "); $text .= '$(TARGET)'; + +$(TARGET): $(OBJECTS) $(OBJMOC) #$ Expand("TARGETDEPS"); +#$ Project("TMAKE_APP_OR_DLL") || DisableOutput(); + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) +#$ Project("TMAKE_APP_OR_DLL") || EnableOutput(); +#$ Project("TMAKE_APP_OR_DLL") && DisableOutput(); + -rm -f $(TARGET) + $(AR) $(TARGET) $(OBJECTS) $(OBJMOC) + #$ ExpandGlue("TMAKE_RANLIB","",""," \$(TARGET)"); +#$ Project("TMAKE_APP_OR_DLL") && EnableOutput(); +#$ (Config("dll") && Project("DLLDESTDIR")) || DisableOutput(); + -cp $(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: + -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET) + #$ ExpandGlue("TMAKE_CLEAN","-rm -f "," ",""); + -rm -f *~ core + #$ ExpandGlue("CLEAN_FILES","-rm -f "," ",""); + +####### Compile + +#$ BuildObj(Project("OBJECTS"),Project("SOURCES")); +#$ BuildMocObj(Project("OBJMOC"),Project("SRCMOC")); +#$ BuildMocSrc(Project("HEADERS")); +#$ BuildMocSrc(Project("SOURCES")); diff --git a/tmake/lib/win32-g++/lib.t b/tmake/lib/win32-g++/lib.t new file mode 100755 index 0000000..d8ac6c7 --- /dev/null +++ b/tmake/lib/win32-g++/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-g++/subdirs.t b/tmake/lib/win32-g++/subdirs.t new file mode 100755 index 0000000..8b881ab --- /dev/null +++ b/tmake/lib/win32-g++/subdirs.t @@ -0,0 +1,2 @@ +#! Use the common Win32 template +#$ IncludeTemplate("../win32/subdirs.t"); diff --git a/tmake/lib/win32-g++/tmake.conf b/tmake/lib/win32-g++/tmake.conf new file mode 100755 index 0000000..59667bd --- /dev/null +++ b/tmake/lib/win32-g++/tmake.conf @@ -0,0 +1,56 @@ +# +# $Id$ +# +# tmake configuration for Win32/g++ (Cygnus gnu-win32) +# + +TEMPLATE = app +CONFIG = qt warn_on release + +TMAKE_CC = g++ +TMAKE_CFLAGS = +TMAKE_CFLAGS_WARN_ON = +TMAKE_CFLAGS_WARN_OFF = +TMAKE_CFLAGS_RELEASE = -O +TMAKE_CFLAGS_DEBUG = -g +TMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses + +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_YACC = $$TMAKE_CFLAGS_YACC + +TMAKE_INCDIR = +TMAKE_INCDIR_QT = $(QTDIR)/include + +TMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src +TMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< +TMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src +TMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +TMAKE_LINK = g++ +TMAKE_LFLAGS = +TMAKE_LFLAGS_RELEASE = +TMAKE_LFLAGS_DEBUG = +TMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console +TMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows +TMAKE_LFLAGS_CONSOLE_DLL= -Wl,-subsystem,console +TMAKE_LFLAGS_WINDOWS_DLL= -Wl,-subsystem,windows + +TMAKE_LIBS = +TMAKE_LIBS_CONSOLE = +TMAKE_LIBS_WINDOWS = -luser32 -lgdi32 -lcomdlg32 -lole32 -luuid -lwsock32 +TMAKE_LIBS_QT = -L$(QTDIR)/lib -lqt +TMAKE_LIBS_QT_DLL = -lqtmain +TMAKE_LIBS_QT_OPENGL = -lqgl +TMAKE_LIBS_OPENGL = -lopengl32 + +TMAKE_MOC = moc + +TMAKE_AR = ar cqs +TMAKE_RANLIB = + +TMAKE_ZIP = zip -r -9 |