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 subdir-
%: dyngen
$(EXESUF
)
21 $(MAKE
) -C
$(subst subdir-
,,$@
) all
23 recurse-all
: $(patsubst %,subdir-
%, $(TARGET_DIRS
))
25 all: $(TOOLS
) $(DOCS
) recurse-all
27 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
28 $(CC
) -DQEMU_TOOL
$(CFLAGS
) $(LDFLAGS
) $(DEFINES
) -o
$@
$^
-lz
$(LIBS
)
30 dyngen
$(EXESUF
): dyngen.c
31 $(HOST_CC
) $(CFLAGS
) $(DEFINES
) -o
$@
$^
34 # avoid old build problems by removing potentially incorrect old files
35 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
36 rm -f
*.o
*.a
$(TOOLS
) dyngen
$(EXESUF
) TAGS
*.pod
*~
*/*~
37 $(MAKE
) -C tests
clean
38 for d in
$(TARGET_DIRS
); do \
39 $(MAKE
) -C
$$d $@ || exit
1 ; \
43 rm -f config-host.mak config-host.h
$(DOCS
)
44 for d in
$(TARGET_DIRS
); do \
45 rm -rf
$$d || exit
1 ; \
48 KEYMAPS
=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
49 ar de en-us fi fr-be hr it lv nl pl ru th \
50 common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
53 mkdir
-p
"$(DESTDIR)$(docdir)"
54 $(INSTALL
) -m
644 qemu-doc.html qemu-tech.html
"$(DESTDIR)$(docdir)"
56 mkdir
-p
"$(DESTDIR)$(mandir)/man1"
57 $(INSTALL
) qemu
.1 qemu-img
.1 "$(DESTDIR)$(mandir)/man1"
60 install: all $(if
$(BUILD_DOCS
),install-doc
)
61 mkdir
-p
"$(DESTDIR)$(bindir)"
62 $(INSTALL
) -m
755 -s
$(TOOLS
) "$(DESTDIR)$(bindir)"
63 mkdir
-p
"$(DESTDIR)$(datadir)"
64 for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
65 video.x proll.elf linux_boot.bin
; do \
66 $(INSTALL
) -m
644 $(SRC_PATH
)/pc-bios
/$$x "$(DESTDIR)$(datadir)"; \
69 mkdir
-p
"$(DESTDIR)$(datadir)/keymaps"
70 for x in
$(KEYMAPS
); do \
71 $(INSTALL
) -m
644 $(SRC_PATH
)/keymaps
/$$x "$(DESTDIR)$(datadir)/keymaps"; \
74 for d in
$(TARGET_DIRS
); do \
75 $(MAKE
) -C
$$d $@ || exit
1 ; \
78 # various test targets
83 etags
*.
[ch
] tests
/*.
[ch
]
87 find .
-name
"*.[ch]" -print > .
/cscope.files
92 texi2html
-monolithic
-number
$<
100 qemu
.1: qemu-doc.texi
101 $(SRC_PATH
)/texi2pod.pl
$< qemu.pod
102 pod2man
--section
=1 --center
=" " --release
=" " qemu.pod
> $@
104 qemu-img
.1: qemu-img.texi
105 $(SRC_PATH
)/texi2pod.pl
$< qemu-img.pod
106 pod2man
--section
=1 --center
=" " --release
=" " qemu-img.pod
> $@
108 FILE
=qemu-
$(shell cat VERSION
)
110 # tar release (use 'make -k tar' on a checkouted tree)
114 ( cd
/tmp
; tar zcvf ~
/$(FILE
).
tar.gz
$(FILE
) --exclude CVS
)
117 # generate a binary distribution
119 ( cd
/ ; tar zcvf ~
/qemu-
$(VERSION
)-i386.
tar.gz \
121 $(bindir)/qemu-system-ppc \
122 $(bindir)/qemu-system-sparc \
123 $(bindir)/qemu-system-x86_64 \
124 $(bindir)/qemu-system-mips \
125 $(bindir)/qemu-system-mipsel \
126 $(bindir)/qemu-system-arm \
127 $(bindir)/qemu-i386 \
129 $(bindir)/qemu-armeb \
130 $(bindir)/qemu-sparc \
132 $(bindir)/qemu-mips \
133 $(bindir)/qemu-mipsel \
135 $(datadir)/bios.bin \
136 $(datadir)/vgabios.bin \
137 $(datadir)/vgabios-cirrus.bin \
138 $(datadir)/ppc_rom.bin \
140 $(datadir)/proll.elf \
141 $(datadir)/linux_boot.bin \
142 $(docdir
)/qemu-doc.html \
143 $(docdir
)/qemu-tech.html \
144 $(mandir)/man1
/qemu
.1 $(mandir)/man1
/qemu-img
.1 )
146 ifneq ($(wildcard .depend
),)