ref: 6f46058e21cd7752b004288a8deb0d458fe74ac1
parent: b9f92536a9bce4a28e61a9a0e011d316e001ec34
author: Anthony J. Bentley <[email protected]>
date: Wed Dec 22 09:38:45 EST 2010
Add an install target.
--- 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\
@@ -45,6 +46,20 @@
@rm -rf rgblink $(rgblink_obj)
@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
--- a/README
+++ b/README
@@ -14,14 +14,20 @@
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.