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