3 include config-host.mak
5 .PHONY
: all clean distclean dvi info install install-doc
tar tarbin \
6 speed
test test2 html
dvi info
11 BASE_CFLAGS
+= $(OS_CFLAGS
)
13 BASE_CFLAGS
+= -mcpu
=ultrasparc
15 CPPFLAGS
+= -I.
-D_GNU_SOURCE
-D_FILE_OFFSET_BITS
=64 -D_LARGEFILE_SOURCE
17 TOOLS
=qemu-img
$(EXESUF
)
19 BASE_LDFLAGS
+= -static
22 DOCS
=qemu-doc.html qemu-tech.html qemu
.1 qemu-img
.1
35 all: $(TOOLS
) $(DOCS
) recurse-all
37 subdir-
%: dyngen
$(EXESUF
)
38 $(MAKE
) -C
$(subst subdir-
,,$@
) all
40 recurse-all
: $(patsubst %,subdir-
%, $(TARGET_DIRS
))
42 qemu-img
$(EXESUF
): qemu-img.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c
43 $(CC
) -DQEMU_TOOL
$(CFLAGS
) $(CPPFLAGS
) $(BASE_CFLAGS
) $(LDFLAGS
) $(BASE_LDFLAGS
) -o
$@
$^
-lz
$(LIBS
)
45 dyngen
$(EXESUF
): dyngen.c
46 $(HOST_CC
) $(CFLAGS
) $(CPPFLAGS
) $(BASE_CFLAGS
) -o
$@
$^
49 # avoid old build problems by removing potentially incorrect old files
50 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
51 rm -f
*.o
*.a
$(TOOLS
) dyngen
$(EXESUF
) TAGS
*.pod
*~
*/*~
52 $(MAKE
) -C tests
clean
53 for d in
$(TARGET_DIRS
); do \
54 $(MAKE
) -C
$$d $@ || exit
1 ; \
58 rm -f config-host.mak config-host.h
$(DOCS
)
59 rm -f qemu-
{doc
,tech
}.
{info,aux
,cp
,dvi,fn
,info,ky
,log
,pg
,toc
,tp
,vr
}
60 for d in
$(TARGET_DIRS
); do \
61 rm -rf
$$d || exit
1 ; \
64 KEYMAPS
=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
65 ar de en-us fi fr-be hr it lv nl pl ru th \
66 common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
69 mkdir
-p
"$(DESTDIR)$(docdir)"
70 $(INSTALL
) -m
644 qemu-doc.html qemu-tech.html
"$(DESTDIR)$(docdir)"
72 mkdir
-p
"$(DESTDIR)$(mandir)/man1"
73 $(INSTALL
) qemu
.1 qemu-img
.1 "$(DESTDIR)$(mandir)/man1"
76 install: all $(if
$(BUILD_DOCS
),install-doc
)
77 mkdir
-p
"$(DESTDIR)$(bindir)"
78 $(INSTALL
) -m
755 $(TOOLS
) "$(DESTDIR)$(bindir)"
79 mkdir
-p
"$(DESTDIR)$(datadir)"
80 for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
81 video.x openbios-sparc32 linux_boot.bin pxe-ne2k_pci.bin \
82 pxe-rtl8139.bin pxe-pcnet.bin
; do \
83 $(INSTALL
) -m
644 $(SRC_PATH
)/pc-bios
/$$x "$(DESTDIR)$(datadir)"; \
86 mkdir
-p
"$(DESTDIR)$(datadir)/keymaps"
87 for x in
$(KEYMAPS
); do \
88 $(INSTALL
) -m
644 $(SRC_PATH
)/keymaps
/$$x "$(DESTDIR)$(datadir)/keymaps"; \
91 for d in
$(TARGET_DIRS
); do \
92 $(MAKE
) -C
$$d $@ || exit
1 ; \
95 # various test targets
100 etags
*.
[ch
] tests
/*.
[ch
]
104 find .
-name
"*.[ch]" -print > .
/cscope.files
109 texi2html
-monolithic
-number
$<
117 qemu
.1: qemu-doc.texi
118 $(SRC_PATH
)/texi2pod.pl
$< qemu.pod
119 pod2man
--section
=1 --center
=" " --release
=" " qemu.pod
> $@
121 qemu-img
.1: qemu-img.texi
122 $(SRC_PATH
)/texi2pod.pl
$< qemu-img.pod
123 pod2man
--section
=1 --center
=" " --release
=" " qemu-img.pod
> $@
125 info: qemu-doc.
info qemu-tech.
info
127 dvi: qemu-doc.
dvi qemu-tech.
dvi
129 html
: qemu-doc.html qemu-tech.html
131 VERSION ?
= $(shell cat VERSION
)
132 FILE
= qemu-
$(VERSION
)
134 # tar release (use 'make -k tar' on a checkouted tree)
138 ( cd
/tmp
; tar zcvf ~
/$(FILE
).
tar.gz
$(FILE
) --exclude CVS
)
141 # generate a binary distribution
143 ( cd
/ ; tar zcvf ~
/qemu-
$(VERSION
)-i386.
tar.gz \
145 $(bindir)/qemu-system-ppc \
146 $(bindir)/qemu-system-sparc \
147 $(bindir)/qemu-system-x86_64 \
148 $(bindir)/qemu-system-mips \
149 $(bindir)/qemu-system-mipsel \
150 $(bindir)/qemu-system-arm \
151 $(bindir)/qemu-i386 \
153 $(bindir)/qemu-armeb \
154 $(bindir)/qemu-sparc \
156 $(bindir)/qemu-mips \
157 $(bindir)/qemu-mipsel \
159 $(datadir)/bios.bin \
160 $(datadir)/vgabios.bin \
161 $(datadir)/vgabios-cirrus.bin \
162 $(datadir)/ppc_rom.bin \
164 $(datadir)/openbios-sparc32 \
165 $(datadir)/linux_boot.bin \
166 $(datadir)/pxe-ne2k_pci.bin \
167 $(datadir)/pxe-rtl8139.bin \
168 $(datadir)/pxe-pcnet.bin \
169 $(docdir
)/qemu-doc.html \
170 $(docdir
)/qemu-tech.html \
171 $(mandir)/man1
/qemu
.1 $(mandir)/man1
/qemu-img
.1 )
173 ifneq ($(wildcard .depend
),)