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