# file: Makefile	G. Moody	1 November 1999
#			Last revised:	30 September 2000
#
# Use this file to compile and install the software for creating the LTSTDB
# documentation (see README in this directory for details).

# BINDIR is the directory into which the executables and shell scripts are
# to be installed.  You must have write permission in BINDIR to complete the
# installation successfully.
BINDIR = /usr/local/bin

# SCRIPTS is a list of shell scripts to be installed in BINDIR.
SCRIPTS = makestplots makestplots-a4 stplot

# TARGETS is a list of binary executables to be compiled and installed in
# BINDIR.
TARGETS = pscgen stevents stref sttrend wfdbinfo

all:	$(TARGETS)

install:	all
	-mkdir -p $(BINDIR)
	install $(SCRIPTS) $(TARGETS) $(BINDIR)

pscgen:		pscgen.c
	cc -o pscgen -O pscgen.c -lwfdb
stevents:	stevents.c custom_bars.c
	cc -o stevents -DCUSTOM_BARS -O stevents.c -lwfdb
stref:	stref.c
	cc -o stref -O stref.c -lwfdb
sttrend:	sttrend.c
	cc -o sttrend -O sttrend.c -lwfdb
wfdbinfo:	wfdbinfo.c
	cc -o wfdbinfo -O wfdbinfo.c -lwfdb

clean:
	rm -f pscgen stevents stref sttrend wfdbinfo *~
