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