################################################################################
#
# File:		lib/Makefile
# Version:	$Id: Makefile,v 1.14 1995/08/07 05:59:47 burgaard Exp $	
#
# Project:      MIDI/Sequencer library.
# Authors:	Kim Burgaard, <burgaard@daimi.aau.dk>
# Copyrights:	Copyright (c) 1994, 1995 Kim Burgaard.
#
#		This program is free software; you can redistribute it and/or
#		modify it under the terms of the GNU General Public License as
#		published by the Free Software Foundation; either version 2, or
#		(at your option) any later version.
#
#		This program is distributed in the hope that it will be useful,
#		but WITHOUT ANY WARRANTY; without even the implied warranty of
#		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#		GNU General Public License for more details.
#
#		You should have received a copy of the GNU General Public
#		License along with this program; see the file COPYING.  If not,
#		write to the Free Software Foundation, 675 Mass Ave, Cambridge,
#		MA 02139, USA.
#
################################################################################

ifeq (.depend,$(wildcard .depend))
  include .depend
endif

################################################################################

SRCS      = midiqueue.c midiprint.c midifile.c
OBJS	  = midiqueue.o midiprint.o midifile.o
LIBRARIES = libmidifile.a

################################################################################

%.o:	%.c
	$(CC) $(CFLAGS) -c -o $@ $<

all:	depend $(OBJS) $(LIBRARIES)

libmidifile.a:	$(OBJS)
		ld -r -o $@ $(OBJS)

###############################################################################

clean:	
	-rm -f $(LIBRARIES) core *.o *.a *.s .depend

install:	all
		install --directory --mode a+rx $(LIBDIR)
		install --mode a+r $(LIBRARIES) $(LIBDIR)

uninstall:
		cd $(LIBDIR) && rm -f $(LIBRARIES)

################################################################################

depend dep:
	$(CC) -I../include -M $(SRCS) > .depend

### End of File #################################################################
# Local variables:
#   fill-column: 81
# End:
