ref: 43228f16f030fbd54cbff64e059e1f8bf046306e
parent: f14b061ea7b6eb6199b1d165e06d896ff8adb99f
author: AntonioND <[email protected]>
date: Mon Apr 3 18:04:01 EDT 2017
Improve README Signed-off-by: AntonioND <[email protected]>
--- a/README.md
+++ b/README.md
@@ -12,8 +12,51 @@
other UNIX tools.
-## Building RGBDS
+## 1. Installing RGBDS
+### 1.1 Windows
+
+Windows builds are available in the releases page on GitHub:
+
+ https://github.com/rednex/rgbds/releases
+
+Copy the `.exe` files to `C:\Windows\` or similar.
+
+If you require the latest version in development, it should be possible to
+compile RGBDS with MinGW or Cygwin by following the instructions to build it
+on UNIX systems.
+
+### 1.2 Mac OS
+
+You can build RGBDS by following the instructions below. However, if you would
+prefer not to build RGBDS yourself, you may also install it using
+[Homebrew](http://brew.sh/).
+
+To install the latest release, use:
+
+```sh
+brew install rgbds
+```
+
+To install RGBDS with all of the current changes in development (as seen on the
+`master` branch on GitHub), use:
+
+```sh
+brew install rgbds --HEAD
+```
+
+### 1.3 Other UNIX-like systems
+
+No official binaries of RGBDS are distributed for these systems, you must follow
+the simple instructions below to compile and install it.
+
+
+## 2. Building RGBDS from source
+
+RGBDS can be built in UNIX-like systems by following the instructions below.
+
+### 2.1 Dependencies
+
RGBDS requires yacc, flex, libpng and pkg-config to be installed.
On macOS, install the latter two with [Homebrew](http://brew.sh/):
@@ -33,28 +76,32 @@
`pkg-config --cflags libpng`: if the output is a path, then you're good, and if
it outputs an error then you need to install them via a package manager.
-To build the programs on a UNIX or UNIX-like system, just run in your terminal:
+### 2.2 Build process
+To build the programs, run in your terminal:
+
```sh
make
```
-Then to install the compiled programs and manual pages, run (with appropriate
-privileges):
+Then, to install the compiled programs and manual pages, run (with appropriate
+privileges, e.g, with `sudo`):
+
```sh
make install
```
-After installation, you can read the manuals with the man(1) command. E.g.,
+After installation, you can read the manuals with the `man` command. E.g.,
```sh
-man 1 rgbasm
+man 7 rgbds
```
-Note: the variables described below can affect installation behavior when given
-on the make command line. For example, to install rgbds in your home directory
-instead of systemwide, run the following:
+There are some variables in the Makefile that can be redefined by the user. The
+variables described below can affect installation behavior when given on the
+make command line. For example, to install RGBDS in your home directory instead
+of systemwide, run the following:
```sh
mkdir -p $HOME/{bin,man/man1,man/man7}
@@ -61,43 +108,28 @@
make install PREFIX=$HOME
```
-`PREFIX`: Location where RGBDS will be installed. Defaults to `/usr/local`.
+To do a verbose build, run:
-`BINPREFIX`: Location where the RGBDS programs will be installed. Defaults
-to `${PREFIX}/bin`.
+```sh
+make Q=
+```
-`MANPREFIX`: Location where the RGBDS man pages will be installed. Defaults
-to `${PREFIX}/man`.
+This is the complete list of user-defined variables:
-`Q`: Whether to quiet the build or not. To make the build more verbose, clear
-this variable. Defaults to `@`.
+- `PREFIX`: Location where RGBDS will be installed. Defaults to `/usr/local`.
-`STRIP`: Whether to strip the installed binaries of debug symbols or not.
-Defaults to `-s`.
+- `BINPREFIX`: Location where the RGBDS programs will be installed. Defaults to
+ `${PREFIX}/bin`.
-`BINMODE`: Permissions of the installed binaries. Defaults to `555`.
+- `MANPREFIX`: Location where the RGBDS man pages will be installed. Defaults to
+ `${PREFIX}/man`.
-`MANMODE`: Permissions of the installed manpages. Defaults to `444`.
+- `Q`: Whether to quiet the build or not. To make the build more verbose, clear
+ this variable. Defaults to `@`.
+- `STRIP`: Whether to strip the installed binaries of debug symbols or not.
+ Defaults to `-s`.
-## Installing RGBDS (macOS)
+- `BINMODE`: Permissions of the installed binaries. Defaults to `555`.
-If you would prefer not to build RGBDS yourself, you may also install it using
-[Homebrew](http://brew.sh/). To install the latest release, use:
-
-```sh
-brew install rgbds
-```
-
-To install RGBDS with all of the current changes in development (as seen on
-GitHub), use:
-```sh
-brew install rgbds --HEAD
-```
-
-
-## Installing RGBDS (Windows)
-
-Windows builds are available here: https://github.com/rednex/rgbds/releases
-
-Copy the .exe files to C:\Windows\ or similar.
+- `MANMODE`: Permissions of the installed manpages. Defaults to `444`.