~ubuntu-branches/ubuntu/trusty/sysprof/trusty

« back to all changes in this revision

Viewing changes to module/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Ritesh Raj Sarraf
  • Date: 2011-06-13 23:05:39 UTC
  • mfrom: (8.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110613230539-426qhsc3k996edou
Tags: 1.1.6-2
Upload to unstable 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
ifneq ($(KERNELRELEASE),)
2
 
 
3
 
obj-m   := sysprof-module.o
4
 
 
5
 
else
6
 
 
7
 
ifeq ($(PREFIX),)
8
 
PREFIX  := /usr/local
9
 
endif
10
 
 
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}
16
 
 
17
 
KMAKE     := $(MAKE) -C $(KDIR) SUBDIRS=$(PWD)
18
 
 
19
 
modules: $(MODULE).o
20
 
 
21
 
insert_module: install
22
 
        modprobe -r sysprof-module
23
 
        modprobe sysprof-module
24
 
 
25
 
ifneq ($(shell ($(KVERS) | grep 2.6) > /dev/null ; echo -n $$?),0)
26
 
        echo A 2.6 kernel is required; exit 1
27
 
endif
28
 
 
29
 
# build module
30
 
 
31
 
$(MODULE).o: $(MODULE).c
32
 
        $(KMAKE) modules
33
 
 
34
 
 
35
 
# Automake rules, as per "Third-Party Makefiles" in the automake manual
36
 
 
37
 
all: $(MODULE).o
38
 
 
39
 
distdir:
40
 
        cp sysprof-module.c $(distdir)
41
 
        cp sysprof-module.h $(distdir)
42
 
        cp Makefile $(distdir)
43
 
 
44
 
install:
45
 
        $(KMAKE) modules_install
46
 
        [ -e /sbin/depmod ] && /sbin/depmod
47
 
 
48
 
install-data:
49
 
install-exec:
50
 
uninstall:
51
 
 
52
 
install-info:
53
 
installdirs:
54
 
check:
55
 
installcheck:
56
 
mostlyclean:
57
 
clean:
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
62
 
distclean: clean
63
 
maintainer-clean:
64
 
dvi:
65
 
pdf:
66
 
info:
67
 
html:
68
 
tags:
69
 
ctags:
70
 
 
71
 
endif
72