#
# Copyright 2001 Free Software Foundation, Inc.
# 
# This file is part of GNU Radio
# 
# GNU Radio 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.
# 
# GNU Radio 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 GNU Radio; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

include ../Makefile.conf

INCLUDEDIR = $(CONFIG_MC4020_KERNELDIR)/include
MODULEDIR  = $(moddir)

DEFINES = -D__KERNEL__
CFLAGS += $(DEFINES)

OBJS = mc4020.o

all: $(OBJS)

install:
	$(INSTALL) -d $(MODULEDIR)
	$(INSTALL) mc4020.o $(MODULEDIR)
	$(INSTALL) mc4020.h $(includedir)

clean:
	rm -f *.o *~ core

mc4020.o: mc4020.h mc4020_util.h plx9080.h driver.h \
	version.h config.h adriver.h

uninstall:
	-rm -f $(MODULE_DIR)/mc4020.o

distclean:	clean

devs:
	rm -f /dev/mc4020_0
	rm -f /dev/mc4020aux0
	rm -f /dev/mc4020_1
	rm -f /dev/mc4020aux1
	mknod /dev/mc4020_0   c 127  0
	mknod /dev/mc4020aux0 c 127 16
	mknod /dev/mc4020_1   c 127  1
	mknod /dev/mc4020aux1 c 127 17
	chmod 444 /dev/mc4020_0
	chmod 444 /dev/mc4020aux0
	chmod 444 /dev/mc4020_1
	chmod 444 /dev/mc4020aux1

