summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-01-01 22:46:29 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-01-01 22:46:29 +0000
commit829dd7c30cbdafc68e5ce1e26b508ba367a70176 (patch)
treede571bfbddbaf80ed06f016baa24800dbc14833a /Makefile
parent471d5be00b983ba156ccc2ee4f0c1b8bf65e9c30 (diff)
downloadpngtoico-829dd7c30cbdafc68e5ce1e26b508ba367a70176.tar.gz
pngtoico-829dd7c30cbdafc68e5ce1e26b508ba367a70176.tar.xz
pngtoico-829dd7c30cbdafc68e5ce1e26b508ba367a70176.zip
Add man page, "make install"
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 13d7e91..3e69c31 100644
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,19 @@
## Makefile for pngtoico
##
+INSTALLROOT =
+prefix = /usr
+bindir = $(prefix)/bin
+mandir = $(prefix)/man
+man1dir = $(mandir)/man1
+
CC = gcc -W -Wall
CFLAGS = -O2 -fomit-frame-pointer
LDFLAGS = -s
LIBS = -lpng
+INSTALL = install
+INSTALL_EXEC = $(INSTALL) -c -m 755
+INSTALL_DATA = $(INSTALL) -c -m 644
all: pngtoico
@@ -27,6 +36,10 @@ clean:
distclean spotless: clean
rm -f *~ \#*
+install: all
+ mkdir -p $(INSTALLROOT)$(bindir) $(INSTALLROOT)$(man1dir)
+ $(INSTALL_EXEC) pngtoico $(INSTALLROOT)$(bindir)
+ $(INSTALL_DATA) pngtoico.1 $(INSTALLROOT)$(man1dir)
+
pngtoico: pngtoico.c
$(CC) $(CFLAGS) $(LDFLAGS) -o pngtoico pngtoico.c $(LIBS)
-