@#
@# This is the source for the Makefile targets, in a weird custom
@# format. Read makedoc.c for a description of what is going on...
@#
@external-css=allegro.css
@document_title=Makefile targets
<center><h1><b>
Makefile targets
</b></h1></center>
<hr>

@text

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 following environment variables:
<ul><li>
   DEBUGMODE=1<br>
   Selects a debug build, rather than the normal optimised version.
<li>
   DEBUGMODE=2<br>
   Selects a build intended to debug Allegro itself, rather than the
   normal optimised version.
<li>
   PROFILEMODE=1<br>
   Selects a profiling build, rather than the normal optimised version.
<li>
   WARNMODE=1<br>
   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.
<li>
   STATICLINK=1 (MinGW, MSVC, BeOS, MacOS X only)<br>
   Link as a static library, rather than the default dynamic library.
<li>
   STATICRUNTIME=1 (MSVC only)<br>
   Link against static runtime libraries, rather than the default dynamic
   runtime libraries.
<li>
   TARGET_ARCH_COMPAT=[cpu] (GCC-based platforms only)<br>
   This option will optimize for the given processor while maintaining
   compatibility with older processors.
   Example: set TARGET_ARCH_COMPAT=i586
<li>
   TARGET_ARCH_EXCL=[cpu] (GCC-based platforms only)<br>
   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
<li>
   TARGET_OPTS=[opts] (GCC-based platforms only)<br>
   This option allows you to customize general compiler optimisations.
<li>
   TARGET_ARCH_EXCL=[opts] (MSVC only)<br>
   This option allows you to optimize exclusively for a given architecture.
   Pass B to optimize for a PentiumPro or 7 to optimize for Pentium 4. Note
   that the options you can pass may be different between MSVC 6 and 7.
   Example: set TARGET_ARCH_EXCL=7
<li>
   CROSSCOMPILE=1 (DJGPP, MinGW only)<br>
   Allows you to build the library under Linux by using a cross-compiler.
<li>
   UNIX_TOOLS=1<br>
   Instructs the build process to use Unix-like tools instead of DOS tools.
   Note that you usually don't need to set it because the build process will
   try to autodetect this configuration.
<li>
   COMPILER_MSVC7=1 (MSVC only)<br>
   Enables special optimizations for MSVC 7 (the default is MSVC 6). You don't
   normally need to set this flag since <i>fix.bat msvc7</i> should do the same
   thing and is the preferred way of doing this.
<li>
   COMPILER_ICL=1 (MSVC only)<br>
   Instructs the build process to use the Intel command line compiler icl rather
   than Microsoft's command line compiler cl. You don't normally need to pass 
   this flag since <i>fix.bat icl</i> should do the same thing and is the 
   preferred way of doing this. Do not try COMPILER_MSVC7=1 and COMPILER_ICL=1
   at the same time.
</ul>

Here is the list of options which enable building of the specific addon library:
<ul><li>
   WITH_ALLEGRO_GL=1 (MSVC, DJGPP, MinGW, DMC, MacOS X)<br>
   Enables building of AllegroGL addon library.
<li>
   WITH_LOADPNG=1 (DJGPP, MinGW, MSVC, MacOS X)<br>
   Enables building of loadpng addon library.
<li>
   WITH_JPGALLEG=1 (BeOS, MSVC, DJGPP, MinGW, MacOS X)<br>
   Enables building of JPGalleg addon library.
<li>
   WITH_LOGG=1 (MinGW, MSVC, MacOS X)<br>
   Enables building of logg addon library.
<li>
   WITH_ALL_ADDONS=1
   Shortcut to enable all above addons.
</ul>

If you only want to recompile a specific test program or utility, you can 
specify it as an argument to make, eg. "make shooter" or "make grabber". The 
makefiles also provide some special pseudo-targets:
<ul><li>
   'info' (Unix only)<br>
   Tells you which options this particular build of Allegro will use.
   Especially useful to verify that the required libraries were detected
   and you won't get a 'half-featured' Allegro.
<li>
   'default'<br>
   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.
<li>
   'all' (non-Unix only)<br>
   Compiles all three library versions (optimised, debugging, and 
   profiling), builds the test and example programs, and converts the 
   documentation files.
<li>
   'lib'<br>
   Compiles the current library version (one of optimised, debugging, or 
   profiling, selected by the above environment variables).
<li>
   'modules' (Unix only)<br>
    This will compile all the modules currently configured. The 'lib' and
    'modules' targets together are needed to build a working copy of the
    library, without documentation or programs.
<li>
   'install'<br>
   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.
<li>
   'install-lib' (Unix only)<br>
   You can use this to install the library and the modules only, without
   documentation or programs.  Use the 'install' target to install
   everything.
<li>
   'installall' (non-Unix only)<br>
   Copies all three library versions (optimised, debugging, and profiling), 
   into your compiler lib directory, recompiling them as required, and 
   installs the Allegro headers.
<li>
   'uninstall'<br>
   Removes the Allegro library and headers from your compiler directories. 
<li>
   'docs'<br>
   Converts the documentation files from the ._tx sources.
<li>
   'chm-docs' (Windows only)<br>
   Creates a compiled HTML file from the previously generated html output.
   This is not a default target, since you need Microsoft's HTML compiler
   (<link>http://go.microsoft.com/fwlink/?LinkId=14188</a>),
   and it has to be installed somewhere in your PATH. Also, this only works
   if you use '@multiplefiles' (see the top of docs/src/allegro._tx).
<li>
   'docs-dvi' (Unix only)<br>
   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.
<li>
   'docs-ps' or 'docs-gzipped-ps' or 'docs-bzipped-ps' (Unix only)<br>
   Creates a PostScript 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 and third targets compress the generated Postscript
   file. The generated file is especially prepared to be printed on paper.
<li>
   'docs-pdf' (Unix only)<br>
   Creates a PDF file. This is not a default target, since you need the
   texi2pdf tool to create it. The generated file is especially prepared to
   be printed on paper, and it also has hyperlinks.
<li>
   'docs-devhelp' (Unix only)<br>
   Creates normal HTML documentation with an additional xml index file which
   can be used by tools like Devhelp (<link>http://www.devhelp.net/</a>) to
   show context sensitive help within any editor using Devhelp, like for
   example <link>http://anjuta.sourceforge.net/</a>. The Allegro 'book' will be
   created in `docs/devhelp/allegro.devhelp', you have to install it
   manually.
<li>
   'install-man' (Unix and Mac OS X only)<br>
   Generates Unix man pages for each Allegro function or variable and
   installs them.
<li>
   'install-gzipped-man' or 'install-bzipped-man' (Unix only)<br>
   Like install-man, but also compresses the manual pages after installing
   them (run only one of these).
<li>
   'uninstall-man' (Unix)<br>
   Uninstalls any man pages previously installed with 'install-man',
   'install-gzipped-man', or 'install-bzipped-man'.
<li>
   'install-info' or 'install-gzipped-info' or 'install-bzipped-info'
   (Unix only)<br>
   Converts the documentation to Info format and installs it. The second
   and third targets compress the info file after installing it (run only
   one of them).
<li>
   'uninstall-info' (Unix only)<br>
   Uninstalls any man pages previously installed with 'install-info',
   'install-gzipped-info', or 'install-bzipped-info'.
<li>
   'clean'<br>
   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.
<li>
   'distclean'<br>
   Like "make clean", but more so. This removes all the executable files and 
   the documentation, leaving you with only the same files that are included
   when you unzip a new Allegro distribution.
<li>
   'veryclean'<br>
   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.
<li>
   'compress' (DJGPP, MinGW and MSVC only)<br>
   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.
<li>
   'depend'<br>
   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.
</ul>
