root / Makefile @ 94cff60a
History | View | Annotate | Download (4.9 kB)
1 | 0cb3fb1e | pbrook | # Makefile for QEMU. |
---|---|---|---|
2 | 0cb3fb1e | pbrook | |
3 | ad064840 | pbrook | include config-host.mak |
4 | 766a487a | bellard | |
5 | 0cb3fb1e | pbrook | .PHONY: all clean distclean dvi info install install-doc tar tarbin \ |
6 | 0cb3fb1e | pbrook | speed test test2 html dvi info |
7 | 0cb3fb1e | pbrook | |
8 | 6f30fa85 | ths | BASE_CFLAGS= |
9 | 6f30fa85 | ths | BASE_LDFLAGS= |
10 | 6f30fa85 | ths | |
11 | 3142255c | blueswir1 | BASE_CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS) |
12 | 3142255c | blueswir1 | BASE_LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS) |
13 | 3142255c | blueswir1 | |
14 | 6f30fa85 | ths | CPPFLAGS += -I. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
15 | 766a487a | bellard | LIBS= |
16 | 1f50f8d1 | bellard | ifdef CONFIG_STATIC |
17 | 6f30fa85 | ths | BASE_LDFLAGS += -static |
18 | 1f50f8d1 | bellard | endif |
19 | cc8ae6de | pbrook | ifdef BUILD_DOCS |
20 | acd935ef | bellard | DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 |
21 | cc8ae6de | pbrook | else |
22 | cc8ae6de | pbrook | DOCS= |
23 | cc8ae6de | pbrook | endif |
24 | aa05ae6f | bellard | |
25 | 70956b77 | ths | LIBS+=$(AIOLIBS) |
26 | 83f64091 | bellard | |
27 | b9dea4fb | pbrook | all: $(TOOLS) $(DOCS) recurse-all |
28 | b9dea4fb | pbrook | |
29 | 4aa42531 | pbrook | subdir-%: dyngen$(EXESUF) |
30 | 4aa42531 | pbrook | $(MAKE) -C $(subst subdir-,,$@) all |
31 | 4aa42531 | pbrook | |
32 | 4aa42531 | pbrook | recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS)) |
33 | 83f64091 | bellard | |
34 | 6ada7453 | ths | qemu-img$(EXESUF): qemu-img.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c block-parallels.c |
35 | 6f30fa85 | ths | $(CC) -DQEMU_TOOL $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS) |
36 | 47cea614 | bellard | |
37 | 11d9f695 | bellard | dyngen$(EXESUF): dyngen.c |
38 | 6f30fa85 | ths | $(HOST_CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -o $@ $^ |
39 | 31e31b8a | bellard | |
40 | 31e31b8a | bellard | clean: |
41 | 2d80ae89 | bellard | # avoid old build problems by removing potentially incorrect old files |
42 | 5fafdf24 | ths | 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 |
43 | e5686953 | ths | rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS cscope.* *.pod *~ */*~ |
44 | 7d3505c5 | bellard | $(MAKE) -C tests clean |
45 | 626df76a | bellard | for d in $(TARGET_DIRS); do \ |
46 | 7d3505c5 | bellard | $(MAKE) -C $$d $@ || exit 1 ; \ |
47 | 626df76a | bellard | done |
48 | 31e31b8a | bellard | |
49 | 7d13299d | bellard | distclean: clean |
50 | cc8ae6de | pbrook | rm -f config-host.mak config-host.h $(DOCS) |
51 | 0cb3fb1e | pbrook | rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr} |
52 | 76bc6838 | bellard | for d in $(TARGET_DIRS); do \ |
53 | bc1b050d | bellard | rm -rf $$d || exit 1 ; \ |
54 | 76bc6838 | bellard | done |
55 | 7d13299d | bellard | |
56 | fed4a9ad | bellard | KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ |
57 | fed4a9ad | bellard | ar de en-us fi fr-be hr it lv nl pl ru th \ |
58 | fed4a9ad | bellard | common de-ch es fo fr-ca hu ja mk nl-be pt sl tr |
59 | fed4a9ad | bellard | |
60 | 38954dca | pbrook | install-doc: $(DOCS) |
61 | 38954dca | pbrook | mkdir -p "$(DESTDIR)$(docdir)" |
62 | 38954dca | pbrook | $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" |
63 | 38954dca | pbrook | ifndef CONFIG_WIN32 |
64 | 38954dca | pbrook | mkdir -p "$(DESTDIR)$(mandir)/man1" |
65 | 38954dca | pbrook | $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" |
66 | 38954dca | pbrook | endif |
67 | 38954dca | pbrook | |
68 | 38954dca | pbrook | install: all $(if $(BUILD_DOCS),install-doc) |
69 | 1236cab7 | pbrook | mkdir -p "$(DESTDIR)$(bindir)" |
70 | 6a882643 | pbrook | $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" |
71 | 1236cab7 | pbrook | mkdir -p "$(DESTDIR)$(datadir)" |
72 | ad064840 | pbrook | for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ |
73 | 860c6c52 | ths | video.x openbios-sparc32 pxe-ne2k_pci.bin \ |
74 | eec85c2a | ths | pxe-rtl8139.bin pxe-pcnet.bin; do \ |
75 | 6a882643 | pbrook | $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ |
76 | ad064840 | pbrook | done |
77 | 11d9f695 | bellard | ifndef CONFIG_WIN32 |
78 | 1236cab7 | pbrook | mkdir -p "$(DESTDIR)$(datadir)/keymaps" |
79 | ad064840 | pbrook | for x in $(KEYMAPS); do \ |
80 | 6a882643 | pbrook | $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \ |
81 | ad064840 | pbrook | done |
82 | 11d9f695 | bellard | endif |
83 | 626df76a | bellard | for d in $(TARGET_DIRS); do \ |
84 | 7d3505c5 | bellard | $(MAKE) -C $$d $@ || exit 1 ; \ |
85 | 626df76a | bellard | done |
86 | 612384d7 | bellard | |
87 | 367e86e8 | bellard | # various test targets |
88 | 82c7e2a4 | bellard | test speed test2: all |
89 | 7d3505c5 | bellard | $(MAKE) -C tests $@ |
90 | 31e31b8a | bellard | |
91 | 5fafdf24 | ths | TAGS: |
92 | b9adb4a6 | bellard | etags *.[ch] tests/*.[ch] |
93 | 31e31b8a | bellard | |
94 | 6688bc6d | bellard | cscope: |
95 | 6688bc6d | bellard | rm -f ./cscope.* |
96 | 6688bc6d | bellard | find . -name "*.[ch]" -print > ./cscope.files |
97 | 6688bc6d | bellard | cscope -b |
98 | 6688bc6d | bellard | |
99 | 3ef693a0 | bellard | # documentation |
100 | 1f673135 | bellard | %.html: %.texi |
101 | 3ef693a0 | bellard | texi2html -monolithic -number $< |
102 | 3ef693a0 | bellard | |
103 | f3548328 | bellard | %.info: %.texi |
104 | f3548328 | bellard | makeinfo $< -o $@ |
105 | f3548328 | bellard | |
106 | f3548328 | bellard | %.dvi: %.texi |
107 | f3548328 | bellard | texi2dvi $< |
108 | f3548328 | bellard | |
109 | 5a67135a | bellard | qemu.1: qemu-doc.texi |
110 | ad064840 | pbrook | $(SRC_PATH)/texi2pod.pl $< qemu.pod |
111 | 5a67135a | bellard | pod2man --section=1 --center=" " --release=" " qemu.pod > $@ |
112 | 5a67135a | bellard | |
113 | acd935ef | bellard | qemu-img.1: qemu-img.texi |
114 | ad064840 | pbrook | $(SRC_PATH)/texi2pod.pl $< qemu-img.pod |
115 | acd935ef | bellard | pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ |
116 | acd935ef | bellard | |
117 | 0cb3fb1e | pbrook | info: qemu-doc.info qemu-tech.info |
118 | 0cb3fb1e | pbrook | |
119 | 0cb3fb1e | pbrook | dvi: qemu-doc.dvi qemu-tech.dvi |
120 | 0cb3fb1e | pbrook | |
121 | 0cb3fb1e | pbrook | html: qemu-doc.html qemu-tech.html |
122 | 0cb3fb1e | pbrook | |
123 | df5cf721 | ths | VERSION ?= $(shell cat VERSION) |
124 | df5cf721 | ths | FILE = qemu-$(VERSION) |
125 | 586314f2 | bellard | |
126 | 1e43adfc | bellard | # tar release (use 'make -k tar' on a checkouted tree) |
127 | 586314f2 | bellard | tar: |
128 | 586314f2 | bellard | rm -rf /tmp/$(FILE) |
129 | 1e43adfc | bellard | cp -r . /tmp/$(FILE) |
130 | 76b62fd0 | bellard | ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS ) |
131 | 586314f2 | bellard | rm -rf /tmp/$(FILE) |
132 | 586314f2 | bellard | |
133 | 76b62fd0 | bellard | # generate a binary distribution |
134 | d691f669 | bellard | tarbin: |
135 | 4887d78b | ths | ( cd / ; tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \ |
136 | 43095f31 | bellard | $(bindir)/qemu \ |
137 | 7efa4387 | bellard | $(bindir)/qemu-system-ppc \ |
138 | d4082e95 | j_mayer | $(bindir)/qemu-system-ppc64 \ |
139 | d4082e95 | j_mayer | $(bindir)/qemu-system-ppcemb \ |
140 | acd935ef | bellard | $(bindir)/qemu-system-sparc \ |
141 | 43095f31 | bellard | $(bindir)/qemu-system-x86_64 \ |
142 | 93856aac | bellard | $(bindir)/qemu-system-mips \ |
143 | 38260998 | pbrook | $(bindir)/qemu-system-mipsel \ |
144 | fbe4f65b | ths | $(bindir)/qemu-system-mips64 \ |
145 | fbe4f65b | ths | $(bindir)/qemu-system-mips64el \ |
146 | ea31eb5b | bellard | $(bindir)/qemu-system-arm \ |
147 | ff1aaf65 | ths | $(bindir)/qemu-system-m68k \ |
148 | ff1aaf65 | ths | $(bindir)/qemu-system-sh4 \ |
149 | 7efa4387 | bellard | $(bindir)/qemu-i386 \ |
150 | 7efa4387 | bellard | $(bindir)/qemu-arm \ |
151 | ea31eb5b | bellard | $(bindir)/qemu-armeb \ |
152 | 7efa4387 | bellard | $(bindir)/qemu-sparc \ |
153 | 7efa4387 | bellard | $(bindir)/qemu-ppc \ |
154 | d4082e95 | j_mayer | $(bindir)/qemu-ppc64 \ |
155 | ea31eb5b | bellard | $(bindir)/qemu-mips \ |
156 | ea31eb5b | bellard | $(bindir)/qemu-mipsel \ |
157 | 540635ba | ths | $(bindir)/qemu-mipsn32 \ |
158 | 540635ba | ths | $(bindir)/qemu-mipsn32el \ |
159 | 540635ba | ths | $(bindir)/qemu-mips64 \ |
160 | 540635ba | ths | $(bindir)/qemu-mips64el \ |
161 | cf6c1b16 | j_mayer | $(bindir)/qemu-alpha \ |
162 | ff1aaf65 | ths | $(bindir)/qemu-m68k \ |
163 | ff1aaf65 | ths | $(bindir)/qemu-sh4 \ |
164 | b932caba | bellard | $(bindir)/qemu-img \ |
165 | 7efa4387 | bellard | $(datadir)/bios.bin \ |
166 | 7efa4387 | bellard | $(datadir)/vgabios.bin \ |
167 | de9258a8 | bellard | $(datadir)/vgabios-cirrus.bin \ |
168 | 637f6cd7 | bellard | $(datadir)/ppc_rom.bin \ |
169 | d5295253 | bellard | $(datadir)/video.x \ |
170 | 0986ac3b | bellard | $(datadir)/openbios-sparc32 \ |
171 | 19c80e50 | bellard | $(datadir)/pxe-ne2k_pci.bin \ |
172 | 19c80e50 | bellard | $(datadir)/pxe-rtl8139.bin \ |
173 | 19c80e50 | bellard | $(datadir)/pxe-pcnet.bin \ |
174 | 1f50f8d1 | bellard | $(docdir)/qemu-doc.html \ |
175 | 1f50f8d1 | bellard | $(docdir)/qemu-tech.html \ |
176 | acd935ef | bellard | $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 ) |
177 | d691f669 | bellard | |
178 | 31e31b8a | bellard | ifneq ($(wildcard .depend),) |
179 | 31e31b8a | bellard | include .depend |
180 | 31e31b8a | bellard | endif |