summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 4d4cd6e6ec6cc43b51a78ec5f7cd8d7414c84035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
## -----------------------------------------------------------------------
##   
##   Copyright 2001 H. Peter Anvin - All Rights Reserved
##
##   This program is free software; you can redistribute it and/or modify
##   it under the terms of the GNU General Public License as published by
##   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
##   Boston MA 02111-1307, USA; either version 2 of the License, or
##   (at your option) any later version; incorporated herein by reference.
##
## -----------------------------------------------------------------------

##
## Makefile for pngtoico
##

INSTALLROOT =
prefix      = /usr/local
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

clean:
	rm -f pngtoico

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)