#
# Makefile for DAHDI FreeBSD kernel modules and tools
#

GMAKE?=	gmake

all:
	$(MAKE) -C freebsd all
	$(GMAKE) -C tools all

clean:
	$(MAKE) -C freebsd clean
	$(GMAKE) -C tools clean

distclean: clean
	$(MAKE) -C freebsd distclean
	$(GMAKE) -C tools distclean

dist-clean: distclean

install: all
	$(MAKE) -C freebsd install
	$(GMAKE) -C tools install

config: install
	$(GMAKE) -C tools config

update:
	@if [ -d .svn ]; then \
		echo "Updating from Subversion..." ; \
		svn update --non-recursive .; \
		rm -f .version; \
		$(MAKE) -C linux update; \
		$(GMAKE) -C tools update; \
	else \
		echo "Not under version control";  \
	fi

.PHONY: all clean distclean dist-clean install config update
