File: rules

package info (click to toggle)
bochs 3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,244 kB
  • sloc: cpp: 270,331; ansic: 25,334; sh: 8,371; makefile: 5,512; yacc: 1,485; asm: 395; perl: 359; lex: 318; csh: 3
file content (167 lines) | stat: -rwxr-xr-x 3,946 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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#!/usr/bin/make -f
#
# Copyright © 1997-1999 Joey Hess <joeyh@debian.org>
# Copyright © 2002-2004 Robert Millan <rmh@debian.org>
# Copyright © 2004-2012 Guillem Jover <guillem@debian.org>
# Copyright © 2018-2021 Stephen Kitt <skitt@debian.org>
#

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

tmpdir := $(CURDIR)/debian/tmp
pkg_bochs := $(CURDIR)/debian/bochs

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk

cdrom := cdrom

ifeq ($(DEB_HOST_ARCH_OS),linux)
  kernel := linux
  conf_arch_args += --enable-pcidev
  eth := eth0
  com := ttyS0
endif
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
  kernel := fbsd
  eth := xl0
  com := cuua0
  cdrom := acd0
endif
ifeq ($(DEB_HOST_ARCH_OS),hurd)
  eth := eth0
  com := com0
endif

%:
	dh $@ --no-parallel

override_dh_auto_clean:
	[ ! -f bios/Makefile ] || $(MAKE) -C bios bios-clean
	[ ! -f Makefile ] || $(MAKE) dist-clean

	dh_auto_clean

override_dh_autoreconf:
# config.h.in is extensively modified, we can’t run autoheader
	AUTOHEADER=true dh_autoreconf

override_dh_auto_configure:
# Note: We disable docbook support here as a cheap way to avoid
# building it in build-arch, and only in build-indep. This works
# because configure only disables entering the directory.
	dh_auto_configure -- \
	  --with-rfb \
	  --with-sdl2 \
	  --with-term \
	  --with-x11 \
	  --with-wx \
	  --disable-docbook \
	  --enable-3dnow \
	  --enable-a20-pin \
	  --enable-all-optimizations \
	  --enable-amx \
	  --enable-avx \
	  --enable-busmouse \
	  --enable-cdrom \
	  --enable-cet \
	  --enable-clgd54xx \
	  --enable-compressed-hd \
	  --enable-cpu-level=6 \
	  --enable-debugger \
	  --enable-debugger-gui \
	  --enable-disasm \
	  --enable-e1000 \
	  --enable-es1370 \
	  --enable-evex \
	  --enable-fpu \
	  --enable-idle-hack \
	  --enable-instrumentation \
	  --enable-pci \
	  --enable-plugins \
	  --enable-repeat-speedups \
	  --enable-memtype \
	  --enable-ne2000 \
	  --enable-pnic \
	  --enable-protection-keys \
	  --enable-raw-serial \
	  --enable-sb16 \
	  --enable-smp \
	  --enable-svm \
	  --enable-uintr \
	  --enable-usb \
	  --enable-usb-ehci \
	  --enable-usb-ohci \
	  --enable-usb-xhci \
	  --enable-vmx=2 \
	  --enable-voodoo \
	  --enable-x86-64 \
	  --enable-x86-debugger \
	  $(conf_arch_args)

override_dh_auto_build-arch:
	dh_auto_build

ifeq ($(DEB_HOST_ARCH_CPU),i386)
	dh_auto_build -- misc/sb16/sb16ctrl
endif

override_dh_auto_build-indep:
# bochsbios
	$(MAKE) -C bios GCC32="i686-linux-gnu-gcc -march=i386 -fno-stack-protector" LD32="i686-linux-gnu-ld" OBJCOPY32="i686-linux-gnu-objcopy"

# bochs-doc
	$(MAKE) -C doc/docbook USE_JADE=1

override_dh_auto_install-arch:
	dh_auto_install

# misc cleanup
	rm -f \
	  $(tmpdir)/usr/share/bochs/install-x11-fonts \
	  $(tmpdir)/usr/share/bochs/test-x11-fonts \
	  $(tmpdir)/usr/share/man/man1/bochs-dlx.1.gz \
	  $(tmpdir)/usr/share/doc/bochs/COPYING.gz \
	  $(tmpdir)/usr/bin/bochs-docs

# bochs
	cat $(tmpdir)/usr/share/doc/bochs/bochsrc-sample.txt \
	| sed \
	  -e "s/#kernel#/$(kernel)/g" \
	  -e "s/#eth#/$(eth)/g" \
	  -e "s/#com#/$(com)/g" \
	  -e "s/#cdrom#/$(cdrom)/g" \
	| gzip -c9n \
	> $(pkg_bochs)/usr/share/doc/bochs/examples/bochsrc.gz
	rm -f $(tmpdir)/usr/share/doc/bochs/bochsrc-sample.txt

	mv $(tmpdir)/usr/bin/bochs \
	   $(tmpdir)/usr/bin/bochs-bin
	install -m755 debian/launcher \
		      $(tmpdir)/usr/bin/bochs

	cp -a debian/etc debian/tmp/
	chmod 755 $(tmpdir)/etc/bochs-init/init.sh

ifeq ($(DEB_HOST_ARCH_CPU),i386)
	cp misc/sb16/sb16ctrl \
	   $(tmpdir)/usr/bin/
endif

override_dh_auto_install-indep:
# bochsbios
	mkdir -p \
	   $(tmpdir)/usr/share/bochs/
	cp bios/BIOS* \
	   $(tmpdir)/usr/share/bochs/

# bochs-doc
	$(MAKE) -C doc/docbook install DESTDIR=$(tmpdir)

	cp /usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif \
	   $(tmpdir)/usr/share/doc/bochs/images/

override_dh_installchangelogs:
	dh_installchangelogs CHANGES

override_dh_makeshlibs: