# StatsLog v2.0.x
# Copyright (c) 2002 Chris Mason
#
# 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, 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 Debian system; see the file /usr/doc/copyright/GPL. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite
# 330, Boston, MA 02111-1307, USA.

APPNAME = statslog

INSTALL = /usr/bin/install
REMOVE = /bin/rm

CFLAGS = \
	-DLINUX \
	-D_GNU_SOURCE \
	-Wall \
	-O2 \
	-pedantic \
	-ansi

LIBS =

FILES = \
	statslog.c

HEADERS = \
	statslog.h \
	logformat.h

OFILES = \
	statslog.o

all: $(APPNAME)

$(APPNAME): $(OFILES)
	$(CC) -o $(APPNAME) $(CFLAGS) $(OFILES) $(LIBS)

install: $(APPNAME)
	$(INSTALL) -o root -g root -m 0755 -s $(APPNAME) /usr/bin/$(APPNAME)
	$(INSTALL) -o root -g root -m 0644 $(APPNAME).1 /usr/share/man/man1/$(APPNAME).1

uninstall: $(APPNAME)
	$(REMOVE) /usr/bin/$(APPNAME)
	$(REMOVE) /usr/share/man/man1/$(APPNAME).1

clean:
	rm -f $(APPNAME) *.o

