Example:
CLEAN_FILES = core *~
These options control the compilation flags:
release | Compile with optimization enabled, ignored if "debug" is specified. | ||
debug | Compile with debug options enabled. | ||
warn_on | The compiler should emit more warnings than normally, ignored if "warn_off" is specified. | ||
warn_off | The compiler should emit no warnings or as few as possible. |
These options defines the application/library type:
qt | The target is a Qt application/library and requires Qt header files/library. | ||
opengl | The target requires the OpenGL (or Mesa) headers/libraries. | ||
x11 | The target is a X11 application (app.t only). | ||
windows | The target is a Win32 window application (app.t only). | ||
console | The target is a Win32 console application (app.t only). | ||
dll | The target is a shared object/DLL (app.t only). | ||
staticlib | The target is a static library (lib.t only). |
DESTDIR = ../../libYou must create this directory before running make.
INCLUDEPATH
. The ';' or ':'
separators have been replaced by ' ' (single space). This makes it
easier to split. qtapp.t and other templates expand
INCPATH
to set -I options for the C++ compiler.
Example:
INCLUDEPATH = c:\msdev\include d:\stl\includeUse ';' or space as the directory separator.
Example:
unix:LIBS = -lXext -lm win32:LIBS = ole32.lib
Example:
MOC_DIR = tmpYou must create this directory before running make.
See also: OBJECTS_DIR.
SOURCES
by the StdInit() function.
The extension of each source file has been replaced by .o (Unix) or .obj
(Win32).Example:
SOURCES = a.x b.yThen
OBJECTS
become "a.o b.o" on Unix and "a.obj b.obj" on
Win32.
Example:
OBJECTS_DIR = tmpYou must create this directory before running make.
See also: MOC_DIR.
$moc_aware
is true. OBJMOC
contains the name of
all intermediate moc object files.Example:
HEADERS = demo.h SOURCES = demo.cpp main.cppIf demo.h and main.cpp define classes that use signals and slots (i.e. the
Q_OBJECT
"keyword" is found in these two
files), OBJMOC
becomes:OBJMOC = moc_demo.objSee also: SRCMOC.
CONFIG
contains "qt". SRCMOC
contains the name of
all intermediate moc files.Example:
HEADERS = demo.h SOURCES = demo.cpp main.cppIf demo.h and main.cpp define classes that use signals and slots (i.e. the
Q_OBJECT
"keyword" is found in these two
files), SRCMOC
becomes:SRCMOC = moc_demo.cpp main.mocSee also: OBJMOC.
Example:
#$ AddIncludePath('$QTDIR/include;/local/include');
Example:
#$ BuildMocObj($project{"OBJMOC"},$project{"SRCMOC"});Output:
moc_hello.o: moc_hello.cpp \ hello.h \ ...
Example:
#$ BuildMocSrc($project{"HEADERS"}); #$ BuildMocSrc($project{"SOURCES"});Output:
moc_hello.cpp: hello.h $(MOC) hello.h -o moc_hello.cpp
Example:
#$ BuildObj($project{"OBJECTS"},$project{"SOURCES"});Output:
hello.o: hello.cpp \ hello.h \ ... main.o: main.cpp \ hello.h \ ...
CONFIG
variable contains the given string.
Example:
#$ if ( Config("release") { }
Example:
#$ Config("debug") && DisableOutput(); Anything here is skipped if CONFIG contains "debug". #$ Config("debug") && EnableOutput();
$text = $project{$var}
.
Example:
VERSION = #$ Expand("VERSION");Output:
VERSION = 1.1
Example:
clear: #$ ExpandGlue("OBJECTS","-del","\n\t-del ","");Output (Windows NT):
clear: -del hello.obj -del main.obj
ExpandGlue($var,""," \\\n\t\t","")
.Example:
OBJECTS = #$ ExpandList("OBJECTS");Output:
OBJECTS = hello.o \ main.o
Example:
#$ IncludeTemplate("mytemplate");
Example:
# Generated at #$ Now()Output:
# Generated at 12:58, 1996/11/19
Examples:
# Get a project variable: $s = Project("TEMPLATE"); -> $s = "TEMPLATE" # Set a project variable: Project("TEMPLATE = lib"); -> TEMPLATE = lib Project("CONFIG =";) -> CONFIG empty # Append to a project variable: Project("CONFIG = qt"); -> CONFIG = qt Project("CONFIG += debug"); -> CONFIG = qt debug # Append to a project variable if it does not contain the value already: Project("CONFIG = qt release"); -> CONFIG = qt release Project("CONFIG *= qt"); -> CONFIG = qt release Project("CONFIG *= opengl"); -> CONFIG = qt release opengl # Subtract from a project variable: Project("THINGS = abc xyz"); -> THINGS = abc xyz Project("THINGS -= abc"); -> THINGS = xyz # Search/replace on a project variable: Project("CONFIG = tq opengl"); -> CONFIG = tq opengl Project("CONFIG /= s/tq/qt/"); -> CONFIG = qt opengl # The operations can be performed on several project variables at a time. Project("TEMPLATE = app", "CONFIG *= opengl", "THINGS += klm");
%project
array.
This function creates some new project variables:
OBJECTS
- Object files corresponding to
SOURCES
.
SRCMOC
- moc source files.
OBJMOC
- moc object files.
CONFIG
contains "qt"
Important: Use single quotes around the string, otherwise perl will expand any $vars it finds.
Example:
Substitute('Project name: $$PROJECT, uses template $$TEMPLATE');