#
# $Id: Makefile,v 1.1 2010-11-29 11:59:30 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: fau-camera-adapter.ko fau-camera-adapter-test

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

fau-camera-adapter.ko: fau-camera-adapter.c fau-camera-adapter.h
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif

fau-camera-adapter-test: fau-camera-adapter-test.c fau-camera-adapter.h
	$(CC) -Wall -o fau-camera-adapter-test fau-camera-adapter-test.c
clean distclean::
	rm -f fau-camera-adapter-test
