2001-02-24 06:58:54 +00:00
|
|
|
.\" hey, Emacs: -*- nroff -*-
|
|
|
|
.\" qfcc is free software; you can redistribute it and/or modify
|
|
|
|
.\" it under the terms of the GNU General Public License as published by
|
|
|
|
.\" the Free Software Foundation; either version 2 of the License, or
|
|
|
|
.\" (at your option) any later version.
|
|
|
|
.\"
|
|
|
|
.\" This program is distributed in the hope that it will be useful,
|
|
|
|
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2002-01-05 18:46:05 +00:00
|
|
|
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
.\"
|
|
|
|
.\" See the GNU General Public License for more details.
|
2001-02-24 06:58:54 +00:00
|
|
|
.\"
|
|
|
|
.\" You should have received a copy of the GNU General Public License
|
2002-01-05 18:46:05 +00:00
|
|
|
.\" along with this program; see the file COPYING. If not, write to:
|
2001-02-24 06:58:54 +00:00
|
|
|
.\"
|
2002-01-05 18:46:05 +00:00
|
|
|
.\" Free Software Foundation, Inc.
|
|
|
|
.\" 59 Temple Place, Suite 330
|
|
|
|
.\" Boston, MA 02111-1307, USA
|
2001-02-24 06:58:54 +00:00
|
|
|
.\"
|
|
|
|
.\" Some roff macros, for reference:
|
|
|
|
.\" .nh disable hyphenation
|
|
|
|
.\" .hy enable hyphenation
|
|
|
|
.\" .ad l left justify
|
|
|
|
.\" .ad b justify to both left and right margins (default)
|
|
|
|
.\" .nf disable filling
|
|
|
|
.\" .fi enable filling
|
|
|
|
.\" .br insert line break
|
|
|
|
.\" .sp <n> insert n+1 empty lines
|
|
|
|
.\" for manpage-specific macros, see man(7)
|
2002-01-05 18:46:05 +00:00
|
|
|
.\"
|
|
|
|
.TH QFCC 1 "14 December, 2001" QuakeForge "QuakeForge Developer's Manual"
|
|
|
|
.\" Please update the above date whenever this man page is modified.
|
2001-02-24 06:58:54 +00:00
|
|
|
.SH NAME
|
|
|
|
qfcc \- The QuakeForge Code Compiler
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B qfcc
|
|
|
|
.RI [ options ]
|
2003-05-15 18:53:45 +00:00
|
|
|
.RI [ files ]
|
2001-02-24 06:58:54 +00:00
|
|
|
.SH DESCRIPTION
|
2003-05-15 21:18:51 +00:00
|
|
|
\fBqfcc\fP compiles Ruamoko source into a form that the QuakeForge engine can
|
2001-02-24 06:58:54 +00:00
|
|
|
understand.
|
|
|
|
.SH OPTIONS
|
2001-08-31 16:43:26 +00:00
|
|
|
\fBqfcc\fP takes the following arguments:
|
2001-02-24 06:58:54 +00:00
|
|
|
.TP
|
2001-08-31 16:43:26 +00:00
|
|
|
.B \-s, \-\-source DIR
|
|
|
|
look for progs.src in DIR instead of the current directory.
|
|
|
|
.TP
|
2001-10-26 23:55:42 +00:00
|
|
|
.B \-q, \-\-quiet
|
2001-08-31 16:43:26 +00:00
|
|
|
Inhibit some of qfcc's normal output.
|
|
|
|
.TP
|
2001-10-26 23:55:42 +00:00
|
|
|
.B \-v, \-\-verbose
|
|
|
|
Display more output than usual.
|
2001-08-31 16:43:26 +00:00
|
|
|
.TP
|
2003-05-15 18:53:45 +00:00
|
|
|
.B \-g
|
|
|
|
Generate debugging info. Synonym for \fB\-\-code debug\fP.
|
|
|
|
.TP
|
|
|
|
.B \-o, \-\0output\-file FILE
|
2003-05-15 21:18:51 +00:00
|
|
|
Specify output file name.
|
2003-05-15 18:53:45 +00:00
|
|
|
.TP
|
|
|
|
.B \-P, \-\-progs\-src FILE
|
|
|
|
File to use instead of progs.src
|
|
|
|
.TP
|
|
|
|
.B \-F, \-\-files
|
|
|
|
Generate files.dat. This list is created by checking the parameters to the
|
|
|
|
precache_* functions.
|
|
|
|
.TP
|
|
|
|
.B \-t, \-\-traditional
|
|
|
|
Use traditional QuakeC syntax, semantics and "bugs". Also implies v6only.
|
|
|
|
.TP
|
|
|
|
.B \-p, \-\-strip\-path NUM
|
|
|
|
Strip NUM leading path elements from file names. eg. -p 3 will strip the
|
|
|
|
../../.. from ../../../src/foo.r when embedding the source file name in the
|
|
|
|
output code.
|
|
|
|
.TP
|
|
|
|
.B \-C, \-\-code OPTION,...
|
2001-10-27 02:20:39 +00:00
|
|
|
Set code generation options. See \fBCODE GENERATION OPTIONS\fP for details.
|
2001-08-31 16:43:26 +00:00
|
|
|
.TP
|
2003-05-15 18:53:45 +00:00
|
|
|
.B \-W, \-\-warn OPTION,...
|
2001-10-27 02:20:39 +00:00
|
|
|
Set warning options. See \fBWARNING OPTIONS\fP for details.
|
|
|
|
.TP
|
2003-05-15 18:53:45 +00:00
|
|
|
.B \-N, \-\-notice OPTION,...
|
|
|
|
Set notice options. See \fBNOTICE OPTIONS\fP for details.
|
2001-02-24 06:58:54 +00:00
|
|
|
.TP
|
|
|
|
.B \-h, \-\-help
|
|
|
|
Show summary of options.
|
|
|
|
.TP
|
|
|
|
.B \-V, \-\-version
|
2001-08-31 16:43:26 +00:00
|
|
|
Show the version of qfcc.
|
2001-10-26 23:55:42 +00:00
|
|
|
.TP
|
2003-05-15 18:53:45 +00:00
|
|
|
.B \-S, \-\-save\-temps
|
|
|
|
Do not delete temporary files.
|
|
|
|
.TP
|
2001-10-26 23:55:42 +00:00
|
|
|
.B \-D, \-\-define SYMBOL[=VAL],...
|
|
|
|
Define symbols for the preprocessor, if it is in use.
|
|
|
|
.TP
|
|
|
|
.B \-I, \-\-include DIR,...
|
|
|
|
Add DIR to the list of directories for the preprocessor to search when looking
|
|
|
|
for include files.
|
|
|
|
.TP
|
|
|
|
.B \-U, \-\-undefine SYMBOL,...
|
|
|
|
Undefine preprocessor symbols, if the preprocessor is in use.
|
2003-05-15 18:53:45 +00:00
|
|
|
.TP
|
|
|
|
.B \-\-cpp CPPSPEC
|
2003-05-15 21:18:51 +00:00
|
|
|
\fBcpp\fP execution command line. See \fBCPP NAME\fP for details.
|
2003-05-15 18:53:45 +00:00
|
|
|
.TP
|
|
|
|
.B \-L DIR
|
|
|
|
Add DIR to the search path used for -l.
|
|
|
|
.TP
|
|
|
|
.B \-l LIB
|
|
|
|
Add libLIB.a to the list of libraries to be used for resolving undefined
|
|
|
|
symbols. \fBqfcc\fP's libraries are really \fBpak\fP files of \fBqfcc\fP
|
|
|
|
object files built using the \fBpak\fP utility.
|
|
|
|
.TP
|
|
|
|
.B \-c
|
|
|
|
Compile only, do not link. Can be used in either progs.src or separate
|
|
|
|
compilation modes.
|
|
|
|
.TP
|
|
|
|
.B \-r
|
2003-05-15 21:18:51 +00:00
|
|
|
Incremental linking. Generate a larger object file from other object files
|
2003-05-15 18:53:45 +00:00
|
|
|
and libraries.
|
|
|
|
.TP
|
|
|
|
.B \-z
|
|
|
|
Compress object files when writing them. This is especially useful when
|
|
|
|
creating libraries, especially if using the object oriented features, but can
|
|
|
|
be quite slow.
|
2001-08-31 16:43:26 +00:00
|
|
|
.SH "CODE GENERATION OPTIONS"
|
2001-10-26 23:55:42 +00:00
|
|
|
Code generation options are processed in the order of their appearance on the
|
|
|
|
command line. Unsupported options are ignored. The following options are
|
|
|
|
supported by \fBqfcc\fP's \fB\-\-code\fP argument:
|
2001-08-31 16:43:26 +00:00
|
|
|
.TP
|
|
|
|
.B cow
|
2002-01-05 18:46:05 +00:00
|
|
|
Allow assignment to initialized globals. In Quake-C and Ruamoko, a global
|
|
|
|
that has been initialized to a value is not a variable, but a named constant.
|
2001-12-14 05:33:00 +00:00
|
|
|
However, \fBqcc\fP never really enforced this. The \fBcow\fP option allows
|
|
|
|
\fBqfcc\fP to gracefully cope with QuakeC source that assigns values to
|
|
|
|
initialized globals in this manner. (also known as "copy on write" \(em never
|
|
|
|
mind the bovine connotations)
|
2001-10-26 23:55:42 +00:00
|
|
|
.TP
|
|
|
|
.B debug
|
|
|
|
Generate debug code for QuakeForge engines. The QuakeForge engine has the
|
|
|
|
ability to load line number info and other debugging information for use in
|
|
|
|
diagnosing progs crashes. This option tells \fBqfcc\fP to generate this
|
|
|
|
information. It is written to a secondary file with the extension "sym" \(em
|
|
|
|
if your output file is "progs.dat", the symbol file will be "progs.sym".
|
2001-08-31 16:43:26 +00:00
|
|
|
.TP
|
|
|
|
.B v6only
|
|
|
|
Restrict the compiler to only version 6 progs (original Quake/QuakeWorld)
|
2002-01-05 18:46:05 +00:00
|
|
|
features. This means that the compiled data file should be able to run on
|
|
|
|
older servers, as long as you have not used any QuakeForge-specific built-in
|
2001-08-31 16:43:26 +00:00
|
|
|
functions. Also disables some of the compiler's features (like integers and
|
|
|
|
string manipulation support).
|
|
|
|
.SH "WARNING OPTIONS"
|
2001-10-26 23:55:42 +00:00
|
|
|
Warning options are processed in the order of their appearance on the command
|
|
|
|
line. Unsupported options are ignored. The following options are supported by
|
|
|
|
\fBqfcc\fP's \fB\-\-warn\fP argument:
|
2001-08-31 16:43:26 +00:00
|
|
|
.TP
|
2001-10-26 23:55:42 +00:00
|
|
|
.B cow
|
|
|
|
Emit a warning when the source assigns a value to a named constant. See the
|
2002-01-05 18:46:05 +00:00
|
|
|
description of the \fBcow\fP code option above for a description of what this
|
|
|
|
means.
|
2001-08-31 16:43:26 +00:00
|
|
|
.TP
|
2002-01-05 18:46:05 +00:00
|
|
|
.B undef\-function
|
2001-08-31 16:43:26 +00:00
|
|
|
Emit a warning when a function is called, but has not yet been defined.
|
|
|
|
.TP
|
2002-01-05 18:46:05 +00:00
|
|
|
.B uninited\-var
|
2001-10-26 23:55:42 +00:00
|
|
|
Emit a warning when a variable is read from that has not been initalized to a
|
|
|
|
value.
|
|
|
|
.TP
|
2002-01-05 18:46:05 +00:00
|
|
|
.B vararg\-integer
|
2001-08-31 16:43:26 +00:00
|
|
|
Emit a warning when a function that takes a variable number of arguments is
|
|
|
|
passed a constant of an integer type.
|
2001-10-26 23:55:42 +00:00
|
|
|
.TP
|
|
|
|
.B error
|
|
|
|
Promote warnings to errors.
|
|
|
|
.PP
|
2002-01-05 18:46:05 +00:00
|
|
|
Any of the above can be prefixed with \fBno\-\fP to negate its meaning. There
|
|
|
|
are also two special options:
|
2001-10-26 23:55:42 +00:00
|
|
|
.TP
|
|
|
|
.B all
|
|
|
|
Turns on all warning options except \fBerror\fP.
|
|
|
|
.TP
|
|
|
|
.B none
|
|
|
|
Turns off all warning options except \fBerror\fP.
|
2003-05-15 18:53:45 +00:00
|
|
|
.SH "NOTICE OPTIONS"
|
|
|
|
Notices are used to flag code constructs that may have changed semantics but
|
|
|
|
shouldn't be treated as warnings. They are also used for internal debugging
|
|
|
|
purposes, so if you see any cryptic notices, please report them as a bug
|
|
|
|
(normal notices will be fairly self explanatory).
|
|
|
|
.TP
|
|
|
|
.B none
|
|
|
|
Silences all notice messages.
|
|
|
|
.TP
|
|
|
|
.B warn
|
|
|
|
Promote notices to warnings. If warnings are being treated as errors, so will
|
|
|
|
notices.
|
|
|
|
.SH "CPP NAME"
|
2003-05-15 21:18:51 +00:00
|
|
|
When preprocessing source files, \fBqfcc\fP calls \fBcpp\fP (the C
|
|
|
|
preprocessor) with a configurable command line. This is useful when wishing
|
|
|
|
to use an alternative preprocessor (though it must be command line compatible
|
|
|
|
with \fBcpp\fP) and when \fBqfcc\fP has been mis-configured to call \fBcpp\fP
|
|
|
|
incorrectly for your operating system. If the latter is the case, please
|
|
|
|
report the details (operating system, detection methods, correct execution
|
|
|
|
specification). The base default execution spec (on most Linux systems) is
|
|
|
|
\fBcpp %d -o %o %i\fP. This spec is similar in concept to a printf string.
|
|
|
|
The name of the program may be either absolute (eg /lib/\fBcpp\fP) or
|
|
|
|
relative as the PATH will be searched. Available substitutions:
|
2003-05-15 18:53:45 +00:00
|
|
|
.TP
|
|
|
|
.B %d
|
2003-05-15 21:18:51 +00:00
|
|
|
Mainly for defines (-D, -U and -I) but %d will be replaced by all \fBcpp\fP
|
|
|
|
options that \fBqfcc\fP will be passing.
|
2003-05-15 18:53:45 +00:00
|
|
|
.TP
|
|
|
|
.B %o
|
|
|
|
This will be replaced by the output file path. Could be either absolute or
|
|
|
|
relative, depending on whether \fBqfcc\fP is deleting temporary files or not.
|
|
|
|
.TP
|
|
|
|
.B %i
|
|
|
|
This will be replaced by the input file path. Generally as given to \fBqfcc\fP.
|
2001-09-26 03:39:44 +00:00
|
|
|
.SH "FAQ"
|
2001-10-26 23:55:42 +00:00
|
|
|
.TP
|
2001-12-14 05:33:00 +00:00
|
|
|
.B Where did the name Ruamoko come from?
|
2002-01-05 18:46:05 +00:00
|
|
|
In Maori mythology, Ruamoko is the youngest child of Ranginui, the
|
|
|
|
Sky\-father, and Papatuanuku, the Earth\-mother. Ruamoko is the god of
|
|
|
|
volcanoes and earthquakes \fB(Quake, get it?)\fP. For more information, see
|
|
|
|
the Web site at <\fBhttp://maori.com/kmst1.htm\fP>.
|
2001-12-14 05:33:00 +00:00
|
|
|
.TP
|
2001-09-26 03:39:44 +00:00
|
|
|
.B qfcc is singing a bad 80s rap song to me. What's going on?
|
|
|
|
"ice ice baby" is QuakeForge-speak for "Internal Compiler Error". It usually
|
|
|
|
means there's a bug in qfcc, so please report it to the team.
|
2001-10-26 23:55:42 +00:00
|
|
|
.TP
|
2001-09-26 03:39:44 +00:00
|
|
|
.B qfcc is mooing at me. What's wrong with you people?
|
2002-01-05 18:46:05 +00:00
|
|
|
The compiler doesn't like being treated like a slab of beef. Seriously, the
|
|
|
|
code you are trying to compile is using constants as if they weren't.
|
|
|
|
Normally, qfcc would just stop and tell the code to sit in the corner for a
|
|
|
|
while, but you told it not to do that by passing the \fBcow\fP option to
|
|
|
|
\fB\-\-code\fP, so it has its revenge by mooing out a warning. Or something
|
|
|
|
like that. To disable the warning, pass \fBno-cow\fP to \fB\-\-warn\fP.
|
2001-08-31 16:43:26 +00:00
|
|
|
.SH "FILES"
|
|
|
|
progs.src
|
2001-02-24 06:58:54 +00:00
|
|
|
.SH "SEE ALSO"
|
2003-05-15 18:53:45 +00:00
|
|
|
.BR quakeforge (1), pak (1)
|
2001-02-24 06:58:54 +00:00
|
|
|
.SH AUTHORS
|
2001-12-14 05:33:00 +00:00
|
|
|
The original \fBqcc\fP program, for compiling the QuakeC language, was written
|
|
|
|
by Id Software, Inc. The members of the QuakeForge Project have modified it to
|
|
|
|
work with a new, but very similar language called \fBRuamoko\fP.
|