]> git.proxmox.com Git - qemu.git/blame - Makefile
SPARC merge
[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
585d0ed9 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
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
11d9f695 47 mkdir -p "$(bindir)"
11d9f695 48 install -m 755 -s $(TOOLS) "$(bindir)"
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 \
e80cfcfc 53 pc-bios/proll.elf \
7efa4387 54 pc-bios/linux_boot.bin "$(datadir)"
1f50f8d1
FB
55 mkdir -p "$(docdir)"
56 install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
11d9f695
FB
57ifndef CONFIG_WIN32
58 mkdir -p "$(mandir)/man1"
acd935ef 59 install qemu.1 qemu-img.1 "$(mandir)/man1"
3d11d0eb 60 mkdir -p "$(datadir)/keymaps"
fed4a9ad 61 install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(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
3ef693a0 74# documentation
1f673135 75%.html: %.texi
3ef693a0
FB
76 texi2html -monolithic -number $<
77
5a67135a
FB
78qemu.1: qemu-doc.texi
79 ./texi2pod.pl $< qemu.pod
80 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
81
acd935ef
FB
82qemu-img.1: qemu-img.texi
83 ./texi2pod.pl $< qemu-img.pod
84 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
85
1e43adfc 86FILE=qemu-$(shell cat VERSION)
586314f2 87
1e43adfc 88# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
89tar:
90 rm -rf /tmp/$(FILE)
1e43adfc 91 cp -r . /tmp/$(FILE)
76b62fd0 92 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
586314f2
FB
93 rm -rf /tmp/$(FILE)
94
76b62fd0 95# generate a binary distribution
d691f669 96tarbin:
76b62fd0 97 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
7efa4387
FB
98 $(bindir)/qemu $(bindir)/qemu-fast \
99 $(bindir)/qemu-system-ppc \
acd935ef 100 $(bindir)/qemu-system-sparc \
7efa4387
FB
101 $(bindir)/qemu-i386 \
102 $(bindir)/qemu-arm \
103 $(bindir)/qemu-sparc \
104 $(bindir)/qemu-ppc \
b932caba 105 $(bindir)/qemu-img \
7efa4387
FB
106 $(datadir)/bios.bin \
107 $(datadir)/vgabios.bin \
de9258a8 108 $(datadir)/vgabios-cirrus.bin \
637f6cd7 109 $(datadir)/ppc_rom.bin \
e80cfcfc 110 $(datadir)/proll.elf \
7efa4387 111 $(datadir)/linux_boot.bin \
1f50f8d1
FB
112 $(docdir)/qemu-doc.html \
113 $(docdir)/qemu-tech.html \
acd935ef 114 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 )
d691f669 115
31e31b8a
FB
116ifneq ($(wildcard .depend),)
117include .depend
118endif