# file: makefile.dos	G. Moody	 2 November 1989
#			Last revised:	    7 May 1999
# MSDOS `make' description file template for WFDB format converters
#
# This file is a template for a `make' description file generated by `install',
# which generates `makefile' by concatenating `dbconfig' with this file (and
# stripping out comments).  To use this file without `install', define these
# variables as appropriate for your system:

#   BINDIR	The directory in which the applications will be installed.
#   CC		The name of the command-line C compiler.
#   CDFLAGS	Optional arguments to be supplied to CC to produce object files
#		 with debugging symbols.
#   COFLAGS	Optional arguments to be supplied to CC to produce optimized
#		 object files (or normal object files if no optimization is
#		 available).
#   LWFDB	CC option to link with the standard WFDB library.

# Commands needed to build and install the WFDB format-conversion applications
# are given below for several versions of `make'.
#
# Borland (Turbo) `make':
#    make install
# Microsoft `make' (supplied with Microsoft C before version 6.0):
#    make makefile
# Microsoft `nmake' (supplied with Microsoft C 6.0 and later versions):
#    nmake install

# Most versions of `make' allow you to override the settings of make variables
# from the command line, so that it may not be necessary to edit this file to
# test the effects of small modifications to it.

# For optimized code, uncomment the next line.
CFLAGS = $(COFLAGS)
# Otherwise, if you modify the sources and need to debug them, uncomment the
# next line.
# CFLAGS = $(CDFLAGS)

# Except as noted at the end of this file, it should not be necessary to modify
# anything below this line.
# -----------------------------------------------------------------------------

XFILES = a2m.exe ad2m.exe m2a.exe md2a.exe makeid.exe readid.exe revise.exe

# General rule for compiling C sources into executable files
.c.exe:
	$(CC) $(CFLAGS) $*.c $(LWFDB)

revise.exe:
	$(CC) $(CFLAGS) -I..\lib $*.c $(LWFDB)

$(BINDIR):
	-mkdir $(BINDIR)

install:	$(XFILES) $(BINDIR)
	copy *.exe $(BINDIR)

# If you are using Microsoft `make', you may wish to comment out the next
# three lines to avoid having `make' clean up automatically.
clean:
	del *.obj
	del *.exe
