#    yamm, Yet Another Micro Monitor
#    module/Makefile
#    Copyright (C) 1994, 1995  Riccardo Facchetti
#
#    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.

all: drv_yamm.o

drv_yamm.o: drv_yamm.c ../../include/kversion.h ../../include/drv_yamm.h \
            ../../include/fakestat.h ../Makefile
	$(CC) -c $(CFLAGS) -D__DRV_YAMM__ drv_yamm.c -o drv_yamm.o
	if [ ! -c /dev/yamm ]; then mknod /dev/yamm c 29 0; fi
	chmod 444 /dev/yamm
	- rmmod drv_yamm
	insmod drv_yamm.o

../../include/kversion.h:
	(cd ..; ./kversion.sh)

install_drvyamm: drv_yamm.o
	install -g bin -o bin -m 700 -d $(DRVYAMMDIR)
	install -g bin -o bin -m 600 drv_yamm.o $(DRVYAMMDIR)

dep depend .depend:
	$(CPP) -M $(CFLAGS) *.c >.depend

clean:
	rm -f drv_yamm.o

distclean: clean
	rm -f *.bak .depend
	touch .depend

include .depend
