
# gkrellmapcupsd
# Copyright by Greg Schenzel <inittab@unixdev.net>
# Makefile by Martin Wuertele <maxx@debian.org>
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#

CC=gcc
CLAGS=-Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

PREFIX=/usr

INSTALL=install -m 755
RM=rm -f
RMDIR=rm -rf
INSTDIR=install -d

all:    gkrellmapcupsd

gkrellmapcupsd:
	$(CC) $(CFLAGS) -fPIC `pkg-config gtk+-2.0 --cflags` -Wunused -c gkrellmapcupsd.c 
	$(CC) $(CFLAGS) -lm -shared -o gkrellmapcupsd.so gkrellmapcupsd.o


install: gkrellmapcupsd
	$(INSTALL) ./gkrellmapcupsd.so $(PREFIX)/share/gkrellm2/plugins

uninstall:
	$(RM)	$(PREFIX)/share/gkrellm2/plugins/gkrellmapcupsd.so

clean:
	$(RMDIR) gkrellmapcupsd.o gkrellmapcupsd.so
