Files
sysprof/module/Makefile
Søren Sandmann 71db050480 Auto*ify.
Sat May 14 15:49:52 2005  Søren Sandmann  <sandmann@redhat.com>

	Auto*ify.

	* TODO: updates

	* AUTHORS, INSTALL, Makefile.am, NEWS, configure.ac: New files

	* module/Makefile: New file

	* module/sysprof-module.c, module/sysprof-module.h: Move these
	files to their own directy, as the kernel build system does not
	work very well with auto*.

	* sysprof.c, autogen.sh: Some auto* changes.
2005-05-14 19:53:53 +00:00

35 lines
633 B
Makefile

ifneq ($(KERNELRELEASE),)
obj-m := sysprof-module.o
CFLAGS += $(MODCFLAGS) -DKERNEL26
else
ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
MODULE := sysprof-module
KDIR := /lib/modules/$(shell uname -r)/build
INCLUDE := -isystem $(KDIR)/include
MODCFLAGS := -DMODULE -D__KERNEL__ -Wall ${INCLUDE}
KMAKE := $(MAKE) -C $(KDIR) SUBDIRS=$(PWD)
modules: $(MODULE).o
insert_module: install
modprobe -r sysprof-module
modprobe sysprof-module
ifneq ($(shell (uname -r | grep 2.6) > /dev/null ; echo -n $$?),0)
echo A 2.6 kernel is required; exit 1
endif
# build module
$(MODULE).o: $(MODULE).c
$(KMAKE) modules
endif