
ifndef KERNEL
KERNEL=$(shell uname -r)
endif

VERSION=$(shell echo ${KERNEL} |sed "s/^\([0-9]*\.[0-9]*\).*/\1/")

all:
	@make -C src -f Makefile-${VERSION}

%:
	@make -C src -f Makefile-${VERSION} $@

install:
	@make -C src -f Makefile-${VERSION} install-kmodule
	@make -C src -f Makefile-${VERSION} install-ipt
	@make -C src -f Makefile-${VERSION} install-tool

uninstall:
	@make -C src -f Makefile-${VERSION} uninstall-kmodule
	@make -C src -f Makefile-${VERSION} uninstall-ipt
	@make -C src -f Makefile-${VERSION} uninstall-tool

distclean:
	rm -f *-stamp
	@make -C src -f Makefile-${VERSION} distclean

#.PHONY: all install uninstall build-kmodule build-ipt build-tool install-kmodule install-ipt install-tool uninstall-kmodule uninstall-ipt uninstall-tool clean distclean
