# $Id: Makefile,v 1.3 1992/06/18 21:24:49 aggarwal Exp $
#
# Makefile for tsmon (terminal server line monitor)

## SET THIS
#
TOP =           /usr/nocol
SRCDIR =        $(TOP)/src

BINDIR =        $(TOP)/bin
ETCDIR =        $(TOP)/etc
INCLUDEDIR =    $(SRCDIR)/include

##
# Directories needed by the program.
#	DATADIR		for creating the eventfile 
#	WTMPDIR		location of the wtmp files
#
DATADIR =	$(TOP)/data
WTMPDIR =	/var/adm/tacacs

# Directories needed by the program. Should NOT have a trailing '/'
DIRDEFS =	-DDATADIR=\"$(DATADIR)\" \
		-DWTMP_PATH=\"$(WTMPDIR)\"

####
#### Rest can be left alone #######
####

## Compilation definitions
#
CC =		cc
CDEFS  =	$(SYSDEFS) $(DIRDEFS)
CFLAGS =	-g -I$(INCLUDEDIR)

OBJECTS =	tsmon.o

tsmon:	$(OBJECTS)  Makefile 
	cc -g -I$(INCLUDEDIR) $(DIRDEFS) $(OBJECTS) -o $@

.c.o:
	$(CC) $(CFLAGS) -c $(CDEFS) $<

## The dependencies in case 'mkdep' is not used
#
$(OBJECTS):	$(INCLUDEDIR)/tsmon.h

install:	tsmon
	install -c -m 751 tsmon $(BINDIR)/

clean:
	/bin/rm -f $(OBJECTS) tsmon a.out core

rcs:
	@echo "Doing 'rcs' in 'tsmon'"
	@-for i in $(OBJS); do \
		$(CO) -q `basename $$i .o`.c ;\
	  done
