1
ifneq ($(KERNELRELEASE),)
3
obj-m := sysprof-module.o
11
MODULE := sysprof-module
12
KVERS := $(shell uname -r)
13
KDIR := /lib/modules/$(KVERS)/build
14
INCLUDE := -isystem $(KDIR)/include
15
MODCFLAGS := -DMODULE -D__KERNEL__ -Wall ${INCLUDE}
17
KMAKE := $(MAKE) -C $(KDIR) SUBDIRS=$(PWD)
21
insert_module: install
22
modprobe -r sysprof-module
23
modprobe sysprof-module
25
ifneq ($(shell ($(KVERS) | grep 2.6) > /dev/null ; echo -n $$?),0)
26
echo A 2.6 kernel is required; exit 1
31
$(MODULE).o: $(MODULE).c
35
# Automake rules, as per "Third-Party Makefiles" in the automake manual
40
cp sysprof-module.c $(distdir)
41
cp sysprof-module.h $(distdir)
42
cp Makefile $(distdir)
45
$(KMAKE) modules_install
46
[ -e /sbin/depmod ] && /sbin/depmod
58
rm -f sysprof-module.ko
59
rm -f sysprof-module.o
60
rm -f sysprof-module.mod.o
61
rm -f sysprof-module.mod.c