]> git.proxmox.com Git - qemu.git/blame - Makefile
move CONFIG_* values from yes to y
[qemu.git] / Makefile
CommitLineData
0cb3fb1e
PB
1# Makefile for QEMU.
2
55d7e8f6 3ifneq ($(wildcard config-host.mak),)
1ad2134f
PB
4# Put the all: rule here so that config-host.mak can contain dependencies.
5all: build-all
ad064840 6include config-host.mak
17759187 7include $(SRC_PATH)/rules.mak
55d7e8f6
AJ
8else
9config-host.mak:
10 @echo "Please call configure before running make!"
11 @exit 1
12endif
766a487a 13
818220f5
AL
14.PHONY: all clean cscope distclean dvi html info install install-doc \
15 recurse-all speed tar tarbin test
0cb3fb1e 16
8c462f8f
PB
17VPATH=$(SRC_PATH):$(SRC_PATH)/hw
18
17759187 19
40293e58
FB
20CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS)
21LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)
3142255c 22
96935aa4 23CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
4fb240a4 24CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
4a244704 25CPPFLAGS += -U_FORTIFY_SOURCE
766a487a 26LIBS=
1f50f8d1 27ifdef CONFIG_STATIC
40293e58 28LDFLAGS += -static
1f50f8d1 29endif
cc8ae6de 30ifdef BUILD_DOCS
7a5ca864 31DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
cc8ae6de
PB
32else
33DOCS=
34endif
aa05ae6f 35
e5d355d1
AL
36LIBS+=$(PTHREADLIBS)
37LIBS+=$(CLOCKLIBS)
83f64091 38
7e00eb9b
AL
39ifdef CONFIG_SOLARIS
40LIBS+=-lsocket -lnsl -lresolv
41endif
42
03ff3ca3
AL
43ifdef CONFIG_WIN32
44LIBS+=-lwinmm -lws2_32 -liphlpapi
45endif
46
253d0942 47build-all: $(TOOLS) $(DOCS) roms recurse-all
b9dea4fb 48
55d7e8f6
AJ
49config-host.mak: configure
50ifneq ($(wildcard config-host.mak),)
51 @echo $@ is out-of-date, running configure
052ff921 52 @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
55d7e8f6
AJ
53endif
54
0087375e 55SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
cec7d0b6
PB
56SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
57
86e840ee 58subdir-%:
0087375e 59 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
4aa42531 60
cec7d0b6
PB
61$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
62$(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
63
64recurse-all: $(SUBDIR_RULES)
83f64091 65
faf07963 66#######################################################################
319f08ea 67# block-obj-y is code used by both qemu system emulation and qemu-img
faf07963 68
319f08ea
JQ
69block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o
70block-obj-y += block/cow.o block/qcow.o aes.o block/vmdk.o block/cloop.o
71block-obj-y += block/dmg.o block/bochs.o block/vpc.o block/vvfat.o
72block-obj-y += block/qcow2.o block/qcow2-refcount.o block/qcow2-cluster.o
73block-obj-y += block/qcow2-snapshot.o
74block-obj-y += block/parallels.o block/nbd.o
75block-obj-y += nbd.o block.o aio.o
03ff3ca3
AL
76
77ifdef CONFIG_WIN32
319f08ea 78block-obj-y += block/raw-win32.o
03ff3ca3 79else
3c529d93 80ifdef CONFIG_AIO
319f08ea 81block-obj-y += posix-aio-compat.o
3c529d93 82endif
319f08ea 83block-obj-y += block/raw-posix.o
03ff3ca3
AL
84endif
85
769ce76d 86ifdef CONFIG_CURL
319f08ea 87block-obj-y += block/curl.o
769ce76d
AG
88endif
89
4fb240a4 90######################################################################
2e2ea909 91# libqemu_common.a: Target independent part of system emulation. The
4fb240a4
FB
92# long term path is to suppress *all* target specific code in case of
93# system emulation, i.e. a single QEMU executable should support all
94# CPUs and machines.
47cea614 95
6ef859b3
JQ
96obj-y = $(block-obj-y)
97obj-y += readline.o console.o
98
99obj-y += irq.o ptimer.o
100obj-y += i2c.o smbus.o smbus_eeprom.o max7310.o max111x.o wm8750.o
101obj-y += ssd0303.o ssd0323.o ads7846.o stellaris_input.o twl92230.o
102obj-y += tmp105.o lm832x.o eeprom93xx.o tsc2005.o
103obj-y += scsi-disk.o cdrom.o
104obj-y += scsi-generic.o
105obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
106obj-y += usb-serial.o usb-net.o
107obj-y += sd.o ssi-sd.o
108obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
109obj-y += bt-hci-csr.o
110obj-y += buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o
111obj-y += qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o
112obj-y += msmouse.o ps2.o
113obj-y += qdev.o ssi.o
87ecb68b 114
2e4d9fb1 115ifdef CONFIG_BRLAPI
6ef859b3 116obj-y += baum.o
2e4d9fb1
AJ
117LIBS+=-lbrlapi
118endif
119
4fb240a4 120ifdef CONFIG_WIN32
6ef859b3 121obj-y += tap-win32.o
559b90fb 122else
6ef859b3 123obj-y += migration-exec.o
4fb240a4
FB
124endif
125
eda959bd 126audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
4fb240a4 127ifdef CONFIG_SDL
eda959bd 128audio-obj-y += sdlaudio.o
4fb240a4
FB
129endif
130ifdef CONFIG_OSS
eda959bd 131audio-obj-y += ossaudio.o
4fb240a4
FB
132endif
133ifdef CONFIG_COREAUDIO
eda959bd 134audio-obj-y += coreaudio.o
ca9cc28c 135AUDIO_PT = yes
4fb240a4
FB
136endif
137ifdef CONFIG_ALSA
eda959bd 138audio-obj-y += alsaaudio.o
4fb240a4
FB
139endif
140ifdef CONFIG_DSOUND
eda959bd 141audio-obj-y += dsoundaudio.o
4fb240a4
FB
142endif
143ifdef CONFIG_FMOD
eda959bd 144audio-obj-y += fmodaudio.o
4fb240a4
FB
145audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS)
146endif
ca9cc28c
AZ
147ifdef CONFIG_ESD
148AUDIO_PT = yes
149AUDIO_PT_INT = yes
eda959bd 150audio-obj-y += esdaudio.o
ca9cc28c 151endif
b8e59f18 152ifdef CONFIG_PA
153AUDIO_PT = yes
154AUDIO_PT_INT = yes
eda959bd 155audio-obj-y += paaudio.o
b8e59f18 156endif
ca9cc28c
AZ
157ifdef AUDIO_PT
158LDFLAGS += -pthread
159endif
160ifdef AUDIO_PT_INT
eda959bd 161audio-obj-y += audio_pt_int.o
ca9cc28c 162endif
eda959bd 163audio-obj-y += wavcapture.o
6ef859b3 164obj-y += $(addprefix audio/, $(audio-obj-y))
4fb240a4 165
6ef859b3 166obj-y += keymaps.o
4fb240a4 167ifdef CONFIG_SDL
6ef859b3 168obj-y += sdl.o sdl_zoom.o x_keymap.o
4fb240a4 169endif
4d3b6f6e 170ifdef CONFIG_CURSES
6ef859b3 171obj-y += curses.o
4d3b6f6e 172endif
6ef859b3 173obj-y += vnc.o acl.o d3des.o
5fb6c7a8 174ifdef CONFIG_VNC_TLS
6ef859b3 175obj-y += vnc-tls.o vnc-auth-vencrypt.o
5fb6c7a8 176endif
2f9606b3 177ifdef CONFIG_VNC_SASL
6ef859b3 178obj-y += vnc-auth-sasl.o
2f9606b3 179endif
4fb240a4
FB
180
181ifdef CONFIG_COCOA
6ef859b3 182obj-y += cocoa.o
4fb240a4
FB
183endif
184
e5d355d1 185ifdef CONFIG_IOTHREAD
6ef859b3 186obj-y += qemu-thread.o
e5d355d1
AL
187endif
188
4fb240a4
FB
189ifdef CONFIG_SLIRP
190CPPFLAGS+=-I$(SRC_PATH)/slirp
f835ed1c
JQ
191slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
192slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
193slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
6ef859b3 194obj-y += $(addprefix slirp/, $(slirp-obj-y))
4fb240a4
FB
195endif
196
8a16d273
TS
197LIBS+=$(VDE_LIBS)
198
2567f579 199# xen backend driver support
78892528
JQ
200xen-obj-y := xen_backend.o xen_devconfig.o
201xen-obj-y += xen_console.o xenfb.o xen_disk.o xen_nic.o
2567f579 202ifdef CONFIG_XEN
6ef859b3 203 obj-y += $(xen-obj-y)
2567f579
BS
204endif
205
769ce76d
AG
206LIBS+=$(CURL_LIBS)
207
4fb240a4 208cocoa.o: cocoa.m
4fb240a4 209
0483755a
AL
210keymaps.o: keymaps.c keymaps.h
211
c18a2c36
SS
212sdl_zoom.o: sdl_zoom.c sdl_zoom.h sdl_zoom_template.h
213
214sdl.o: sdl.c keymaps.h sdl_keysym.h sdl_zoom.h
807544e2 215
537fe2d6 216sdl.o audio/sdlaudio.o baum.o: CFLAGS += $(SDL_CFLAGS)
4fb240a4 217
76655d6d
AL
218acl.o: acl.h acl.c
219
2f9606b3 220vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h
5fb6c7a8 221
76655d6d 222vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h
4fb240a4 223
807544e2 224vnc.o: CFLAGS += $(CONFIG_VNC_TLS_CFLAGS)
4d3b6f6e 225
5fb6c7a8
AL
226vnc-tls.o: vnc-tls.c vnc.h
227
228vnc-auth-vencrypt.o: vnc-auth-vencrypt.c vnc.h
229
2f9606b3
AL
230vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h
231
0483755a 232curses.o: curses.c keymaps.h curses_keys.h
fb599c9a 233
807544e2 234bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS)
4fb240a4 235
6ef859b3 236libqemu_common.a: $(obj-y)
4fb240a4 237
cec7d0b6 238#######################################################################
e11b1dce
JQ
239# user-obj-y is code used by qemu userspace emulation
240user-obj-y = cutils.o cache-utils.o
cec7d0b6 241
e11b1dce 242libqemu_user.a: $(user-obj-y)
cec7d0b6 243
4fb240a4
FB
244######################################################################
245
153859be
SB
246qemu-img.o: qemu-img-cmds.h
247
319f08ea 248qemu-img$(EXESUF): qemu-img.o qemu-tool.o tool-osdep.o $(block-obj-y)
4fb240a4 249
319f08ea 250qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o tool-osdep.o $(block-obj-y)
3aa892d7 251
319f08ea 252qemu-io$(EXESUF): qemu-io.o qemu-tool.o tool-osdep.o cmd.o $(block-obj-y)
0a8e1acd
AL
253
254qemu-img$(EXESUF) qemu-nbd$(EXESUF) qemu-io$(EXESUF): LIBS += -lz
7a5ca864 255
153859be
SB
256qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
257 $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@")
258
31e31b8a 259clean:
2d80ae89 260# avoid old build problems by removing potentially incorrect old files
5fafdf24 261 rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
86e840ee 262 rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
019d6b8f 263 rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
07b44ce9 264 rm -f qemu-img-cmds.h
7d3505c5 265 $(MAKE) -C tests clean
253d0942 266 for d in $(TARGET_DIRS) $(ROMS) libhw32 libhw64; do \
7d3505c5 267 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 268 done
31e31b8a 269
7d13299d 270distclean: clean
153859be 271 rm -f config-host.mak config-host.h $(DOCS) qemu-options.texi qemu-img-cmds.texi
0cb3fb1e 272 rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
1ad2134f 273 for d in $(TARGET_DIRS) libhw32 libhw64; do \
bc1b050d 274 rm -rf $$d || exit 1 ; \
76bc6838 275 done
7d13299d 276
fed4a9ad
FB
277KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
278ar de en-us fi fr-be hr it lv nl pl ru th \
279common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
280
77755340
TS
281ifdef INSTALL_BLOBS
282BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
e5d01b06
AJ
283video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
284pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
253d0942
AG
285bamboo.dtb petalogix-s3adsp1800.dtb \
286multiboot.bin
77755340
TS
287else
288BLOBS=
289endif
290
253d0942
AG
291roms:
292 for d in $(ROMS); do \
293 $(MAKE) -C $$d || exit 1 ; \
294 done
295
38954dca 296install-doc: $(DOCS)
58f8aead
AL
297 $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
298 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
38954dca 299ifndef CONFIG_WIN32
58f8aead
AL
300 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
301 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
302 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
303 $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
38954dca
PB
304endif
305
306install: all $(if $(BUILD_DOCS),install-doc)
58f8aead 307 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
932a79df 308ifneq ($(TOOLS),)
58f8aead 309 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
932a79df 310endif
77755340 311ifneq ($(BLOBS),)
58f8aead 312 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
77755340 313 set -e; for x in $(BLOBS); do \
58f8aead 314 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
ad064840 315 done
77755340 316endif
58f8aead 317 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
18be8d77 318 set -e; for x in $(KEYMAPS); do \
79fd42aa 319 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
ad064840 320 done
626df76a 321 for d in $(TARGET_DIRS); do \
7d3505c5 322 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 323 done
612384d7 324
367e86e8 325# various test targets
9b0b8203 326test speed: all
7d3505c5 327 $(MAKE) -C tests $@
31e31b8a 328
5fafdf24 329TAGS:
b9adb4a6 330 etags *.[ch] tests/*.[ch]
31e31b8a 331
6688bc6d
FB
332cscope:
333 rm -f ./cscope.*
ede46085 334 find . -name "*.[ch]" -print | sed 's,^\./,,' > ./cscope.files
6688bc6d
FB
335 cscope -b
336
3ef693a0 337# documentation
1f673135 338%.html: %.texi
0d00e563 339 $(call quiet-command,texi2html -I=. -monolithic -number $<," GEN $@")
3ef693a0 340
f3548328 341%.info: %.texi
0d00e563 342 $(call quiet-command,makeinfo -I . $< -o $@," GEN $@")
f3548328
FB
343
344%.dvi: %.texi
0d00e563 345 $(call quiet-command,texi2dvi -I . $<," GEN $@")
5824d651
BS
346
347qemu-options.texi: $(SRC_PATH)/qemu-options.hx
0d00e563 348 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
f3548328 349
2313086a
BS
350qemu-monitor.texi: $(SRC_PATH)/qemu-monitor.hx
351 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
352
153859be
SB
353qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx
354 $(call quiet-command,sh $(SRC_PATH)/hxtool -t < $< > $@," GEN $@")
355
2313086a 356qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
0d00e563
AL
357 $(call quiet-command, \
358 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu.pod && \
359 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
360 " GEN $@")
5a67135a 361
153859be 362qemu-img.1: qemu-img.texi qemu-img-cmds.texi
0d00e563
AL
363 $(call quiet-command, \
364 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod && \
365 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
366 " GEN $@")
acd935ef 367
7a5ca864 368qemu-nbd.8: qemu-nbd.texi
0d00e563
AL
369 $(call quiet-command, \
370 perl -Ww -- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod && \
371 pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
372 " GEN $@")
7a5ca864 373
0cb3fb1e
PB
374info: qemu-doc.info qemu-tech.info
375
376dvi: qemu-doc.dvi qemu-tech.dvi
377
378html: qemu-doc.html qemu-tech.html
379
153859be 380qemu-doc.dvi qemu-doc.html qemu-doc.info: qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-monitor.texi qemu-img-cmds.texi
818220f5 381
df5cf721
TS
382VERSION ?= $(shell cat VERSION)
383FILE = qemu-$(VERSION)
586314f2 384
1e43adfc 385# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
386tar:
387 rm -rf /tmp/$(FILE)
1e43adfc 388 cp -r . /tmp/$(FILE)
99c6c082 389 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
586314f2
FB
390 rm -rf /tmp/$(FILE)
391
76b62fd0 392# generate a binary distribution
d691f669 393tarbin:
18be8d77 394 cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \
43095f31 395 $(bindir)/qemu \
43095f31 396 $(bindir)/qemu-system-x86_64 \
40e8a53b
AJ
397 $(bindir)/qemu-system-arm \
398 $(bindir)/qemu-system-cris \
399 $(bindir)/qemu-system-m68k \
93856aac 400 $(bindir)/qemu-system-mips \
38260998 401 $(bindir)/qemu-system-mipsel \
fbe4f65b
TS
402 $(bindir)/qemu-system-mips64 \
403 $(bindir)/qemu-system-mips64el \
40e8a53b
AJ
404 $(bindir)/qemu-system-ppc \
405 $(bindir)/qemu-system-ppcemb \
406 $(bindir)/qemu-system-ppc64 \
ff1aaf65 407 $(bindir)/qemu-system-sh4 \
85ffbdfc 408 $(bindir)/qemu-system-sh4eb \
40e8a53b 409 $(bindir)/qemu-system-sparc \
7efa4387 410 $(bindir)/qemu-i386 \
f0403c03 411 $(bindir)/qemu-x86_64 \
40e8a53b
AJ
412 $(bindir)/qemu-alpha \
413 $(bindir)/qemu-arm \
414 $(bindir)/qemu-armeb \
415 $(bindir)/qemu-cris \
416 $(bindir)/qemu-m68k \
417 $(bindir)/qemu-mips \
418 $(bindir)/qemu-mipsel \
419 $(bindir)/qemu-ppc \
420 $(bindir)/qemu-ppc64 \
421 $(bindir)/qemu-ppc64abi32 \
422 $(bindir)/qemu-sh4 \
423 $(bindir)/qemu-sh4eb \
424 $(bindir)/qemu-sparc \
425 $(bindir)/qemu-sparc64 \
426 $(bindir)/qemu-sparc32plus \
427 $(bindir)/qemu-img \
428 $(bindir)/qemu-nbd \
7efa4387
FB
429 $(datadir)/bios.bin \
430 $(datadir)/vgabios.bin \
de9258a8 431 $(datadir)/vgabios-cirrus.bin \
637f6cd7 432 $(datadir)/ppc_rom.bin \
d5295253 433 $(datadir)/video.x \
0986ac3b 434 $(datadir)/openbios-sparc32 \
938255d2 435 $(datadir)/openbios-sparc64 \
e5d01b06 436 $(datadir)/openbios-ppc \
40e8a53b 437 $(datadir)/pxe-ne2k_pci.bin \
19c80e50 438 $(datadir)/pxe-rtl8139.bin \
40e8a53b 439 $(datadir)/pxe-pcnet.bin \
2991990b 440 $(datadir)/pxe-e1000.bin \
1f50f8d1
FB
441 $(docdir)/qemu-doc.html \
442 $(docdir)/qemu-tech.html \
40e8a53b
AJ
443 $(mandir)/man1/qemu.1 \
444 $(mandir)/man1/qemu-img.1 \
7a5ca864 445 $(mandir)/man8/qemu-nbd.8
d691f669 446
4fb240a4 447# Include automatically generated dependency files
019d6b8f 448-include $(wildcard *.d audio/*.d slirp/*.d block/*.d)