blob: d184982fd49e5572b86a38239259da0f7e420a1b [file] [log] [blame]
H. Peter Anvina396a182008-06-28 18:53:55 -070011. Installing NASM from source (Unix, MacOS X; Windows - Cygwin;
2 Windows - MinGW; DOS - DJGPP)
32. Installing NASM from source (Windows - MS Visual C++)
43. Installing NASM from source (DOS, Windows, OS/2 - OpenWatcom)
H. Peter Anvin8ac36412002-04-30 21:09:12 +00005
H. Peter Anvin8ac36412002-04-30 21:09:12 +00006
H. Peter Anvina396a182008-06-28 18:53:55 -070071. Installing NASM from source (Unix, MacOS X; Windows - Cygwin;
8 Windows - MinGW; DOS - DJGPP)
9================================================================
H. Peter Anvinb9957462007-09-16 22:27:07 -070010
H. Peter Anvin212f67d2007-11-28 10:41:55 -080011Installing NASM is pretty straightforward on Unix or Unix-like systems
H. Peter Anvina396a182008-06-28 18:53:55 -070012with a C compiler, Make, and standard shell tools installed, including
13MinGW for Windows (with MSYS installed) and DJGPP for DOS with the
14appropriate tools. Perl is not required for compiling unmodified
15sources from a tarball, but is required to build from git or for most
16source modifications.
H. Peter Anvinb9957462007-09-16 22:27:07 -070017
18If you checked out source from git you will need to run autoconf to
H. Peter Anvin79e2d9f2003-08-29 19:05:39 +000019generate configure, otherwise you don't have to.
H. Peter Anvin8ac36412002-04-30 21:09:12 +000020
H. Peter Anvina396a182008-06-28 18:53:55 -070021$ sh autogen.sh
H. Peter Anvin8ac36412002-04-30 21:09:12 +000022
23Then run configure to detect your platform settings and generate makefiles.
24
H. Peter Anvina396a182008-06-28 18:53:55 -070025$ sh configure
H. Peter Anvin8ac36412002-04-30 21:09:12 +000026
H. Peter Anvin79e2d9f2003-08-29 19:05:39 +000027You can get information about available configuration options by
H. Peter Anvina396a182008-06-28 18:53:55 -070028running `sh configure --help`.
H. Peter Anvin8ac36412002-04-30 21:09:12 +000029
H. Peter Anvin212f67d2007-11-28 10:41:55 -080030If configure fails, please file a bug report with detailed platform
31information at:
32
33 http://www.sf.net/projects/nasm/
H. Peter Anvin8ac36412002-04-30 21:09:12 +000034
35If everything went okay, type
36
37$ make
38
H. Peter Anvin212f67d2007-11-28 10:41:55 -080039to build NASM, ndisasm and rdoff tools, or
H. Peter Anvin8ac36412002-04-30 21:09:12 +000040
41$ make everything
42
43to build the former plus the docs.
44
H. Peter Anvin79e2d9f2003-08-29 19:05:39 +000045You can decrease the size of produces executables by stripping off
46unnecessary information, to achieve this run
H. Peter Anvin8ac36412002-04-30 21:09:12 +000047
48$ make strip
49
H. Peter Anvin79e2d9f2003-08-29 19:05:39 +000050If you install to a system-wide location you might need to become
51root:
52
53$ su <enter root password>
H. Peter Anvin8ac36412002-04-30 21:09:12 +000054
55then
56
57$ make install
58
59optionally followed by
60
61$ make install_rdf
62
63Or you can
64
65$ make install_everything
66
67to install everything =)
68
69
70Thats it, enjoy!
71
H. Peter Anvin8ac36412002-04-30 21:09:12 +000072
H. Peter Anvina396a182008-06-28 18:53:55 -0700732. Installing NASM from source (Windows - MS Visual C++)
74========================================================
H. Peter Anvinb9957462007-09-16 22:27:07 -070075
76The recommended compiler for NASM on Windows is MinGW
H. Peter Anvina396a182008-06-28 18:53:55 -070077(http://www.mingw.org/), but it is also possible to compile with
H. Peter Anvinb9957462007-09-16 22:27:07 -070078Microsoft Visual C++ (tested with Visual C++ 2005 Express Edition.)
79
80To do so, start the "Visual C++ Command Shell", go to the directory
81where the NASM source code was extracted, and run:
82
83> nmake /f Mkfiles/msvc.mak
84
85We recommend MinGW over Visual C++ 2005 as we have found it to be more
86up to date with regards to C99 compliance, and we are increasingly
87using C99 features in NASM.
H. Peter Anvin212f67d2007-11-28 10:41:55 -080088
89
H. Peter Anvina396a182008-06-28 18:53:55 -0700903. Installing NASM from source (DOS, Windows, OS/2 - OpenWatcom)
91================================================================
H. Peter Anvin212f67d2007-11-28 10:41:55 -080092
H. Peter Anvina396a182008-06-28 18:53:55 -070093NASM has been reported to build correctly with OpenWatcom 1.7 on the
94Windows and OS/2 platforms. In addition, it *should* work under DOS
95with the DOS4GW DOS extender, although the NASM developers recommend
96using DJGPP with the CWSDPMI DOS extender instead.
H. Peter Anvin212f67d2007-11-28 10:41:55 -080097
98A WMAKE make file is provided:
99
100> wmake -f Mkfiles\openwcom.mak <platform>
101
102... where <platform> is "dos", "win32" or "os2".