#  Makefile
#
#  LUNAR - Lightweight Underlay Network Ad hoc Routing
#
#  Makefile for building Intel kernel modules lunar.ko
#  for the 2.6.x kernels
#
#  Copyright (C) 2001-2004 Christian Tschudin <christian.tschudin@unibas.ch>
#
#  2004-11-13 Modified for 2.6.x (Per Svensson)
#
#  This file is distributed under the terms of the GNU general Public
#  License (GPL), see the file COPYING

obj-m   = lunar.o
KDIR    = /lib/modules/$(shell uname -r)/build
PWD     = $(shell pwd)
EXTRA_CFLAGS += -ggdb

all:
	$(MAKE) clean
	$(MAKE) modules

modules:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
	rm -rf .tmp_versions

clean:
	rm -f *~  
	rm -f *.{o,ko}
	rm -f *.o.{cmd,flags} 
	rm -f *.ko.{cmd,flags} 
	rm -f *.mod.{c,o}
	rm -f .lunar.*
	rm -rf .tmp_versions

# eof
