#
#   xati - manage the ATI F/X Soundcard under Linux
#   Copyright (C) 1994 Torsten Eichner
#
#   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 of the License, 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; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#   email: 	eichner@rhrk.uni-kl.de
#   papermail:	Torsten Eichner, Kampshardtweg 1, D-57587 Birken-Honigsessen, Germany
#

#   Modify this to your needs
VOLUME	= 0x38a
MIX	= 0x38c
MIXON	= 0xea
MIXOFF	= 0xeb
INSTMAN = /usr/man/man1
INSTBIN = /usr/local/bin
INSTXBIN= /usr/local/bin/X11
XAWLIB	= Xaw3d

#   Don't modify below this line

SRC = xati.c
OBJ = xati.o

CFLAGS = -O2 \
	 -DVOLUME=$(VOLUME) -DMIX=$(MIX) -DMIXON=$(MIXON) -DMIXOFF=$(MIXOFF)

LDFLAGS= -l$(XAWLIB) -lXt -lX11

xati: 	 $(OBJ)
	 $(CC) -o xati $(OBJ) $(LDFLAGS)

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

depend:
	 makedepend $(SRC)

clean:
	 rm -f $(OBJ) core xati.tar xati.tar.gz xati.tar.z Makefile.bak

allclean: clean
	 rm -f xati

install: allclean depend xati
	 install -g root -o root -m 644 xati.1 $(INSTMAN)/xati.1
	 install -g root -o root -m 644 xati.1 $(INSTMAN)/ati.1
	 install -g bin -o root -m 4755 xati $(INSTXBIN)/xati
	 install -g bin -o root -m 4755 xati $(INSTBIN)/ati

dist:
	 $(MAKE) clean
	 $(MAKE) depend
	 cd ..; tar -cvf xati.tar ati
	 mv ../xati.tar .
	 gzip xati.tar


# DO NOT DELETE THIS LINE -- make depend depends on it.

xati.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h
xati.o: /usr/include/sys/types.h /usr/include/linux/types.h
xati.o: /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h
xati.o: /usr/include/X11/Xosdefs.h /usr/local/lib/gcc-include/stddef.h
xati.o: /usr/include/X11/Xutil.h /usr/include/X11/Xresource.h
xati.o: /usr/include/string.h /usr/include/features.h
xati.o: /usr/include/sys/cdefs.h /usr/include/X11/Core.h
xati.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h
xati.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h
xati.o: /usr/include/X11/StringDefs.h /usr/include/X11/Shell.h
xati.o: /usr/include/X11/Xaw/Paned.h /usr/include/X11/Xmu/Converters.h
xati.o: /usr/include/X11/Xaw/Command.h /usr/include/X11/Xaw/Label.h
xati.o: /usr/include/X11/Xaw/Simple.h /usr/include/X11/Xaw/Toggle.h
xati.o: /usr/include/X11/Xaw/Scrollbar.h /usr/include/X11/Xaw/Box.h
xati.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/unistd.h
xati.o: /usr/include/posix_opt.h /usr/include/gnu/types.h
xati.o: /usr/include/fcntl.h /usr/include/linux/fcntl.h
