#
# DATlib   Copyright (c) 1995-1996 Marcus Meissner &
#          Friedrich-Alexander Universitaet Erlangen-Nuernberg (FAU), IMMD4
#          All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#    This product includes software developed by Marcus Meissner
#    at the Friedrich-Alexander Universitaet Erlangen-Nuernberg (FAU), IMMD4
#
# 4. The name of the University or the author may not be used
#    to endorse or promote products derived from this software without
#    specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND THE AUTHOR ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE UNIVERSITY OR THE AUTHOR BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id: Makefile,v 1.2 1997/09/30 14:35:46 msmeissn Exp $
#
# $Log: Makefile,v $
# Revision 1.2  1997/09/30 14:35:46  msmeissn
# added
#
# Revision 1.1  1997/03/16 20:27:17  msmeissn
# Initial revision
#
#

SHELL		=	/bin/sh

TOP		=	..
include			$(TOP)/Makefile.common

CFLAGS		=	$(TOPCFLAGS) $(INCLUDE) -DDEFAULTTAPE='"$(DEFAULTTAPE)"' -DDEFAULTAUDIOTAPE='"$(DEFAULTAUDIOTAPE)"'
SUBDIRS		=	ply

CMDTARG		= 	dat record player cd2dat xplayer playtrack play
all:		$(CMDTARG) SUB-all

install:	$(CMDTARG) SUB-install
		$(INSTALL) $(CMDTARG) $(INSTBINDIR)

clean: 		FRC SUB-clean
		-rm *.o core $(CMDTARG)

##

dat: 	dat.o $(DATLIB) $(GENLIB)
	$(CC) -o $@ $@.o $(DATLIB) $(GENLIB)

playtrack: playtrack.o $(DATALIB)
	$(CC) -o $@ $@.o $(DATALIB)

cd2dat: cd2dat.o $(DATALIB)
	$(CC) -o $@ $@.o $(DATALIB)

player: player.o $(DATALIB) $(GENLIB)
	$(CC) -o $@ $@.o $(DATALIB) $(GENLIB)

play: play.o $(GENLIB)
	$(CC) -o $@ $@.o $(GENLIB)

record: record.o $(DATALIB) $(GENLIB)
	$(CC) -o $@ $@.o $(DATALIB) $(GENLIB)

xplayer: xplayer.o $(DATALIB) $(GENLIB)
	$(CC) $(LDFLAGS) -o $@ $@.o $(DATALIB) $(GENLIB) $(X11LIBS)

xplayer.o: xplayer.c $(INCDIR)/dataudiolib.h
	$(CC) $(CFLAGS) $(X11INCLUDE) -c $< 

SUB-clean: FRC
	set -e ; for i in $(SUBDIRS) ; do (cd $$i ; make clean) ; done

SUB-all:   FRC 	
	set -e ; for i in $(SUBDIRS) ; do (cd $$i ; make) ; done

SUB-install: FRC
	set -e ; for i in $(SUBDIRS) ; do (cd $$i ; make install) ; done

FRC:
