File: rules

package info (click to toggle)
qemu 0.8.2-4etch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 8,404 kB
  • ctags: 27,580
  • sloc: ansic: 178,992; sh: 914; objc: 613; perl: 306; makefile: 287; asm: 152
file content (115 lines) | stat: -rwxr-xr-x 1,964 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/usr/bin/make -f
#
# $Id: rules 203 2006-11-04 18:12:15Z guillem $
#

DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

CC = gcc-3.4
# WARNING: Removing no-strict-aliasing will make qemu insta-segfault.
CFLAGS = -Wall -g -fno-strict-aliasing

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

ifeq ($(DEB_HOST_ARCH_OS),linux)
	conf_arch += --enable-alsa
endif

D = $(CURDIR)/debian/qemu

qemu_bios_files = \
	bios.bin \
	vgabios.bin \
	vgabios-cirrus.bin \
	video.x \
	ppc_rom.bin \
	proll.elf

qemu_docs = \
	qemu-doc.html \
	qemu-tech.html \
	qemu.1 \
	qemu-img.1

include /usr/share/quilt/quilt.make

config-host.mak: configure
	dh_testdir
	
	# XXX: Hack until iasl is ported to big-endian systems
	cp debian/patches/acpi-dsdt.hex hw/
	
	CFLAGS="$(CFLAGS)" ./configure \
	  --prefix=/usr \
	  $(conf_arch) \
	  --cc=$(CC)

build: patch config-host.mak
	dh_testdir
	
	$(MAKE)
	$(MAKE) -C pc-bios

clean: unpatch
	dh_testdir
	dh_testroot
	
	-$(MAKE) -C pc-bios clean
	-$(MAKE) distclean
	
	rm -f hw/acpi-dsdt.hex hw/acpi-dsdt.aml
	rm -f $(qemu_docs)
	
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -a
	
	# Make qemu's "make install" happy
	for i in $(qemu_bios_files); do \
	  touch pc-bios/$$i; \
	done
	
	$(MAKE) DESTDIR=$(D) install
	
	# Clean up the mess
	for i in $(qemu_bios_files); do \
	  rm -f pc-bios/$$i $(D)/usr/share/qemu/$$i; \
	done

binary-indep:
# Nothing to do.

binary-arch: install
	dh_testdir
	dh_testroot
	dh_install -a
	dh_installdebconf -a
	dh_installdocs -a
	dh_installexamples -a
	dh_installlogrotate -a
	dh_installman -a
	dh_installinfo -a
	dh_installchangelogs -a Changelog
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	chmod a+x $(D)/etc/qemu-ifup
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install