|
|
1.1.1.4 ! root 1: # Makefile for QEMU. ! 2: 1.1.1.3 root 3: include config-host.mak 1.1 root 4: 1.1.1.4 ! root 5: .PHONY: all clean distclean dvi info install install-doc tar tarbin \ ! 6: speed test test2 html dvi info ! 7: 1.1.1.3 root 8: CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I. 1.1 root 9: ifdef CONFIG_DARWIN 10: CFLAGS+= -mdynamic-no-pic 11: endif 1.1.1.4 ! root 12: ifeq ($(ARCH),sparc) ! 13: CFLAGS+=-mcpu=ultrasparc ! 14: endif 1.1 root 15: LDFLAGS=-g 16: LIBS= 17: DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 18: TOOLS=qemu-img$(EXESUF) 19: ifdef CONFIG_STATIC 20: LDFLAGS+=-static 21: endif 1.1.1.3 root 22: ifdef BUILD_DOCS 1.1 root 23: DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 1.1.1.3 root 24: else 25: DOCS= 26: endif 1.1 root 27: 1.1.1.4 ! root 28: all: $(TOOLS) $(DOCS) recurse-all ! 29: ! 30: subdir-%: dyngen$(EXESUF) ! 31: $(MAKE) -C $(subst subdir-,,$@) all 1.1 root 32: 1.1.1.4 ! root 33: recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS)) ! 34: 1.1 root 35: 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 36: $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) 37: 38: dyngen$(EXESUF): dyngen.c 39: $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^ 40: 41: clean: 42: # avoid old build problems by removing potentially incorrect old files 43: 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 44: rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ 45: $(MAKE) -C tests clean 46: for d in $(TARGET_DIRS); do \ 47: $(MAKE) -C $$d $@ || exit 1 ; \ 48: done 49: 50: distclean: clean 1.1.1.3 root 51: rm -f config-host.mak config-host.h $(DOCS) 1.1.1.4 ! root 52: rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr} 1.1 root 53: for d in $(TARGET_DIRS); do \ 54: rm -rf $$d || exit 1 ; \ 55: done 56: 57: KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ 58: ar de en-us fi fr-be hr it lv nl pl ru th \ 59: common de-ch es fo fr-ca hu ja mk nl-be pt sl tr 60: 1.1.1.3 root 61: install-doc: $(DOCS) 62: mkdir -p "$(DESTDIR)$(docdir)" 63: $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" 1.1 root 64: ifndef CONFIG_WIN32 1.1.1.3 root 65: mkdir -p "$(DESTDIR)$(mandir)/man1" 66: $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" 67: endif 68: 69: install: all $(if $(BUILD_DOCS),install-doc) 70: mkdir -p "$(DESTDIR)$(bindir)" 71: $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" 72: mkdir -p "$(DESTDIR)$(datadir)" 73: for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ 1.1.1.4 ! root 74: video.x openbios-sparc32 linux_boot.bin; do \ 1.1.1.3 root 75: $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ 76: done 77: ifndef CONFIG_WIN32 78: mkdir -p "$(DESTDIR)$(datadir)/keymaps" 79: for x in $(KEYMAPS); do \ 80: $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \ 81: done 1.1 root 82: endif 83: for d in $(TARGET_DIRS); do \ 84: $(MAKE) -C $$d $@ || exit 1 ; \ 85: done 86: 87: # various test targets 88: test speed test2: all 89: $(MAKE) -C tests $@ 90: 91: TAGS: 92: etags *.[ch] tests/*.[ch] 93: 94: cscope: 95: rm -f ./cscope.* 96: find . -name "*.[ch]" -print > ./cscope.files 97: cscope -b 98: 99: # documentation 100: %.html: %.texi 101: texi2html -monolithic -number $< 102: 1.1.1.3 root 103: %.info: %.texi 104: makeinfo $< -o $@ 105: 106: %.dvi: %.texi 107: texi2dvi $< 108: 1.1 root 109: qemu.1: qemu-doc.texi 1.1.1.3 root 110: $(SRC_PATH)/texi2pod.pl $< qemu.pod 1.1 root 111: pod2man --section=1 --center=" " --release=" " qemu.pod > $@ 112: 113: qemu-img.1: qemu-img.texi 1.1.1.3 root 114: $(SRC_PATH)/texi2pod.pl $< qemu-img.pod 1.1 root 115: pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ 116: 1.1.1.4 ! root 117: info: qemu-doc.info qemu-tech.info ! 118: ! 119: dvi: qemu-doc.dvi qemu-tech.dvi ! 120: ! 121: html: qemu-doc.html qemu-tech.html ! 122: 1.1 root 123: FILE=qemu-$(shell cat VERSION) 124: 125: # tar release (use 'make -k tar' on a checkouted tree) 126: tar: 127: rm -rf /tmp/$(FILE) 128: cp -r . /tmp/$(FILE) 129: ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS ) 130: rm -rf /tmp/$(FILE) 131: 132: # generate a binary distribution 133: tarbin: 134: ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \ 135: $(bindir)/qemu \ 136: $(bindir)/qemu-system-ppc \ 137: $(bindir)/qemu-system-sparc \ 138: $(bindir)/qemu-system-x86_64 \ 139: $(bindir)/qemu-system-mips \ 1.1.1.3 root 140: $(bindir)/qemu-system-mipsel \ 1.1.1.2 root 141: $(bindir)/qemu-system-arm \ 1.1 root 142: $(bindir)/qemu-i386 \ 143: $(bindir)/qemu-arm \ 1.1.1.2 root 144: $(bindir)/qemu-armeb \ 1.1 root 145: $(bindir)/qemu-sparc \ 146: $(bindir)/qemu-ppc \ 1.1.1.2 root 147: $(bindir)/qemu-mips \ 148: $(bindir)/qemu-mipsel \ 1.1 root 149: $(bindir)/qemu-img \ 150: $(datadir)/bios.bin \ 151: $(datadir)/vgabios.bin \ 152: $(datadir)/vgabios-cirrus.bin \ 153: $(datadir)/ppc_rom.bin \ 154: $(datadir)/video.x \ 1.1.1.4 ! root 155: $(datadir)/openbios-sparc32 \ 1.1 root 156: $(datadir)/linux_boot.bin \ 157: $(docdir)/qemu-doc.html \ 158: $(docdir)/qemu-tech.html \ 159: $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 ) 160: 161: ifneq ($(wildcard .depend),) 162: include .depend 163: endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.