summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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)
-