]>
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 | |
1f673135 | 14 | all: dyngen$(EXESUF) $(TOOLS) qemu-doc.html qemu-tech.html qemu.1 |
626df76a FB |
15 | for d in $(TARGET_DIRS); do \ |
16 | make -C $$d $@ || exit 1 ; \ | |
17 | done | |
33e3963e | 18 | |
11d9f695 FB |
19 | qemu-mkcow: qemu-mkcow.c |
20 | $(CC) $(CFLAGS) $(DEFINES) -o $@ $^ $(LIBS) | |
de83cd02 | 21 | |
11d9f695 FB |
22 | dyngen$(EXESUF): dyngen.c |
23 | $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^ | |
31e31b8a FB |
24 | |
25 | clean: | |
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 | 34 | distclean: 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 | 40 | install: all |
11d9f695 FB |
41 | mkdir -p "$(bindir)" |
42 | ifndef CONFIG_WIN32 | |
43 | install -m 755 -s $(TOOLS) "$(bindir)" | |
44 | endif | |
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)" |
48 | ifndef CONFIG_WIN32 | |
49 | mkdir -p "$(mandir)/man1" | |
50 | install qemu.1 qemu-mkcow.1 "$(mandir)/man1" | |
51 | endif | |
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 | 57 | test speed test2: all |
367e86e8 | 58 | make -C tests $@ |
31e31b8a | 59 | |
367e86e8 | 60 | TAGS: |
b9adb4a6 | 61 | etags *.[ch] tests/*.[ch] |
31e31b8a | 62 | |
3ef693a0 | 63 | # documentation |
1f673135 | 64 | %.html: %.texi |
3ef693a0 FB |
65 | texi2html -monolithic -number $< |
66 | ||
5a67135a FB |
67 | qemu.1: qemu-doc.texi |
68 | ./texi2pod.pl $< qemu.pod | |
69 | pod2man --section=1 --center=" " --release=" " qemu.pod > $@ | |
70 | ||
1e43adfc | 71 | FILE=qemu-$(shell cat VERSION) |
586314f2 | 72 | |
1e43adfc | 73 | # tar release (use 'make -k tar' on a checkouted tree) |
586314f2 FB |
74 | tar: |
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 | 81 | tarbin: |
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 |
92 | ifneq ($(wildcard .depend),) |
93 | include .depend | |
94 | endif |