Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 #
3 # Copyright © 1997-1999 Joey Hess <[email protected]>
4 # Copyright © 2002-2004 Robert Millan <[email protected]>
5 # Copyright © 2004-2012 Guillem Jover <[email protected]>
6 # Copyright © 2018-2021 Stephen Kitt <[email protected]>
7 #
8
9 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
10
11 tmpdir := $(CURDIR)/debian/tmp
12 pkg_bochs := $(CURDIR)/debian/bochs
13
14 include /usr/share/dpkg/architecture.mk
15 include /usr/share/dpkg/buildflags.mk
16
17 cdrom := cdrom
18
19 ifeq ($(DEB_HOST_ARCH_OS),linux)
20 kernel := linux
21 conf_arch_args += --enable-pcidev
22 eth := eth0
23 com := ttyS0
24 endif
25 ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
26 kernel := fbsd
27 eth := xl0
28 com := cuua0
29 cdrom := acd0
30 endif
31 ifeq ($(DEB_HOST_ARCH_OS),hurd)
32 eth := eth0
33 com := com0
34 endif
35
36 %:
37 dh $@ --no-parallel
38
39 override_dh_auto_clean:
40 [ ! -f bios/Makefile ] || $(MAKE) -C bios bios-clean
41 [ ! -f Makefile ] || $(MAKE) dist-clean
42
43 dh_auto_clean
44
45 override_dh_autoreconf:
46 # config.h.in is extensively modified, we can’t run autoheader
47 AUTOHEADER=true dh_autoreconf
48
49 override_dh_auto_configure:
50 # Note: We disable docbook support here as a cheap way to avoid
51 # building it in build-arch, and only in build-indep. This works
52 # because configure only disables entering the directory.
53 dh_auto_configure -- \
54 --with-rfb \
55 --with-sdl2 \
56 --with-term \
57 --with-x11 \
58 --with-wx \
59 --disable-docbook \
60 --enable-3dnow \
61 --enable-a20-pin \
62 --enable-all-optimizations \
63 --enable-amx \
64 --enable-avx \
65 --enable-busmouse \
66 --enable-cdrom \
67 --enable-cet \
68 --enable-clgd54xx \
69 --enable-compressed-hd \
70 --enable-cpu-level=6 \
71 --enable-debugger \
72 --enable-debugger-gui \
73 --enable-disasm \
74 --enable-e1000 \
75 --enable-es1370 \
76 --enable-evex \
77 --enable-fpu \
78 --enable-idle-hack \
79 --enable-instrumentation \
80 --enable-pci \
81 --enable-plugins \
82 --enable-repeat-speedups \
83 --enable-memtype \
84 --enable-ne2000 \
85 --enable-pnic \
86 --enable-protection-keys \
87 --enable-raw-serial \
88 --enable-sb16 \
89 --enable-smp \
90 --enable-svm \
91 --enable-uintr \
92 --enable-usb \
93 --enable-usb-ehci \
94 --enable-usb-ohci \
95 --enable-usb-xhci \
96 --enable-vmx=2 \
97 --enable-voodoo \
98 --enable-x86-64 \
99 --enable-x86-debugger \
100 $(conf_arch_args)
101
102 override_dh_auto_build-arch:
103 dh_auto_build
104
105 ifeq ($(DEB_HOST_ARCH_CPU),i386)
106 dh_auto_build -- misc/sb16/sb16ctrl
107 endif
108
109 override_dh_auto_build-indep:
110 # bochsbios
111 $(MAKE) -C bios GCC32="i686-linux-gnu-gcc -march=i386 -fno-stack-protector" LD32="i686-linux-gnu-ld" OBJCOPY32="i686-linux-gnu-objcopy"
112
113 # bochs-doc
114 $(MAKE) -C doc/docbook USE_JADE=1
115
116 override_dh_auto_install-arch:
117 dh_auto_install
118
119 # misc cleanup
120 rm -f \
121 $(tmpdir)/usr/share/bochs/install-x11-fonts \
122 $(tmpdir)/usr/share/bochs/test-x11-fonts \
123 $(tmpdir)/usr/share/man/man1/bochs-dlx.1.gz \
124 $(tmpdir)/usr/share/doc/bochs/COPYING.gz \
125 $(tmpdir)/usr/bin/bochs-docs
126
127 # bochs
128 cat $(tmpdir)/usr/share/doc/bochs/bochsrc-sample.txt \
129 | sed \
130 -e "s/#kernel#/$(kernel)/g" \
131 -e "s/#eth#/$(eth)/g" \
132 -e "s/#com#/$(com)/g" \
133 -e "s/#cdrom#/$(cdrom)/g" \
134 | gzip -c9n \
135 > $(pkg_bochs)/usr/share/doc/bochs/examples/bochsrc.gz
136 rm -f $(tmpdir)/usr/share/doc/bochs/bochsrc-sample.txt
137
138 mv $(tmpdir)/usr/bin/bochs \
139 $(tmpdir)/usr/bin/bochs-bin
140 install -m755 debian/launcher \
141 $(tmpdir)/usr/bin/bochs
142
143 cp -a debian/etc debian/tmp/
144 chmod 755 $(tmpdir)/etc/bochs-init/init.sh
145
146 ifeq ($(DEB_HOST_ARCH_CPU),i386)
147 cp misc/sb16/sb16ctrl \
148 $(tmpdir)/usr/bin/
149 endif
150
151 override_dh_auto_install-indep:
152 # bochsbios
153 mkdir -p \
154 $(tmpdir)/usr/share/bochs/
155 cp bios/BIOS* \
156 $(tmpdir)/usr/share/bochs/
157
158 # bochs-doc
159 $(MAKE) -C doc/docbook install DESTDIR=$(tmpdir)
160
161 cp /usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif \
162 $(tmpdir)/usr/share/doc/bochs/images/
163
164 override_dh_installchangelogs:
165 dh_installchangelogs CHANGES
166
167 override_dh_makeshlibs: