]> git.proxmox.com Git - qemu.git/blame - Makefile
history support (Jocelyn Mayer)
[qemu.git] / Makefile
CommitLineData
626df76a 1include config-host.mak
766a487a 2
7d13299d 3CFLAGS=-Wall -O2 -g
67b915a5
FB
4ifdef CONFIG_WIN32
5CFLAGS+=-fpack-struct
6endif
31e31b8a 7LDFLAGS=-g
766a487a 8LIBS=
0ecfa993 9DEFINES+=-D_GNU_SOURCE
67b915a5 10ifndef CONFIG_WIN32
1e43adfc 11TOOLS=qemu-mkcow
67b915a5 12endif
aa05ae6f 13
67b915a5 14all: dyngen$(EXESUF) $(TOOLS) qemu-doc.html qemu.1
626df76a
FB
15 for d in $(TARGET_DIRS); do \
16 make -C $$d $@ || exit 1 ; \
17 done
33e3963e 18
11d9f695
FB
19qemu-mkcow: qemu-mkcow.c
20 $(CC) $(CFLAGS) $(DEFINES) -o $@ $^ $(LIBS)
de83cd02 21
11d9f695
FB
22dyngen$(EXESUF): dyngen.c
23 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
31e31b8a
FB
24
25clean:
2d80ae89
FB
26# avoid old build problems by removing potentially incorrect old files
27 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
67b915a5 28 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS qemu.pod
68e73e39 29 make -C tests clean
626df76a
FB
30 for d in $(TARGET_DIRS); do \
31 make -C $$d $@ || exit 1 ; \
32 done
31e31b8a 33
7d13299d 34distclean: clean
2d80ae89 35 rm -f config-host.mak config-host.h
76bc6838 36 for d in $(TARGET_DIRS); do \
bc1b050d 37 rm -rf $$d || exit 1 ; \
76bc6838 38 done
7d13299d 39
626df76a 40install: all
11d9f695
FB
41 mkdir -p "$(bindir)"
42ifndef CONFIG_WIN32
43 install -m 755 -s $(TOOLS) "$(bindir)"
44endif
45 mkdir -p "$(sharedir)"
a735aa31 46 install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
11d9f695
FB
47 pc-bios/linux_boot.bin "$(sharedir)"
48ifndef CONFIG_WIN32
49 mkdir -p "$(mandir)/man1"
50 install qemu.1 qemu-mkcow.1 "$(mandir)/man1"
51endif
626df76a
FB
52 for d in $(TARGET_DIRS); do \
53 make -C $$d $@ || exit 1 ; \
54 done
612384d7 55
367e86e8 56# various test targets
82c7e2a4 57test speed test2: all
367e86e8 58 make -C tests $@
31e31b8a 59
367e86e8 60TAGS:
b9adb4a6 61 etags *.[ch] tests/*.[ch]
31e31b8a 62
3ef693a0
FB
63# documentation
64qemu-doc.html: qemu-doc.texi
65 texi2html -monolithic -number $<
66
5a67135a
FB
67qemu.1: qemu-doc.texi
68 ./texi2pod.pl $< qemu.pod
69 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
70
1e43adfc 71FILE=qemu-$(shell cat VERSION)
586314f2 72
1e43adfc 73# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
74tar:
75 rm -rf /tmp/$(FILE)
1e43adfc 76 cp -r . /tmp/$(FILE)
76b62fd0 77 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
586314f2
FB
78 rm -rf /tmp/$(FILE)
79
76b62fd0 80# generate a binary distribution
d691f669 81tarbin:
76b62fd0
FB
82 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
83 $(prefix)/bin/qemu $(prefix)/bin/qemu-fast \
84 $(prefix)/bin/qemu-i386 \
85 $(prefix)/bin/qemu-arm \
86 $(prefix)/bin/qemu-sparc \
c0637b37 87 $(prefix)/bin/qemu-ppc \
76b62fd0
FB
88 $(sharedir)/bios.bin \
89 $(sharedir)/vgabios.bin \
90 $(mandir)/man1/qemu.1 )
d691f669 91
31e31b8a
FB
92ifneq ($(wildcard .depend),)
93include .depend
94endif