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