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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
\A{source} Building NASM from Source
The source code for NASM is available from our website,
\w{https://www.nasm.us/}, see \k{website}.
\H{tarball} Building from a Source Archive
The source archives available on the web site should be capable of
building on a number of platforms. This is the recommended method for
building NASM to support platforms for which executables are not
available, if you do not require changing the source code.
The preferred build platforms are development environments which
support POSIX (Unix)-style tools (a "POSIX environment"). For Windows,
MSYS2 (\w{https://www.msys2.org/}) is such a development environment.
In a POSIX environment, run:
\c sh configure
\c make
A number of options can be passed to \c{configure}; see
\c{sh configure --help}. In particular, the \c{--host} option can be
used to cross-compile NASM to run on another host system.
For non-POSIX environments, a set of Makefiles for some other
environments are also available; please see the file
\c{Mkfiles/README}.
The \c{.zip} version of the source archive has DOS/Windows line
endings (\c{CR LF}), which many POSIX systems will not recognize. To
extract the \c{.zip} version on such a system, use \c{unzip
-a}. The \c{.tar} versions of the source archive has POSIX line
endings (\c{LF}).
\H{buildtools} Optional Build Tools
The following additional tools are required to build specific
subsystems, to build from the \c{git} repository, or if the sources
are modified.
Note that some of these tools will have their own dependencies.
Make sure all tools are available in your \c{PATH} (or equivalent.)
To build the installer for the Windows platform:
\b The \i{Nullsoft Scriptable Installer} (\i{NSIS},
\w{https://nsis-dev.github.io/}).
To modify the sources, \e{or} to build the documentation:
\b A Perl interpreter (\w{https://www.perl.org/}).
\b Modules from CPAN (\w{https://www.cpan.org/}). The following Perl
modules are currently required, some of which will be bundled with the
Perl interpreter or into larger CPAN packages:
\& perlbreq.src
To build the documentation:
\b Either Ghostscript (\w{https://www.ghostscript.com/}) or Adobe
Acrobat Distiller (untested.)
\b The Adobe \e{Source Sans} (or \e{Source Sans 3}) and \e{Source
Code} fonts, which are freely available under the SIL Open Font
License (\w{https://fonts.adobe.com/}).
To build the Unix man pages:
\b AsciiDoc (\w{https://asciidoc.org/}).
\b xmlto (\w{https://pagure.io/xmlto/}).
To build from the \c{git} repository on a POSIX platform:
\b GNU \c{m4}, \c{autoconf} and \c{autoheader}
(\w{https://www.gnu.org/}).
\H{buildopt} Building Optional Components
Install the required tools for the subsystem in question as described
in \k{buildtools}.
To build the documentation:
\c make doc
Building the documentation may not work in a non-POSIX environment.
To build the Windows installer:
\c make nsis
To build the Unix man pages:
\c make manpages
To build everything available on the current platform:
\c make everything
\H{git} Building from the \i\c{git} Repository
The NASM development tree is kept in a source code repository using
the \c{git} distributed source control system. The link is available
on the website. This is recommended only to participate in the
development of NASM or to assist with testing the development code.
Install the required tools as described in section \k{buildtools}.
In a POSIX environment:
Run:
\c sh autogen.sh
to create the \c{configure} script and then build as described in
\k{tarball}.
In a non-POSIX environment, use the tool-specific Makefiles
as described in \k{tarball}.
\H{modifysrc} Modifying the Sources
To build modified sources, you will need the tools described in
\k{buildtools}.
Some build system changes might not be possible without a POSIX
environment.
If you have modified the sources to change the embedded declarations
of warning classes, you may have to manually re-build the warning
catalog:
\c make warnings
This is not done automatically, as the tools do not have the ability
to automatically detect when it is necessary to do so.
|