]> git.proxmox.com Git - qemu.git/blame - Makefile
typo
[qemu.git] / Makefile
CommitLineData
ad064840 1include config-host.mak
766a487a 2
ad064840 3CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I.
83fb7adf
FB
4ifdef CONFIG_DARWIN
5CFLAGS+= -mdynamic-no-pic
6endif
31e31b8a 7LDFLAGS=-g
766a487a 8LIBS=
d5249393 9DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
e35c55fe 10TOOLS=qemu-img$(EXESUF)
1f50f8d1
FB
11ifdef CONFIG_STATIC
12LDFLAGS+=-static
13endif
cc8ae6de 14ifdef BUILD_DOCS
acd935ef 15DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
cc8ae6de
PB
16else
17DOCS=
18endif
aa05ae6f 19
8d5f07fa 20all: dyngen$(EXESUF) $(TOOLS) $(DOCS)
626df76a 21 for d in $(TARGET_DIRS); do \
7d3505c5 22 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 23 done
33e3963e 24
de167e41 25qemu-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
b932caba 26 $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS)
47cea614 27
11d9f695
FB
28dyngen$(EXESUF): dyngen.c
29 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
31e31b8a
FB
30
31clean:
2d80ae89
FB
32# avoid old build problems by removing potentially incorrect old files
33 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 34 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~
7d3505c5 35 $(MAKE) -C tests clean
626df76a 36 for d in $(TARGET_DIRS); do \
7d3505c5 37 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 38 done
31e31b8a 39
7d13299d 40distclean: clean
cc8ae6de 41 rm -f config-host.mak config-host.h $(DOCS)
76bc6838 42 for d in $(TARGET_DIRS); do \
bc1b050d 43 rm -rf $$d || exit 1 ; \
76bc6838 44 done
7d13299d 45
fed4a9ad
FB
46KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
47ar de en-us fi fr-be hr it lv nl pl ru th \
48common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
49
626df76a 50install: all
1236cab7 51 mkdir -p "$(DESTDIR)$(bindir)"
6a882643 52 $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
1236cab7 53 mkdir -p "$(DESTDIR)$(datadir)"
ad064840
PB
54 for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
55 video.x proll.elf linux_boot.bin; do \
6a882643 56 $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
ad064840 57 done
1236cab7 58 mkdir -p "$(DESTDIR)$(docdir)"
6a882643 59 $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
11d9f695 60ifndef CONFIG_WIN32
1236cab7 61 mkdir -p "$(DESTDIR)$(mandir)/man1"
6a882643 62 $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
1236cab7 63 mkdir -p "$(DESTDIR)$(datadir)/keymaps"
ad064840 64 for x in $(KEYMAPS); do \
6a882643 65 $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
ad064840 66 done
11d9f695 67endif
626df76a 68 for d in $(TARGET_DIRS); do \
7d3505c5 69 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 70 done
612384d7 71
367e86e8 72# various test targets
82c7e2a4 73test speed test2: all
7d3505c5 74 $(MAKE) -C tests $@
31e31b8a 75
367e86e8 76TAGS:
b9adb4a6 77 etags *.[ch] tests/*.[ch]
31e31b8a 78
6688bc6d
FB
79cscope:
80 rm -f ./cscope.*
81 find . -name "*.[ch]" -print > ./cscope.files
82 cscope -b
83
3ef693a0 84# documentation
1f673135 85%.html: %.texi
3ef693a0
FB
86 texi2html -monolithic -number $<
87
5a67135a 88qemu.1: qemu-doc.texi
ad064840 89 $(SRC_PATH)/texi2pod.pl $< qemu.pod
5a67135a
FB
90 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
91
acd935ef 92qemu-img.1: qemu-img.texi
ad064840 93 $(SRC_PATH)/texi2pod.pl $< qemu-img.pod
acd935ef
FB
94 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
95
1e43adfc 96FILE=qemu-$(shell cat VERSION)
586314f2 97
1e43adfc 98# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
99tar:
100 rm -rf /tmp/$(FILE)
1e43adfc 101 cp -r . /tmp/$(FILE)
76b62fd0 102 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
586314f2
FB
103 rm -rf /tmp/$(FILE)
104
76b62fd0 105# generate a binary distribution
d691f669 106tarbin:
76b62fd0 107 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
43095f31 108 $(bindir)/qemu \
7efa4387 109 $(bindir)/qemu-system-ppc \
acd935ef 110 $(bindir)/qemu-system-sparc \
43095f31 111 $(bindir)/qemu-system-x86_64 \
93856aac 112 $(bindir)/qemu-system-mips \
38260998 113 $(bindir)/qemu-system-mipsel \
ea31eb5b 114 $(bindir)/qemu-system-arm \
7efa4387
FB
115 $(bindir)/qemu-i386 \
116 $(bindir)/qemu-arm \
ea31eb5b 117 $(bindir)/qemu-armeb \
7efa4387
FB
118 $(bindir)/qemu-sparc \
119 $(bindir)/qemu-ppc \
ea31eb5b
FB
120 $(bindir)/qemu-mips \
121 $(bindir)/qemu-mipsel \
b932caba 122 $(bindir)/qemu-img \
7efa4387
FB
123 $(datadir)/bios.bin \
124 $(datadir)/vgabios.bin \
de9258a8 125 $(datadir)/vgabios-cirrus.bin \
637f6cd7 126 $(datadir)/ppc_rom.bin \
d5295253 127 $(datadir)/video.x \
e80cfcfc 128 $(datadir)/proll.elf \
7efa4387 129 $(datadir)/linux_boot.bin \
1f50f8d1
FB
130 $(docdir)/qemu-doc.html \
131 $(docdir)/qemu-tech.html \
acd935ef 132 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 )
d691f669 133
31e31b8a
FB
134ifneq ($(wildcard .depend),)
135include .depend
136endif