1 -include config-host.mak
3 CFLAGS
=-Wall
-O2
-g
-fno-strict-aliasing
5 CFLAGS
+= -mdynamic-no-pic
12 DEFINES
+=-D_GNU_SOURCE
-D_FILE_OFFSET_BITS
=64 -D_LARGEFILE_SOURCE
13 TOOLS
=qemu-img
$(EXESUF
)
17 DOCS
=qemu-doc.html qemu-tech.html qemu
.1 qemu-img
.1
19 all: dyngen
$(EXESUF
) $(TOOLS
) $(DOCS
)
20 for d in
$(TARGET_DIRS
); do \
21 $(MAKE
) -C
$$d $@ || exit
1 ; \
24 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
25 $(CC
) -DQEMU_TOOL
$(CFLAGS
) $(LDFLAGS
) $(DEFINES
) -o
$@
$^
-lz
$(LIBS
)
27 dyngen
$(EXESUF
): dyngen.c
28 $(HOST_CC
) $(CFLAGS
) $(DEFINES
) -o
$@
$^
31 # avoid old build problems by removing potentially incorrect old files
32 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
33 rm -f
*.o
*.a
$(TOOLS
) dyngen
$(EXESUF
) TAGS
*.pod
*~
*/*~
34 $(MAKE
) -C tests
clean
35 for d in
$(TARGET_DIRS
); do \
36 $(MAKE
) -C
$$d $@ || exit
1 ; \
40 rm -f config-host.mak config-host.h
41 for d in
$(TARGET_DIRS
); do \
42 rm -rf
$$d || exit
1 ; \
47 install -m
755 -s
$(TOOLS
) "$(bindir)"
49 install -m
644 pc-bios
/bios.bin pc-bios
/vgabios.bin \
50 pc-bios
/vgabios-cirrus.bin \
53 pc-bios
/linux_boot.bin
"$(datadir)"
55 install -m
644 qemu-doc.html qemu-tech.html
"$(docdir)"
57 mkdir
-p
"$(mandir)/man1"
58 install qemu
.1 qemu-img
.1 "$(mandir)/man1"
59 mkdir
-p
"$(datadir)/keymaps"
60 install -m
644 keymaps
/* "$(datadir)"
62 for d in
$(TARGET_DIRS
); do \
63 $(MAKE
) -C
$$d $@ || exit
1 ; \
66 # various test targets
71 etags
*.
[ch
] tests
/*.
[ch
]
75 texi2html
-monolithic
-number
$<
78 .
/texi2pod.pl
$< qemu.pod
79 pod2man
--section
=1 --center
=" " --release
=" " qemu.pod
> $@
81 qemu-img
.1: qemu-img.texi
82 .
/texi2pod.pl
$< qemu-img.pod
83 pod2man
--section
=1 --center
=" " --release
=" " qemu-img.pod
> $@
85 FILE
=qemu-
$(shell cat VERSION
)
87 # tar release (use 'make -k tar' on a checkouted tree)
91 ( cd
/tmp
; tar zcvf ~
/$(FILE
).
tar.gz
$(FILE
) --exclude CVS
)
94 # generate a binary distribution
96 ( cd
/ ; tar zcvf ~
/qemu-
$(VERSION
)-i386.
tar.gz \
97 $(bindir)/qemu
$(bindir)/qemu-fast \
98 $(bindir)/qemu-system-ppc \
99 $(bindir)/qemu-system-sparc \
100 $(bindir)/qemu-i386 \
102 $(bindir)/qemu-sparc \
105 $(datadir)/bios.bin \
106 $(datadir)/vgabios.bin \
107 $(datadir)/vgabios-cirrus.bin \
108 $(datadir)/ppc_rom.bin \
109 $(datadir)/proll.bin \
110 $(datadir)/linux_boot.bin \
111 $(docdir
)/qemu-doc.html \
112 $(docdir
)/qemu-tech.html \
113 $(mandir)/man1
/qemu
.1 $(mandir)/man1
/qemu-img
.1 )
115 ifneq ($(wildcard .depend
),)