]> git.proxmox.com Git - mirror_qemu.git/blame - Makefile
bitblt fix (aka Solaris display fix)
[mirror_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
8d5f07fa 17DOCS=qemu-doc.html qemu-tech.html qemu.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
8d5f07fa 33 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS qemu.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"
60 install qemu.1 qemu-mkcow.1 "$(mandir)/man1"
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
1e43adfc 81FILE=qemu-$(shell cat VERSION)
586314f2 82
1e43adfc 83# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
84tar:
85 rm -rf /tmp/$(FILE)
1e43adfc 86 cp -r . /tmp/$(FILE)
76b62fd0 87 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
586314f2
FB
88 rm -rf /tmp/$(FILE)
89
76b62fd0 90# generate a binary distribution
d691f669 91tarbin:
76b62fd0 92 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
7efa4387
FB
93 $(bindir)/qemu $(bindir)/qemu-fast \
94 $(bindir)/qemu-system-ppc \
95 $(bindir)/qemu-i386 \
96 $(bindir)/qemu-arm \
97 $(bindir)/qemu-sparc \
98 $(bindir)/qemu-ppc \
b932caba 99 $(bindir)/qemu-img \
7efa4387
FB
100 $(datadir)/bios.bin \
101 $(datadir)/vgabios.bin \
de9258a8 102 $(datadir)/vgabios-cirrus.bin \
637f6cd7 103 $(datadir)/ppc_rom.bin \
8d5f07fa 104 $(datadir)/proll.bin \
7efa4387 105 $(datadir)/linux_boot.bin \
1f50f8d1
FB
106 $(docdir)/qemu-doc.html \
107 $(docdir)/qemu-tech.html \
108 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-mkcow.1 )
d691f669 109
31e31b8a
FB
110ifneq ($(wildcard .depend),)
111include .depend
112endif