diff --git a/Makefile b/Makefile index 24e513e1..e0759493 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ CFLAGS += -Wall -Iinclude -Iinclude/asm/gameboy -g -std=c99 \ -D_POSIX_C_SOURCE=200112L +PREFIX ?= /usr/local yacc_pre := \ src/asm/yaccprt1.y\ @@ -46,6 +47,20 @@ clean: @rm -rf rgbfix $(rgbfix_obj) @rm -rf src/asm/asmy.c +install: all + @install -s -o root -g bin -m 555 rgbasm ${PREFIX}/bin/rgbasm + @install -s -o root -g bin -m 555 rgbfix ${PREFIX}/bin/rgbfix + @install -s -o root -g bin -m 555 rgblink ${PREFIX}/bin/rgblink + @install -s -o root -g bin -m 555 rgblib ${PREFIX}/bin/rgblib + @install -o root -g bin -m 444 src/asm/rgbasm.1 \ + ${PREFIX}/man/cat1/rgbasm.1 + @install -o root -g bin -m 444 src/fix/rgbfix.1 \ + ${PREFIX}/man/cat1/rgbfix.1 + @install -o root -g bin -m 444 src/link/rgblink.1 \ + ${PREFIX}/man/cat1/rgblink.1 + @install -o root -g bin -m 444 src/lib/rgblib.1 \ + ${PREFIX}/man/cat1/rgblib.1 + rgbasm: $(rgbasm_obj) @${CC} $(CFLAGS) -o $@ $(rgbasm_obj) -lm diff --git a/README b/README index 9d49ba17..586eaf4d 100644 --- a/README +++ b/README @@ -14,14 +14,20 @@ rgbds-linux is a fork of the original RGBDS which aims to make the programs more like other UNIX tools. - Building RGBDS -================ + Installing RGBDS +================== To build the programs on a UNIX or UNIX-like system, just run in your terminal: make -There is no install target -- just copy the binaries (rgbasm, rgbfix, rgblib, -and rgblink) to a folder in your $PATH. +Then to install the compiled programs and manual pages, run (with appropriate +privileges): + + make install + +You can read the manuals with the man(1) command. E.g., + + man 1 rgbasm There are no Windows installation instructions at this time.