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