18d5f07faSbellard-include config-host.mak 2766a487aSbellard 3b932cabaSbellardCFLAGS=-Wall -O2 -g -fno-strict-aliasing 483fb7adfSbellardifdef CONFIG_DARWIN 583fb7adfSbellardCFLAGS+= -mdynamic-no-pic 683fb7adfSbellardendif 731e31b8aSbellardLDFLAGS=-g 8766a487aSbellardLIBS= 9d5249393SbellardDEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 10e35c55feSbellardTOOLS=qemu-img$(EXESUF) 111f50f8d1Sbellardifdef CONFIG_STATIC 121f50f8d1SbellardLDFLAGS+=-static 131f50f8d1Sbellardendif 14acd935efSbellardDOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 157d13299dSbellard 168d5f07faSbellardall: dyngen$(EXESUF) $(TOOLS) $(DOCS) 17626df76aSbellard for d in $(TARGET_DIRS); do \ 187d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 19626df76aSbellard done 2033e3963eSbellard 21de167e41Sbellardqemu-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 22b932cabaSbellard $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) 2347cea614Sbellard 2411d9f695Sbellarddyngen$(EXESUF): dyngen.c 2511d9f695Sbellard $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^ 2631e31b8aSbellard 2731e31b8aSbellardclean: 282d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files 292d80ae89Sbellard 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 30acd935efSbellard rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ 317d3505c5Sbellard $(MAKE) -C tests clean 32626df76aSbellard for d in $(TARGET_DIRS); do \ 337d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 34626df76aSbellard done 3531e31b8aSbellard 367d13299dSbellarddistclean: clean 37c72a345fSbellard rm -f config-host.mak config-host.h 3876bc6838Sbellard for d in $(TARGET_DIRS); do \ 39bc1b050dSbellard rm -rf $$d || exit 1 ; \ 4076bc6838Sbellard done 417d13299dSbellard 42fed4a9adSbellardKEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ 43fed4a9adSbellardar de en-us fi fr-be hr it lv nl pl ru th \ 44fed4a9adSbellardcommon de-ch es fo fr-ca hu ja mk nl-be pt sl tr 45fed4a9adSbellard 46626df76aSbellardinstall: all 47*1236cab7Spbrook mkdir -p "$(DESTDIR)$(bindir)" 48*1236cab7Spbrook install -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" 49*1236cab7Spbrook mkdir -p "$(DESTDIR)$(datadir)" 50a735aa31Sbellard install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \ 51de9258a8Sbellard pc-bios/vgabios-cirrus.bin \ 52d5295253Sbellard pc-bios/ppc_rom.bin pc-bios/video.x \ 53e80cfcfcSbellard pc-bios/proll.elf \ 54*1236cab7Spbrook pc-bios/linux_boot.bin "$(DESTDIR)$(datadir)" 55*1236cab7Spbrook mkdir -p "$(DESTDIR)$(docdir)" 56*1236cab7Spbrook install -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" 5711d9f695Sbellardifndef CONFIG_WIN32 58*1236cab7Spbrook mkdir -p "$(DESTDIR)$(mandir)/man1" 59*1236cab7Spbrook install qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" 60*1236cab7Spbrook mkdir -p "$(DESTDIR)$(datadir)/keymaps" 61*1236cab7Spbrook install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(DESTDIR)$(datadir)/keymaps" 6211d9f695Sbellardendif 63626df76aSbellard for d in $(TARGET_DIRS); do \ 647d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 65626df76aSbellard done 66612384d7Sbellard 67367e86e8Sbellard# various test targets 6882c7e2a4Sbellardtest speed test2: all 697d3505c5Sbellard $(MAKE) -C tests $@ 7031e31b8aSbellard 71367e86e8SbellardTAGS: 72b9adb4a6Sbellard etags *.[ch] tests/*.[ch] 7331e31b8aSbellard 746688bc6dSbellardcscope: 756688bc6dSbellard rm -f ./cscope.* 766688bc6dSbellard find . -name "*.[ch]" -print > ./cscope.files 776688bc6dSbellard cscope -b 786688bc6dSbellard 793ef693a0Sbellard# documentation 801f673135Sbellard%.html: %.texi 813ef693a0Sbellard texi2html -monolithic -number $< 823ef693a0Sbellard 835a67135aSbellardqemu.1: qemu-doc.texi 845a67135aSbellard ./texi2pod.pl $< qemu.pod 855a67135aSbellard pod2man --section=1 --center=" " --release=" " qemu.pod > $@ 865a67135aSbellard 87acd935efSbellardqemu-img.1: qemu-img.texi 88acd935efSbellard ./texi2pod.pl $< qemu-img.pod 89acd935efSbellard pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ 90acd935efSbellard 911e43adfcSbellardFILE=qemu-$(shell cat VERSION) 92586314f2Sbellard 931e43adfcSbellard# tar release (use 'make -k tar' on a checkouted tree) 94586314f2Sbellardtar: 95586314f2Sbellard rm -rf /tmp/$(FILE) 961e43adfcSbellard cp -r . /tmp/$(FILE) 9776b62fd0Sbellard ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS ) 98586314f2Sbellard rm -rf /tmp/$(FILE) 99586314f2Sbellard 10076b62fd0Sbellard# generate a binary distribution 101d691f669Sbellardtarbin: 10276b62fd0Sbellard ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \ 10343095f31Sbellard $(bindir)/qemu \ 1047efa4387Sbellard $(bindir)/qemu-system-ppc \ 105acd935efSbellard $(bindir)/qemu-system-sparc \ 10643095f31Sbellard $(bindir)/qemu-system-x86_64 \ 10793856aacSbellard $(bindir)/qemu-system-mips \ 10838260998Spbrook $(bindir)/qemu-system-mipsel \ 109ea31eb5bSbellard $(bindir)/qemu-system-arm \ 1107efa4387Sbellard $(bindir)/qemu-i386 \ 1117efa4387Sbellard $(bindir)/qemu-arm \ 112ea31eb5bSbellard $(bindir)/qemu-armeb \ 1137efa4387Sbellard $(bindir)/qemu-sparc \ 1147efa4387Sbellard $(bindir)/qemu-ppc \ 115ea31eb5bSbellard $(bindir)/qemu-mips \ 116ea31eb5bSbellard $(bindir)/qemu-mipsel \ 117b932cabaSbellard $(bindir)/qemu-img \ 1187efa4387Sbellard $(datadir)/bios.bin \ 1197efa4387Sbellard $(datadir)/vgabios.bin \ 120de9258a8Sbellard $(datadir)/vgabios-cirrus.bin \ 121637f6cd7Sbellard $(datadir)/ppc_rom.bin \ 122d5295253Sbellard $(datadir)/video.x \ 123e80cfcfcSbellard $(datadir)/proll.elf \ 1247efa4387Sbellard $(datadir)/linux_boot.bin \ 1251f50f8d1Sbellard $(docdir)/qemu-doc.html \ 1261f50f8d1Sbellard $(docdir)/qemu-tech.html \ 127acd935efSbellard $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 ) 128d691f669Sbellard 12931e31b8aSbellardifneq ($(wildcard .depend),) 13031e31b8aSbellardinclude .depend 13131e31b8aSbellardendif 132