File: rules

package info (click to toggle)
virtualbox 7.1.12-dfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites:
  • size: 565,676 kB
  • sloc: ansic: 2,330,854; cpp: 2,193,228; asm: 230,777; python: 223,895; xml: 86,771; sh: 25,541; makefile: 8,158; perl: 5,697; java: 5,337; cs: 4,872; pascal: 1,782; javascript: 1,692; objc: 1,131; lex: 931; php: 906; sed: 899; yacc: 707
file content (77 lines) | stat: -rw-r--r-- 2,532 bytes parent folder | download | duplicates (2)
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
73
74
75
76
77
#!/usr/bin/make -f

# some default definitions, important!
#
# Name of the source package
psource:=virtualbox-source
gsource:=virtualbox-guest-source

# The short upstream name, used for the module source directory
sname:=virtualbox
uname:=virtualbox-guest-utils

### KERNEL SETUP
### Setup the stuff needed for making kernel module packages
### taken from /usr/share/kernel-package/sample.module.rules

# prefix of the target package name
PACKAGE := virtualbox-modules
# modifieable for experiments or debugging m-a
MA_DIR ?= /usr/share/modass
# load generic variable handling
-include $(MA_DIR)/include/generic.make
# load default rules, including kdist, kdist_image, ...
-include $(MA_DIR)/include/common-rules.make

# module assistant calculates all needed things for us and sets
# following variables:
# KSRC (kernel source directory), KVERS (kernel version string), KDREV
# (revision of the Debian kernel-image package), CC (the correct
# compiler), VERSION (the final package version string), PKGNAME (full
# package name with KVERS included), DEB_DESTDIR (path to store DEBs)

# The kdist_configure target is called by make-kpkg modules_config and
# by kdist* rules by dependency. It should configure the module so it is
# ready for compilation (mostly useful for calling configure).
# prep-deb-files from module-assistant creates the neccessary debian/ files
kdist_configure: prep-deb-files

# the kdist_clean target is called by make-kpkg modules_clean and from
# kdist* rules. It is responsible for cleaning up any changes that have
# been made by the other kdist_commands (except for the .deb files created)
kdist_clean: clean
	$(MAKE) $(MFLAGS) -f debian/rules clean
#
### end  KERNEL SETUP

#see bug #785161
#MAKE:=kmk

clean:
	$(MAKE) KERN_VER=$(KVERS) -C vboxdrv clean
	$(MAKE) KERN_VER=$(KVERS) -C vboxnetflt clean
	$(MAKE) KERN_VER=$(KVERS) -C vboxnetadp clean
	dh_clean

binary-modules: prep-deb-files
	dh_testroot
	dh_prep
	# Build the module
	$(MAKE) -C $(KSRC) M=$(CURDIR)
	# Install the module
	dh_install vboxdrv/vboxdrv.ko /lib/modules/$(KVERS)/misc/
	dh_install vboxnetflt/vboxnetflt.ko /lib/modules/$(KVERS)/misc/
	dh_install vboxnetadp/vboxnetadp.ko /lib/modules/$(KVERS)/misc/
	dh_installudev
	dh_installdocs
	dh_installchangelogs
	dh_compress
	dh_fixperms
	dh_installmodules
	dh_installdeb
	dh_gencontrol -- -v$(VERSION)
	dh_md5sums
	dh_builddeb --destdir=$(DEB_DESTDIR)
	dh_prep

.PHONY: build clean binary-arch binary-indep binary install binary-modules kdist kdist_configure kdist_image kdist_clean