H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 1 | 1. Installing NASM from source (Unix, MacOS X; Windows - Cygwin; |
| 2 | Windows - MinGW; DOS - DJGPP) |
| 3 | 2. Installing NASM from source (Windows - MS Visual C++) |
| 4 | 3. Installing NASM from source (DOS, Windows, OS/2 - OpenWatcom) |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 5 | |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 6 | |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 7 | 1. Installing NASM from source (Unix, MacOS X; Windows - Cygwin; |
| 8 | Windows - MinGW; DOS - DJGPP) |
| 9 | ================================================================ |
H. Peter Anvin | b995746 | 2007-09-16 22:27:07 -0700 | [diff] [blame] | 10 | |
H. Peter Anvin | 212f67d | 2007-11-28 10:41:55 -0800 | [diff] [blame] | 11 | Installing NASM is pretty straightforward on Unix or Unix-like systems |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 12 | with a C compiler, Make, and standard shell tools installed, including |
| 13 | MinGW for Windows (with MSYS installed) and DJGPP for DOS with the |
| 14 | appropriate tools. Perl is not required for compiling unmodified |
| 15 | sources from a tarball, but is required to build from git or for most |
| 16 | source modifications. |
H. Peter Anvin | b995746 | 2007-09-16 22:27:07 -0700 | [diff] [blame] | 17 | |
| 18 | If you checked out source from git you will need to run autoconf to |
H. Peter Anvin | 79e2d9f | 2003-08-29 19:05:39 +0000 | [diff] [blame] | 19 | generate configure, otherwise you don't have to. |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 20 | |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 21 | $ sh autogen.sh |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 22 | |
| 23 | Then run configure to detect your platform settings and generate makefiles. |
| 24 | |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 25 | $ sh configure |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 26 | |
H. Peter Anvin | 79e2d9f | 2003-08-29 19:05:39 +0000 | [diff] [blame] | 27 | You can get information about available configuration options by |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 28 | running `sh configure --help`. |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 29 | |
H. Peter Anvin | 212f67d | 2007-11-28 10:41:55 -0800 | [diff] [blame] | 30 | If configure fails, please file a bug report with detailed platform |
| 31 | information at: |
| 32 | |
| 33 | http://www.sf.net/projects/nasm/ |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 34 | |
| 35 | If everything went okay, type |
| 36 | |
| 37 | $ make |
| 38 | |
H. Peter Anvin | 212f67d | 2007-11-28 10:41:55 -0800 | [diff] [blame] | 39 | to build NASM, ndisasm and rdoff tools, or |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 40 | |
| 41 | $ make everything |
| 42 | |
| 43 | to build the former plus the docs. |
| 44 | |
H. Peter Anvin | 79e2d9f | 2003-08-29 19:05:39 +0000 | [diff] [blame] | 45 | You can decrease the size of produces executables by stripping off |
| 46 | unnecessary information, to achieve this run |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 47 | |
| 48 | $ make strip |
| 49 | |
H. Peter Anvin | 79e2d9f | 2003-08-29 19:05:39 +0000 | [diff] [blame] | 50 | If you install to a system-wide location you might need to become |
| 51 | root: |
| 52 | |
| 53 | $ su <enter root password> |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 54 | |
| 55 | then |
| 56 | |
| 57 | $ make install |
| 58 | |
| 59 | optionally followed by |
| 60 | |
| 61 | $ make install_rdf |
| 62 | |
| 63 | Or you can |
| 64 | |
| 65 | $ make install_everything |
| 66 | |
| 67 | to install everything =) |
| 68 | |
| 69 | |
| 70 | Thats it, enjoy! |
| 71 | |
H. Peter Anvin | 8ac3641 | 2002-04-30 21:09:12 +0000 | [diff] [blame] | 72 | |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 73 | 2. Installing NASM from source (Windows - MS Visual C++) |
| 74 | ======================================================== |
H. Peter Anvin | b995746 | 2007-09-16 22:27:07 -0700 | [diff] [blame] | 75 | |
| 76 | The recommended compiler for NASM on Windows is MinGW |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 77 | (http://www.mingw.org/), but it is also possible to compile with |
H. Peter Anvin | b995746 | 2007-09-16 22:27:07 -0700 | [diff] [blame] | 78 | Microsoft Visual C++ (tested with Visual C++ 2005 Express Edition.) |
| 79 | |
| 80 | To do so, start the "Visual C++ Command Shell", go to the directory |
| 81 | where the NASM source code was extracted, and run: |
| 82 | |
| 83 | > nmake /f Mkfiles/msvc.mak |
| 84 | |
| 85 | We recommend MinGW over Visual C++ 2005 as we have found it to be more |
| 86 | up to date with regards to C99 compliance, and we are increasingly |
| 87 | using C99 features in NASM. |
H. Peter Anvin | 212f67d | 2007-11-28 10:41:55 -0800 | [diff] [blame] | 88 | |
| 89 | |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 90 | 3. Installing NASM from source (DOS, Windows, OS/2 - OpenWatcom) |
| 91 | ================================================================ |
H. Peter Anvin | 212f67d | 2007-11-28 10:41:55 -0800 | [diff] [blame] | 92 | |
H. Peter Anvin | a396a18 | 2008-06-28 18:53:55 -0700 | [diff] [blame] | 93 | NASM has been reported to build correctly with OpenWatcom 1.7 on the |
| 94 | Windows and OS/2 platforms. In addition, it *should* work under DOS |
| 95 | with the DOS4GW DOS extender, although the NASM developers recommend |
| 96 | using DJGPP with the CWSDPMI DOS extender instead. |
H. Peter Anvin | 212f67d | 2007-11-28 10:41:55 -0800 | [diff] [blame] | 97 | |
| 98 | A WMAKE make file is provided: |
| 99 | |
| 100 | > wmake -f Mkfiles\openwcom.mak <platform> |
| 101 | |
| 102 | ... where <platform> is "dos", "win32" or "os2". |