Mike Small
308f5650e1
The earlier Makefile assumed GNU tooling in the following ways: 1. install having a -t target directory argument. 2. make having an internal rule to make a target based only on... ansi2text: ansi2text.o 3. man pages go to /usr/local/share/man, which is not the location on OpenBSD Made a note about installation, pointing out the use of the MANDIR variable to correct the man page destination. Added an uninstall target.
28 lines
660 B
Makefile
28 lines
660 B
Makefile
# Copyright (c) 2020 Michael Small <smallm@sdf.org>
|
|
#
|
|
# Copying and distribution of this file, with or without modification,
|
|
# are permitted in any medium without royalty, provided the copyright
|
|
# notice and this notice are preserved. This file is offered as-is,
|
|
# without any warranty.
|
|
|
|
PREFIX=/usr/local
|
|
BINDIR=$(PREFIX)/bin
|
|
MANDIR=$(PREFIX)/share/man
|
|
|
|
all: ansi2text
|
|
|
|
ansi2text: ansi2text.o
|
|
$(CC) -o $@ $>
|
|
|
|
install: ansi2text
|
|
install -d $(BINDIR) $(MANDIR) $(MANDIR)/man1
|
|
install -m 755 ansi2text $(BINDIR)
|
|
install -m 444 ansi2text.1 $(MANDIR)/man1
|
|
|
|
clean:
|
|
-rm ansi2text ansi2text.o
|
|
|
|
uninstall:
|
|
-rm $(BINDIR)/ansi2text
|
|
-rm $(MANDIR)/man1/ansi2text.1
|