1 -include config-host.mak
3 CFLAGS=-Wall -O2 -g -fno-strict-aliasing
5 CFLAGS+= -mdynamic-no-pic
9 DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
10 TOOLS=qemu-img$(EXESUF)
14 DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
16 all: dyngen$(EXESUF) $(TOOLS) $(DOCS)
17 for d in $(TARGET_DIRS); do \
18 $(MAKE) -C $$d $@ || exit 1 ; \
22 $(MAKE) -C kqemu -f Makefile.winnt
28 qemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c
29 $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
31 dyngen$(EXESUF): dyngen.c
32 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
35 # avoid old build problems by removing potentially incorrect old files
36 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
37 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
38 $(MAKE) -C tests clean
39 for d in $(TARGET_DIRS); do \
40 $(MAKE) -C $$d $@ || exit 1 ; \
43 $(MAKE) -C kqemu clean
47 rm -f config-host.mak config-host.h
48 for d in $(TARGET_DIRS); do \
49 rm -rf $$d || exit 1 ; \
52 KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
53 ar de en-us fi fr-be hr it lv nl pl ru th \
54 common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
58 install -m 755 -s $(TOOLS) "$(bindir)"
60 install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
61 pc-bios/vgabios-cirrus.bin \
64 pc-bios/linux_boot.bin "$(datadir)"
66 install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
68 mkdir -p "$(mandir)/man1"
69 install qemu.1 qemu-img.1 "$(mandir)/man1"
70 mkdir -p "$(datadir)/keymaps"
71 install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(datadir)/keymaps"
73 for d in $(TARGET_DIRS); do \
74 $(MAKE) -C $$d $@ || exit 1 ; \
77 cd kqemu ; ./install.sh
80 # various test targets
85 etags *.[ch] tests/*.[ch]
89 texi2html -monolithic -number $<
92 ./texi2pod.pl $< qemu.pod
93 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
95 qemu-img.1: qemu-img.texi
96 ./texi2pod.pl $< qemu-img.pod
97 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
99 FILE=qemu-$(shell cat VERSION)
101 # tar release (use 'make -k tar' on a checkouted tree)
105 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
108 # generate a binary distribution
110 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
112 $(bindir)/qemu-system-ppc \
113 $(bindir)/qemu-system-sparc \
114 $(bindir)/qemu-system-x86_64 \
115 $(bindir)/qemu-i386 \
117 $(bindir)/qemu-sparc \
120 $(datadir)/bios.bin \
121 $(datadir)/vgabios.bin \
122 $(datadir)/vgabios-cirrus.bin \
123 $(datadir)/ppc_rom.bin \
124 $(datadir)/proll.elf \
125 $(datadir)/linux_boot.bin \
126 $(docdir)/qemu-doc.html \
127 $(docdir)/qemu-tech.html \
128 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 )
130 ifneq ($(wildcard .depend),)