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