|
There are a number of options that you can use to control exactly how
Allegro will be compiled. On Unix platforms you do this by passing arguments
to the configure script (run "configure --help" for a list), but on other
platforms you can set the environment variables:
-
DEBUGMODE=1
Selects a debug build, rather than the normal optimised version.
-
PROFILEMODE=1
Selects a profiling build, rather than the normal optimised version.
-
WARNMODE=1
Selects strict compiler warnings. If you are planning to work on Allegro
yourself, rather than just using it in your programs, you should be sure
to have this mode enabled.
-
STATICLINK=1 (MSVC and Mingw32 only)
Link as a static library, rather than the default DLL.
-
TARGET_ARCH_COMPAT=[cpu] (implemented for most GNU platforms)
This option will optimize for the given processor while maintaining
compatibility with older processors.
Example: set TARGET_ARCH_COMPAT=i586
-
TARGET_ARCH_EXCL=[cpu] (implemented for most GNU platforms)
This option will optimize for the given processor. Please note that
using it will cause the code to *NOT* run on older processors.
Example: set TARGET_ARCH_EXCL=i586
-
TARGET_OPTS=[opts] (implemented for most GNU platforms)
This option allows you to customize general compiler optimisations.
-
CROSSCOMPILE=1 (djgpp only)
Allows you to build the djgpp library under Linux, using djgpp as a
cross-compiler.
-
ALLEGRO_USE_C=1 (djgpp only)
Allows you to build the djgpp library using C drawing code instead of the
usual asm routines. This is only really useful for testing, since the asm
version is faster.
If you only want to recompile a specific test program or utility, you can
specify it as an argument to make, eg. "make demo" or "make grabber". The
makefiles also provide some special pseudo-targets:
-
'default'
The normal build process. Compiles the current library version (one of
optimised, debugging, or profiling, selected by the above environment
variables), builds the test and example programs, and converts the
documentation files.
-
'all'
Compiles all three library versions (optimised, debugging, and
profiling), builds the test and example programs, and converts the
documentation files.
-
'lib'
Compiles the current library version (one of optimised, debugging, or
profiling, selected by the above environment variables).
-
'install'
Copies the current library version (one of optimised, debugging, or
profiling, selected by the above environment variables), into your
compiler lib directory, recompiling it as required, and installs the
Allegro headers.
-
'installall'
Copies all three library versions (optimised, debugging, and profiling),
into your compiler lib directory, recompiling them as required, and
installs the Allegro headers.
-
'uninstall'
Removes the Allegro library and headers from your compiler directories.
This requires a Unix-style 'rm' utility to be available, eg. from the GNU
fileutils package.
-
'docs'
Converts the documentation files from the ._tx sources.
-
'docs-dvi' (Unix only)
Creates the allegro.dvi device independent documentation file. This is
not a default target, since you need the texi2dvi tool to create it. The
generated file is especially prepared to be printed on paper.
-
'docs-ps' or 'docs-gzipped-ps' (Unix only)
Creates a Postcript file from the previously generated DVI file. This is
not a default target, since you need the texi2dvi and dvips tools to
create it. The second target compresses the generated Postscript file.
The generated file is especially prepared to be printed on paper.
-
'install-man' or 'install-gzipped-man' (Unix only)
This generates Unix man pages for each Allegro function or variable and
installs them. The second target compresses the manual pages after
installing them.
-
'install-info' or 'install-gzipped-info' (Unix only)
Converts the documentation to Info format and installs it. The second
target compresses the info file after installing it.
-
'clean'
Removes generated object and library files, either to recover disk space
or to force a complete rebuild the next time you run make. This target is
designed so that if you run a "make install" followed by "make clean",
you will still have a functional version of Allegro. This requires a
Unix-style 'rm' utility to be available, eg. from the GNU fileutils
package.
-
'distclean'
Like "make clean", but more so. This removes all the executable files and
HTML format documentation, leaving you with only the same files that are
included when you unzip a new Allegro distribution.
-
'veryclean'
Use with extreme caution! This target deletes absolutely all generated
files, including some that may be non-trivial to recreate. After you run
"make veryclean", a simple rebuild will not work: at the very least you
will have to run "make depend", and perhaps also fixdll.bat if you are
using the Windows library. These targets make use of non-standard tools
like SED, so unless you know what you are doing and have all this stuff
installed, you should not use them.
-
'depend'
Regenerates the dependency files (obj/*/makefile.dep). You need to run
this after "make veryclean", or whenever you add new headers to the
Allegro sources.
-
'compress' (djgpp, Mingw32 and MSVC only)
Uses the DJP or UPX executable compressors (whichever you have installed)
to compress the example executables and utility programs, which can
recover a significant amount of disk space.
|