#
# Toplevel Makefile for the DMX-Devices
#
# make           or
# make all       to compile the sources
# make install   to install them into the kernel-module-path
# make clean     to cleanup all subdirectories derived from here
# make devinodes to create inodes in /dev

include ../config.mk

all clean distclean uninstall:
	$(MAKE) -C dmxdev $@
	$(MAKE) -C devices $@

install:
	if [ ! -d $(MODULEINSTALLPATH) ]; then mkdir -p $(MODULEINSTALLPATH); fi
	$(MAKE) -C dmxdev $@
	$(MAKE) -C devices $@
ifeq ($(strip $(CROSS)),)
	if which depmod ; then depmod -a || true; else if which /sbin/depmod || true; then /sbin/depmod -a ; fi ; fi
endif

distclean:	postdistclean

postdistclean:	
	./setup_devs distclean

devinodes:
	./setup_devs install
