#
# $Id: Makefile,v 1.4 2010-11-08 08:28:08 vrsieh Exp $
#
# Copyright (C) 2010 FAUmachine Team <info@faumachine.org>.
# This program is free software. You can redistribute it and/or modify it
# under the terms of the GNU General Public License, either version 2 of
# the License, or (at your option) any later version. See COPYING.
#

all: faum-dev.ko faum-dev-test

ifneq ($(KERNELRELEASE),)
obj-m := faum-dev.o
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

faum-dev.ko: faum-dev.c faum-dev.h
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif

faum-dev-test: faum-dev-test.c faum-dev.h
	$(CC) -Wall -o faum-dev-test faum-dev-test.c
clean distclean::
	rm -f faum-dev-test
