#
# Makefile for omnistat routines and test programs
# Steve Tell
# June 20, 1998
#
# This makefile requires GNU make.
#

CFLAGS=-g
CC=gcc
LD=gcc
LDFLAGS= 
LIBS= -lm
INSTDIR=$(HOME)/bin

OBJ=omnistat.o regs.o tty.o misc.o

all: stc

stc: stc.o $(OBJ)
	$(LD) $(LDFLAGS) -o $@ stc.o $(OBJ) $(LIBS)

clean:
	rm -f *~ *.o stc core 

regs.o omnistat.o stc.o: omnistat.h
tty.o omnistat.o: tty.h

dist:
	cd ..; tar czvhf omnistat-0.1.tar.gz --exclude=RCS omnistat-0.1

install: $(INSTDIR)/stc

$(INSTDIR)/%: %
	rm -f $@.old
	-mv $@ $@.old
	cp -p $* $@
	chmod 555 $@

