File: Makefile

package info (click to toggle)
sysprof 1.0.12-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 928 kB
  • ctags: 690
  • sloc: ansic: 5,065; sh: 869; makefile: 166
file content (72 lines) | stat: -rw-r--r-- 1,169 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
ifneq ($(KERNELRELEASE),)

obj-m	:= sysprof-module.o

else

ifeq ($(PREFIX),)
PREFIX	:= /usr/local
endif

MODULE    := sysprof-module
KVERS     := $(shell uname -r)
KDIR      := /lib/modules/$(KVERS)/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 ($(KVERS) | 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


# Automake rules, as per "Third-Party Makefiles" in the automake manual

all: $(MODULE).o

distdir:
	cp sysprof-module.c $(distdir)
	cp sysprof-module.h $(distdir)
	cp Makefile $(distdir)

install:
	$(KMAKE) modules_install
	[ -e /sbin/depmod ] && /sbin/depmod

install-data:
install-exec:
uninstall:

install-info:
installdirs:
check:
installcheck:
mostlyclean:
clean:
	rm -f sysprof-module.ko
	rm -f sysprof-module.o
	rm -f sysprof-module.mod.o
	rm -f sysprof-module.mod.c
distclean: clean
maintainer-clean:
dvi:
pdf:
info:
html:
tags:
ctags:

endif