doc update - added qemu-img manual page
[qemu.git] / Makefile
CommitLineData
8d5f07fa 1-include config-host.mak
766a487a 2
d5249393 3CFLAGS=-Wall -O2 -g -fno-strict-aliasing
83fb7adf
FB
4ifdef CONFIG_DARWIN
5CFLAGS+= -mdynamic-no-pic
6endif
67b915a5
FB
7ifdef CONFIG_WIN32
8CFLAGS+=-fpack-struct
9endif
31e31b8a 10LDFLAGS=-g
766a487a 11LIBS=
d5249393 12DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
b932caba 13TOOLS=qemu-img
1f50f8d1
FB
14ifdef CONFIG_STATIC
15LDFLAGS+=-static
16endif
acd935ef 17DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
aa05ae6f 18
8d5f07fa 19all: dyngen$(EXESUF) $(TOOLS) $(DOCS)
626df76a 20 for d in $(TARGET_DIRS); do \
7d3505c5 21 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 22 done
33e3963e 23
3c56521b 24qemu-img: qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c
b932caba 25 $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
47cea614 26
11d9f695
FB
27dyngen$(EXESUF): dyngen.c
28 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
31e31b8a
FB
29
30clean:
2d80ae89
FB
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
acd935ef 33 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
7d3505c5 34 $(MAKE) -C tests clean
626df76a 35 for d in $(TARGET_DIRS); do \
7d3505c5 36 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 37 done
31e31b8a 38
7d13299d 39distclean: clean
c72a345f 40 rm -f config-host.mak config-host.h
76bc6838 41 for d in $(TARGET_DIRS); do \
bc1b050d 42 rm -rf $$d || exit 1 ; \
76bc6838 43 done
7d13299d 44
626df76a 45install: all
11d9f695
FB
46 mkdir -p "$(bindir)"
47ifndef CONFIG_WIN32
48 install -m 755 -s $(TOOLS) "$(bindir)"
49endif
7efa4387 50 mkdir -p "$(datadir)"
a735aa31 51 install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
de9258a8 52 pc-bios/vgabios-cirrus.bin \
637f6cd7 53 pc-bios/ppc_rom.bin \
8d5f07fa 54 pc-bios/proll.bin \
7efa4387 55 pc-bios/linux_boot.bin "$(datadir)"
1f50f8d1
FB
56 mkdir -p "$(docdir)"
57 install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
11d9f695
FB
58ifndef CONFIG_WIN32
59 mkdir -p "$(mandir)/man1"
acd935ef 60 install qemu.1 qemu-img.1 "$(mandir)/man1"
11d9f695 61endif
626df76a 62 for d in $(TARGET_DIRS); do \
7d3505c5 63 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 64 done
612384d7 65
367e86e8 66# various test targets
82c7e2a4 67test speed test2: all
7d3505c5 68 $(MAKE) -C tests $@
31e31b8a 69
367e86e8 70TAGS:
b9adb4a6 71 etags *.[ch] tests/*.[ch]
31e31b8a 72
3ef693a0 73# documentation
1f673135 74%.html: %.texi
3ef693a0
FB
75 texi2html -monolithic -number $<
76
5a67135a
FB
77qemu.1: qemu-doc.texi
78 ./texi2pod.pl $< qemu.pod
79 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
80
acd935ef
FB
81qemu-img.1: qemu-img.texi
82 ./texi2pod.pl $< qemu-img.pod
83 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
84
1e43adfc 85FILE=qemu-$(shell cat VERSION)
586314f2 86
1e43adfc 87# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
88tar:
89 rm -rf /tmp/$(FILE)
1e43adfc 90 cp -r . /tmp/$(FILE)
76b62fd0 91 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
586314f2
FB
92 rm -rf /tmp/$(FILE)
93
76b62fd0 94# generate a binary distribution
d691f669 95tarbin:
76b62fd0 96 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
7efa4387
FB
97 $(bindir)/qemu $(bindir)/qemu-fast \
98 $(bindir)/qemu-system-ppc \
acd935ef 99 $(bindir)/qemu-system-sparc \
7efa4387
FB
100 $(bindir)/qemu-i386 \
101 $(bindir)/qemu-arm \
102 $(bindir)/qemu-sparc \
103 $(bindir)/qemu-ppc \
b932caba 104 $(bindir)/qemu-img \
7efa4387
FB
105 $(datadir)/bios.bin \
106 $(datadir)/vgabios.bin \
de9258a8 107 $(datadir)/vgabios-cirrus.bin \
637f6cd7 108 $(datadir)/ppc_rom.bin \
8d5f07fa 109 $(datadir)/proll.bin \
7efa4387 110 $(datadir)/linux_boot.bin \
1f50f8d1
FB
111 $(docdir)/qemu-doc.html \
112 $(docdir)/qemu-tech.html \
acd935ef 113 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 )
d691f669 114
31e31b8a
FB
115ifneq ($(wildcard .depend),)
116include .depend
117endif
This page took 0.098283 seconds and 4 git commands to generate.