root / Makefile @ 215cf0be
History | View | Annotate | Download (3.9 kB)
1 | ad064840 | pbrook | include config-host.mak |
---|---|---|---|
2 | 766a487a | bellard | |
3 | ad064840 | pbrook | CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I. |
4 | 83fb7adf | bellard | ifdef CONFIG_DARWIN |
5 | 83fb7adf | bellard | CFLAGS+= -mdynamic-no-pic |
6 | 83fb7adf | bellard | endif |
7 | 31e31b8a | bellard | LDFLAGS=-g |
8 | 766a487a | bellard | LIBS= |
9 | d5249393 | bellard | DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
10 | e35c55fe | bellard | TOOLS=qemu-img$(EXESUF) |
11 | 1f50f8d1 | bellard | ifdef CONFIG_STATIC |
12 | 1f50f8d1 | bellard | LDFLAGS+=-static |
13 | 1f50f8d1 | bellard | endif |
14 | cc8ae6de | pbrook | ifdef BUILD_DOCS |
15 | acd935ef | bellard | DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 |
16 | cc8ae6de | pbrook | else |
17 | cc8ae6de | pbrook | DOCS= |
18 | cc8ae6de | pbrook | endif |
19 | aa05ae6f | bellard | |
20 | 8d5f07fa | bellard | all: dyngen$(EXESUF) $(TOOLS) $(DOCS) |
21 | 626df76a | bellard | for d in $(TARGET_DIRS); do \ |
22 | 7d3505c5 | bellard | $(MAKE) -C $$d $@ || exit 1 ; \ |
23 | 626df76a | bellard | done |
24 | 33e3963e | bellard | |
25 | de167e41 | bellard | qemu-img$(EXESUF): qemu-img.c block.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 |
26 | b932caba | bellard | $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(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 | acd935ef | bellard | rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.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 | cc8ae6de | pbrook | rm -f config-host.mak config-host.h $(DOCS) |
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 | fed4a9ad | bellard | KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ |
47 | fed4a9ad | bellard | ar de en-us fi fr-be hr it lv nl pl ru th \ |
48 | fed4a9ad | bellard | common de-ch es fo fr-ca hu ja mk nl-be pt sl tr |
49 | fed4a9ad | bellard | |
50 | 38954dca | pbrook | install-doc: $(DOCS) |
51 | 38954dca | pbrook | mkdir -p "$(DESTDIR)$(docdir)" |
52 | 38954dca | pbrook | $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" |
53 | 38954dca | pbrook | ifndef CONFIG_WIN32 |
54 | 38954dca | pbrook | mkdir -p "$(DESTDIR)$(mandir)/man1" |
55 | 38954dca | pbrook | $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" |
56 | 38954dca | pbrook | endif |
57 | 38954dca | pbrook | |
58 | 38954dca | pbrook | install: all $(if $(BUILD_DOCS),install-doc) |
59 | 1236cab7 | pbrook | mkdir -p "$(DESTDIR)$(bindir)" |
60 | 6a882643 | pbrook | $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" |
61 | 1236cab7 | pbrook | mkdir -p "$(DESTDIR)$(datadir)" |
62 | ad064840 | pbrook | for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ |
63 | ad064840 | pbrook | video.x proll.elf linux_boot.bin; do \ |
64 | 6a882643 | pbrook | $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ |
65 | ad064840 | pbrook | done |
66 | 11d9f695 | bellard | ifndef CONFIG_WIN32 |
67 | 1236cab7 | pbrook | mkdir -p "$(DESTDIR)$(datadir)/keymaps" |
68 | ad064840 | pbrook | for x in $(KEYMAPS); do \ |
69 | 6a882643 | pbrook | $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \ |
70 | ad064840 | pbrook | done |
71 | 11d9f695 | bellard | endif |
72 | 626df76a | bellard | for d in $(TARGET_DIRS); do \ |
73 | 7d3505c5 | bellard | $(MAKE) -C $$d $@ || exit 1 ; \ |
74 | 626df76a | bellard | done |
75 | 612384d7 | bellard | |
76 | 367e86e8 | bellard | # various test targets |
77 | 82c7e2a4 | bellard | test speed test2: all |
78 | 7d3505c5 | bellard | $(MAKE) -C tests $@ |
79 | 31e31b8a | bellard | |
80 | 367e86e8 | bellard | TAGS: |
81 | b9adb4a6 | bellard | etags *.[ch] tests/*.[ch] |
82 | 31e31b8a | bellard | |
83 | 6688bc6d | bellard | cscope: |
84 | 6688bc6d | bellard | rm -f ./cscope.* |
85 | 6688bc6d | bellard | find . -name "*.[ch]" -print > ./cscope.files |
86 | 6688bc6d | bellard | cscope -b |
87 | 6688bc6d | bellard | |
88 | 3ef693a0 | bellard | # documentation |
89 | 1f673135 | bellard | %.html: %.texi |
90 | 3ef693a0 | bellard | texi2html -monolithic -number $< |
91 | 3ef693a0 | bellard | |
92 | f3548328 | bellard | %.info: %.texi |
93 | f3548328 | bellard | makeinfo $< -o $@ |
94 | f3548328 | bellard | |
95 | f3548328 | bellard | %.dvi: %.texi |
96 | f3548328 | bellard | texi2dvi $< |
97 | f3548328 | bellard | |
98 | 5a67135a | bellard | qemu.1: qemu-doc.texi |
99 | ad064840 | pbrook | $(SRC_PATH)/texi2pod.pl $< qemu.pod |
100 | 5a67135a | bellard | pod2man --section=1 --center=" " --release=" " qemu.pod > $@ |
101 | 5a67135a | bellard | |
102 | acd935ef | bellard | qemu-img.1: qemu-img.texi |
103 | ad064840 | pbrook | $(SRC_PATH)/texi2pod.pl $< qemu-img.pod |
104 | acd935ef | bellard | pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ |
105 | acd935ef | bellard | |
106 | 1e43adfc | bellard | FILE=qemu-$(shell cat VERSION) |
107 | 586314f2 | bellard | |
108 | 1e43adfc | bellard | # tar release (use 'make -k tar' on a checkouted tree) |
109 | 586314f2 | bellard | tar: |
110 | 586314f2 | bellard | rm -rf /tmp/$(FILE) |
111 | 1e43adfc | bellard | cp -r . /tmp/$(FILE) |
112 | 76b62fd0 | bellard | ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS ) |
113 | 586314f2 | bellard | rm -rf /tmp/$(FILE) |
114 | 586314f2 | bellard | |
115 | 76b62fd0 | bellard | # generate a binary distribution |
116 | d691f669 | bellard | tarbin: |
117 | 76b62fd0 | bellard | ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \ |
118 | 43095f31 | bellard | $(bindir)/qemu \ |
119 | 7efa4387 | bellard | $(bindir)/qemu-system-ppc \ |
120 | acd935ef | bellard | $(bindir)/qemu-system-sparc \ |
121 | 43095f31 | bellard | $(bindir)/qemu-system-x86_64 \ |
122 | 93856aac | bellard | $(bindir)/qemu-system-mips \ |
123 | 38260998 | pbrook | $(bindir)/qemu-system-mipsel \ |
124 | ea31eb5b | bellard | $(bindir)/qemu-system-arm \ |
125 | 7efa4387 | bellard | $(bindir)/qemu-i386 \ |
126 | 7efa4387 | bellard | $(bindir)/qemu-arm \ |
127 | ea31eb5b | bellard | $(bindir)/qemu-armeb \ |
128 | 7efa4387 | bellard | $(bindir)/qemu-sparc \ |
129 | 7efa4387 | bellard | $(bindir)/qemu-ppc \ |
130 | ea31eb5b | bellard | $(bindir)/qemu-mips \ |
131 | ea31eb5b | bellard | $(bindir)/qemu-mipsel \ |
132 | b932caba | bellard | $(bindir)/qemu-img \ |
133 | 7efa4387 | bellard | $(datadir)/bios.bin \ |
134 | 7efa4387 | bellard | $(datadir)/vgabios.bin \ |
135 | de9258a8 | bellard | $(datadir)/vgabios-cirrus.bin \ |
136 | 637f6cd7 | bellard | $(datadir)/ppc_rom.bin \ |
137 | d5295253 | bellard | $(datadir)/video.x \ |
138 | e80cfcfc | bellard | $(datadir)/proll.elf \ |
139 | 7efa4387 | bellard | $(datadir)/linux_boot.bin \ |
140 | 1f50f8d1 | bellard | $(docdir)/qemu-doc.html \ |
141 | 1f50f8d1 | bellard | $(docdir)/qemu-tech.html \ |
142 | acd935ef | bellard | $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 ) |
143 | d691f669 | bellard | |
144 | 31e31b8a | bellard | ifneq ($(wildcard .depend),) |
145 | 31e31b8a | bellard | include .depend |
146 | 31e31b8a | bellard | endif |