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