# add -DMIDIPLAY to defines if you wish to compile in the ability to
# play standard MIDI files.  This will only work on systems
# equipped with a MIDI interface and systems with an interface
# between tclm and the MIDI device.  Currently this is
# only BSD/386 with a MPU-401 compatible and the new midi
# driver.
DEFS =
# DEFS = -DMIDIPLAY

# add driver type.  This only matters if PLAYMIDI is defined
# current choices are:
# mpu_bsd386.o
# DRIVER = mpu_bsd386.o
DRIVER = 

# set RANLIB to ranlib if your system has it - otherwise set it to
# true
# RANLIB = true
RANLIB = ranlib

# set INSTALL to be your install program
# INSTALL = cp
INSTALL = install

# set INSTALLEXECFLAG to be flags needed when installing
# executables
INSTALLEXECFLAG = -c -m 755

# set INSTALLTEXTFLAG to be flags needed when installing
# text files
INSTALLTEXTFLAG = -c -m 644

# set LIBDIR to the place where libmutil.a should go
LIBDIR = /usr/local/lib

# set INCDIR to the place where the .h files should go
INCDIR = /usr/local/include

MIDILIBOBJS = mfileutil.o $(DRIVER)
MIDILIB = libmutil.a

CFLAGS = $(DEFS) -O -I.
CC = cc

all: $(MIDILIB)

$(MIDILIB): $(MIDILIBOBJS)
	rm -f $(MIDILIB)
	ar cr $(MIDILIB) $(MIDILIBOBJS)
	$(RANLIB) $(MIDILIB)

install: $(MIDILIB)
	$(INSTALL) $(INSTALLTEXTFLAG) $(MIDILIB) $(LIBDIR)
	$(RANLIB) $(LIBDIR)/$(MIDILIB)
	$(INSTALL) $(INSTALLTEXTFLAG) mutil.h mdevice.h $(INCDIR)

clean:
	rm -f $(MIDILIB) $(MIDILIBOBJS)
