# Makefile for blinkd and blink
# (C) 1998 W. Borgert debacle@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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: Makefile,v 1.4 1998/10/14 18:42:20 debacle Exp $

CC       = gcc
CFLAGS   = -g -O3 -Wall -ansi -pedantic
CPPFLAGS = -D_GNU_SOURCE -DSERV_TCP_PORT=20013
ifndef prefix
prefix  = /
endif # prefix

all:    blinkd blink

blinkd: blinkd.o

blink:  blink.o

install: blinkd blink
	cp    blink     $(prefix)/bin/blink
	chgrp users     $(prefix)/bin/blink
	chmod u+x       $(prefix)/bin/blink
	cp    blinkd    $(prefix)/sbin/blinkd
	chgrp users     $(prefix)/sbin/blinkd
	chmod u+x       $(prefix)/sbin/blinkd
	cp    blinkd.1  $(prefix)/man/man1/blinkd.1
	chgrp users     $(prefix)/man/man1/blinkd.1
	chmod og+r      $(prefix)/man/man1/blinkd.1
	gzip            $(prefix)/man/man1/blinkd.1
	cd $(prefix)/man/man1; ln -sf blinkd.1.gz blink.1.gz
#	cp    standard.tcl $(prefix)/doc/blinkd/examples/standard.tcl
	sync
	sync

clean:
	rm -f blink blinkd blink.o blinkd.o

