1 include config-host.mak
3 CFLAGS
=-Wall
-O2
-g
-fno-strict-aliasing
-I.
5 CFLAGS
+= -mdynamic-no-pic
9 DEFINES
+=-D_GNU_SOURCE
-D_FILE_OFFSET_BITS
=64 -D_LARGEFILE_SOURCE
10 TOOLS
=qemu-img
$(EXESUF
)
15 DOCS
=qemu-doc.html qemu-tech.html qemu
.1 qemu-img
.1
20 all: dyngen
$(EXESUF
) $(TOOLS
) $(DOCS
)
21 for d in
$(TARGET_DIRS
); do \
22 $(MAKE
) -C
$$d $@ || exit
1 ; \
25 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 block-vvfat.c
26 $(CC
) -DQEMU_TOOL
$(CFLAGS
) $(LDFLAGS
) $(DEFINES
) -o
$@
$^
-lz
$(LIBS
)
28 dyngen
$(EXESUF
): dyngen.c
29 $(HOST_CC
) $(CFLAGS
) $(DEFINES
) -o
$@
$^
32 # avoid old build problems by removing potentially incorrect old files
33 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
34 rm -f
*.o
*.a
$(TOOLS
) dyngen
$(EXESUF
) TAGS
*.pod
*~
*/*~
35 $(MAKE
) -C tests
clean
36 for d in
$(TARGET_DIRS
); do \
37 $(MAKE
) -C
$$d $@ || exit
1 ; \
41 rm -f config-host.mak config-host.h
$(DOCS
)
42 for d in
$(TARGET_DIRS
); do \
43 rm -rf
$$d || exit
1 ; \
46 KEYMAPS
=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
47 ar de en-us fi fr-be hr it lv nl pl ru th \
48 common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
51 mkdir
-p
"$(DESTDIR)$(bindir)"
52 $(INSTALL
) -m
755 -s
$(TOOLS
) "$(DESTDIR)$(bindir)"
53 mkdir
-p
"$(DESTDIR)$(datadir)"
54 for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
55 video.x proll.elf linux_boot.bin
; do \
56 $(INSTALL
) -m
644 $(SRC_PATH
)/pc-bios
/$$x "$(DESTDIR)$(datadir)"; \
58 mkdir
-p
"$(DESTDIR)$(docdir)"
59 $(INSTALL
) -m
644 qemu-doc.html qemu-tech.html
"$(DESTDIR)$(docdir)"
61 mkdir
-p
"$(DESTDIR)$(mandir)/man1"
62 $(INSTALL
) qemu
.1 qemu-img
.1 "$(DESTDIR)$(mandir)/man1"
63 mkdir
-p
"$(DESTDIR)$(datadir)/keymaps"
64 for x in
$(KEYMAPS
); do \
65 $(INSTALL
) -m
644 $(SRC_PATH
)/keymaps
/$$x "$(DESTDIR)$(datadir)/keymaps"; \
68 for d in
$(TARGET_DIRS
); do \
69 $(MAKE
) -C
$$d $@ || exit
1 ; \
72 # various test targets
77 etags
*.
[ch
] tests
/*.
[ch
]
81 find .
-name
"*.[ch]" -print > .
/cscope.files
86 texi2html
-monolithic
-number
$<
89 $(SRC_PATH
)/texi2pod.pl
$< qemu.pod
90 pod2man
--section
=1 --center
=" " --release
=" " qemu.pod
> $@
92 qemu-img
.1: qemu-img.texi
93 $(SRC_PATH
)/texi2pod.pl
$< qemu-img.pod
94 pod2man
--section
=1 --center
=" " --release
=" " qemu-img.pod
> $@
96 FILE
=qemu-
$(shell cat VERSION
)
98 # tar release (use 'make -k tar' on a checkouted tree)
102 ( cd
/tmp
; tar zcvf ~
/$(FILE
).
tar.gz
$(FILE
) --exclude CVS
)
105 # generate a binary distribution
107 ( cd
/ ; tar zcvf ~
/qemu-
$(VERSION
)-i386.
tar.gz \
109 $(bindir)/qemu-system-ppc \
110 $(bindir)/qemu-system-sparc \
111 $(bindir)/qemu-system-x86_64 \
112 $(bindir)/qemu-system-mips \
113 $(bindir)/qemu-system-mipsel \
114 $(bindir)/qemu-system-arm \
115 $(bindir)/qemu-i386 \
117 $(bindir)/qemu-armeb \
118 $(bindir)/qemu-sparc \
120 $(bindir)/qemu-mips \
121 $(bindir)/qemu-mipsel \
123 $(datadir)/bios.bin \
124 $(datadir)/vgabios.bin \
125 $(datadir)/vgabios-cirrus.bin \
126 $(datadir)/ppc_rom.bin \
128 $(datadir)/proll.elf \
129 $(datadir)/linux_boot.bin \
130 $(docdir
)/qemu-doc.html \
131 $(docdir
)/qemu-tech.html \
132 $(mandir)/man1
/qemu
.1 $(mandir)/man1
/qemu-img
.1 )
134 ifneq ($(wildcard .depend
),)