GNU autotools (Autoconf, Automake and co) are needed to build this program.

If the "configure" script is not present, generate it:
	$ autoreconf

If a directory for the target platform is not present, then create it:
	$ mkdir obj/[target-platform]

If the "Makefile" file is not included, generate it:
	$ cd obj/[target-platform]
	$ ../../configure

If making a standalone compiler, be sure to specify the --enable-standalone option
	$ cd obj/[target-platform]
	$ ../../configure --enable-standalone

After that, build and install the library:
	$ cd obj/[target-platform]
	$ make
	$ make install



CONFIGURE OPTIONS:

When configuring the build process (with ../../configure) there are a few
options that can be specified to change behavior and capabilities of the
fbc compiler.

INSTALLATION TO ABSOLUTE PREFIX

--prefix=/path

By default the compiler will be configured for a specific installation
directory.  If the --prefix option is not given, the installation prefix will
default to /usr/local.  Use --prefix=/path to specify a different installation
prefix.

fbc installed to "$prefix/bin/fbc"
headers located in "$prefix/include/freebasic"
libraries located in "$prefix/lib/freebasic/<target>"
binaries located in "$prefix/bin/freebasic/<target>"


STANDALONE COMPILER

--enable-standalone

An alternative to configuring the compiler for installation at an absolute
location is to create a "standalone" compiler.  fbc will search for needed
files relative to where fbc is located.  (This is how fbc 0.18.3 and earlier
operated).  The directories searched are same as the FreeBASIC developement
tree:

fbc located at the "top" of the tree
headers located in "./inc"
libraries located in "./lib/<target>"
binaries located in "./bin/<target>"

If the compiler is configured with --enable-standalone then the --prefix
option will be ignored.


ENABLE CROSS COMPILATION TARGETS

Specify one or more of the following options to enable cross compile targets:

	--enable-crosscomp-cygwin
	--enable-crosscomp-darwin
	--enable-crosscomp-dos
	--enable-crosscomp-freebsd
	--enable-crosscomp-linux
	--enable-crosscomp-netbsd
	--enable-crosscomp-openbsd
	--enable-crosscomp-win32
	--enable-crosscomp-xbox

By default, fbc is not configured with cross compiling capabilities, although
binary distributions of FreeBASIC may have been made with one or more of
the cross compilation targets enabled.  Each cross compilation target must
be explicitly enabled at configure time.  FreeBASIC distributions do not
include cross compilation binaries (AS, LD, AR, etc).  The only exception
is when cross compiling windows to DOS target, the FreeBASIC-dos binary
package can be used as cross compile tool set for windows to dos.

For development and debugging specify the following option to enable all
cross compile targets:

	--enable-crosscomp-all

NOTE: some cross compilation targets are works in progress and may be
incomplete and/or non-functional.  If you try one of the targets and
notice problems, please report them to the development team.


THE OBJINFO FEATURE

Specify the following option to disable the feature:

	--disable-objinfo

By default, fbc is compiled with OBJINFO support.  This feature allows
fbc to write some extra information to object files (.o) and libraries (.a)
that can be reused later at link time.  This extra information lets fbc
know later at link time which command line options were used when compiling
(for example, -mt, -lang) and the names of dependent libraries. This feature
depends on compatibility between binutils, gdb, BFD, iberty and the bfd.bi
header in ./inc.  It may be necessary to disable this feature to debug and/or
use fbc with a broader range of binutils, debuggers, and platforms.

There are a few makefile options to specify how fbc handles the BFD interface.
( Note: they are ignored if --disable-objinfo was given during the 
configuration step. )

By default, fbc will compile a special fb-to-c bridge module named 
c-objinfo.c. This very thin wrapper around some BFD library calls will try to 
include the system's bfd.h header and link with whatever BFD library is 
installed. To use fb's own bfd.bi headers (and not bfd.h or c-objinfo.c) 
specify the following option:

	FB_BFD=1

If FB_BFD=1 was passed to make, fbc will default to using a bfd.bi header for 
binutils 2.17.  To specify an alternate binutils version, pass the following 
option to the makefile where 'nnn' is the binutils version number (e.g. 216, 
217, 218, ... )

	BFD_VER=nnn

Take care when linking to the BFD library.  Newer versions are licensed under 
GNU GPL version 3 (or later) and can not be legally combined with FreeBASIC's 
compiler source which is licensed under GNU GPL version 2 (or later).  
Statically linking to libbfd.a will likely require that it be no greater than
version 2.17.  However, there are no known licensing conflicts if the 
FreeBASIC compiler is linked to a shared version of the BFD library.
