-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.doc
More file actions
39 lines (31 loc) · 2.04 KB
/
compile.doc
File metadata and controls
39 lines (31 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
This document describes how to compile Super ZZ Zero. You may run the
"compile.sh" program, which will try to figure out some details of the
system automatically and ask questions as required; alternatively, you
may use the instructions below, for more control over it.
Write the C compiler flags into the file called "cflags", e.g. "-s -O2"
for release or "-g -O0" for debug. Other flags may also be specified;
all C files that need to be compiled will use these flags. You may use
other flags as well (e.g. "-march" and "-mtune"). The -DCONFIG_ flags
explained below can also be used to configure some functions.
The program called "maker" will execute the build system. The file called
"main.mak" specifies the dependencies and the instructions for compiling
each file; some of these instructions are within the source files themself
and are called by the main.mak file.
Normally, the executable file will be ~/bin/superzz0 but you can modify
main.c in order to change this if you wish. (You will need to create the
directory ~/bin if it does not exist; it doesn't do this automatically.)
Note that the documentation file opcodes.doc is also used for compiling
asm.c and game.c, so it is not only for documentation. The lines starting
with a left square bracket define the opcode names.
The main.mak file is only for the Super ZZ Zero game engine itself, and
the sz0version program for handling version numbers. For assembler (asm.c)
must be compiled separately. The programs for handling the catalog service
are not written yet, but they will also be compiled separately.
In display.c you can add some preprocessor definitions to control the
compilation (they can be used in other files as well, although they are
ineffective in other files):
CONFIG_DISABLE_FRONT = Disables the "front" mode with external programs.
CONFIG_DISABLE_X11_FUNCTIONS = Disables all uses of X11 functions.
CONFIG_USE_DEPRECATED_X11_FUNCTION = Use XKeycodeToKeysym function.
(In future, more preprocessor definitions to control compilation might
also be defined, and will also be documented here.)