]> git.proxmox.com Git - qemu.git/blame - Makefile
full system SPARC emulation (Blue Swirl)
[qemu.git] / Makefile
CommitLineData
626df76a 1include 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
aa05ae6f 17
1f673135 18all: dyngen$(EXESUF) $(TOOLS) qemu-doc.html qemu-tech.html qemu.1
626df76a 19 for d in $(TARGET_DIRS); do \
7d3505c5 20 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 21 done
33e3963e 22
3c56521b 23qemu-img: qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c
b932caba 24 $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
47cea614 25
11d9f695
FB
26dyngen$(EXESUF): dyngen.c
27 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
31e31b8a
FB
28
29clean:
2d80ae89
FB
30# avoid old build problems by removing potentially incorrect old files
31 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
67b915a5 32 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS qemu.pod
7d3505c5 33 $(MAKE) -C tests clean
626df76a 34 for d in $(TARGET_DIRS); do \
7d3505c5 35 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 36 done
31e31b8a 37
7d13299d 38distclean: clean
2d80ae89 39 rm -f config-host.mak config-host.h
76bc6838 40 for d in $(TARGET_DIRS); do \
bc1b050d 41 rm -rf $$d || exit 1 ; \
76bc6838 42 done
7d13299d 43
626df76a 44install: all
11d9f695
FB
45 mkdir -p "$(bindir)"
46ifndef CONFIG_WIN32
47 install -m 755 -s $(TOOLS) "$(bindir)"
48endif
7efa4387 49 mkdir -p "$(datadir)"
a735aa31 50 install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
de9258a8 51 pc-bios/vgabios-cirrus.bin \
637f6cd7 52 pc-bios/ppc_rom.bin \
7efa4387 53 pc-bios/linux_boot.bin "$(datadir)"
1f50f8d1
FB
54 mkdir -p "$(docdir)"
55 install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
11d9f695
FB
56ifndef CONFIG_WIN32
57 mkdir -p "$(mandir)/man1"
58 install qemu.1 qemu-mkcow.1 "$(mandir)/man1"
59endif
626df76a 60 for d in $(TARGET_DIRS); do \
7d3505c5 61 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 62 done
612384d7 63
367e86e8 64# various test targets
82c7e2a4 65test speed test2: all
7d3505c5 66 $(MAKE) -C tests $@
31e31b8a 67
367e86e8 68TAGS:
b9adb4a6 69 etags *.[ch] tests/*.[ch]
31e31b8a 70
3ef693a0 71# documentation
1f673135 72%.html: %.texi
3ef693a0
FB
73 texi2html -monolithic -number $<
74
5a67135a
FB
75qemu.1: qemu-doc.texi
76 ./texi2pod.pl $< qemu.pod
77 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
78
1e43adfc 79FILE=qemu-$(shell cat VERSION)
586314f2 80
1e43adfc 81# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
82tar:
83 rm -rf /tmp/$(FILE)
1e43adfc 84 cp -r . /tmp/$(FILE)
76b62fd0 85 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
586314f2
FB
86 rm -rf /tmp/$(FILE)
87
76b62fd0 88# generate a binary distribution
d691f669 89tarbin:
76b62fd0 90 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
7efa4387
FB
91 $(bindir)/qemu $(bindir)/qemu-fast \
92 $(bindir)/qemu-system-ppc \
93 $(bindir)/qemu-i386 \
94 $(bindir)/qemu-arm \
95 $(bindir)/qemu-sparc \
96 $(bindir)/qemu-ppc \
b932caba 97 $(bindir)/qemu-img \
7efa4387
FB
98 $(datadir)/bios.bin \
99 $(datadir)/vgabios.bin \
de9258a8 100 $(datadir)/vgabios-cirrus.bin \
637f6cd7 101 $(datadir)/ppc_rom.bin \
7efa4387 102 $(datadir)/linux_boot.bin \
1f50f8d1
FB
103 $(docdir)/qemu-doc.html \
104 $(docdir)/qemu-tech.html \
105 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-mkcow.1 )
d691f669 106
31e31b8a
FB
107ifneq ($(wildcard .depend),)
108include .depend
109endif