# The user must define NBS_NUM to be the phone number for dialing
# the NBS computer.
#
# The standard long-distance dialing number for the NBS is 1-303-494-4774.
#  
# See the README file for more details.
#
# -DSET_UTC in CFLAGS means that your hardware clock is set to Universal
# Time rather than local time.
#
# $Id: Makefile,v 1.5 1994/02/01 08:18:41 kayvan Exp $

SHELL=/bin/sh

DESTDIR = /etc

NBS_NUM=1-303-494-4774

DEBUG_CFLAGS = -O2 -Wall
CFLAGS = $(DEBUG_CFLAGS) -DNBS_NUM=\"$(NBS_NUM)\" -DSET_UTC
LDFLAGS = -s

ifdef QMAGIC
LDFLAGS += -Wl,-qmagic
endif

ifdef DEBUG
LDFLAGS = -g
DEBUG_CFLAGS = -g
endif

nbs_time: config.h nbs_time.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.c

install: nbs_time
	cp nbs_time $(DESTDIR)
	chmod 700 $(DESTDIR)/nbs_time

install.pl: nbs_time.pl
	cp nbs_time.pl $(DESTDIR)
	chmod 700 $(DESTDIR)/nbs_time.pl

clean:
	rm -f nbs_time

distrib:
	(DIR=`pwd`; DIR=`basename $$DIR`; \
	 cd ..; tar cvzf nbstime.tgz `find $$DIR -type f -print | grep -v RCS`)
