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