18d5f07faSbellard-include config-host.mak 2766a487aSbellard 3b932cabaSbellardCFLAGS=-Wall -O2 -g -fno-strict-aliasing 483fb7adfSbellardifdef CONFIG_DARWIN 583fb7adfSbellardCFLAGS+= -mdynamic-no-pic 683fb7adfSbellardendif 767b915a5Sbellardifdef CONFIG_WIN32 867b915a5SbellardCFLAGS+=-fpack-struct 967b915a5Sbellardendif 1031e31b8aSbellardLDFLAGS=-g 11766a487aSbellardLIBS= 12d5249393SbellardDEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 13e35c55feSbellardTOOLS=qemu-img$(EXESUF) 141f50f8d1Sbellardifdef CONFIG_STATIC 151f50f8d1SbellardLDFLAGS+=-static 161f50f8d1Sbellardendif 17acd935efSbellardDOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 187d13299dSbellard 198d5f07faSbellardall: dyngen$(EXESUF) $(TOOLS) $(DOCS) 20626df76aSbellard for d in $(TARGET_DIRS); do \ 217d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 22626df76aSbellard done 2333e3963eSbellard 24585d0ed9Sbellardqemu-img$(EXESUF): qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c 25b932cabaSbellard $(CC) -DQEMU_TOOL $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ -lz $(LIBS) 2647cea614Sbellard 2711d9f695Sbellarddyngen$(EXESUF): dyngen.c 2811d9f695Sbellard $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^ 2931e31b8aSbellard 3031e31b8aSbellardclean: 312d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files 322d80ae89Sbellard 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 33acd935efSbellard rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ 347d3505c5Sbellard $(MAKE) -C tests clean 35626df76aSbellard for d in $(TARGET_DIRS); do \ 367d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 37626df76aSbellard done 3831e31b8aSbellard 397d13299dSbellarddistclean: clean 40c72a345fSbellard rm -f config-host.mak config-host.h 4176bc6838Sbellard for d in $(TARGET_DIRS); do \ 42bc1b050dSbellard rm -rf $$d || exit 1 ; \ 4376bc6838Sbellard done 447d13299dSbellard 45*fed4a9adSbellardKEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \ 46*fed4a9adSbellardar de en-us fi fr-be hr it lv nl pl ru th \ 47*fed4a9adSbellardcommon de-ch es fo fr-ca hu ja mk nl-be pt sl tr 48*fed4a9adSbellard 49626df76aSbellardinstall: all 5011d9f695Sbellard mkdir -p "$(bindir)" 5111d9f695Sbellard install -m 755 -s $(TOOLS) "$(bindir)" 527efa4387Sbellard mkdir -p "$(datadir)" 53a735aa31Sbellard install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \ 54de9258a8Sbellard pc-bios/vgabios-cirrus.bin \ 55637f6cd7Sbellard pc-bios/ppc_rom.bin \ 568d5f07faSbellard pc-bios/proll.bin \ 577efa4387Sbellard pc-bios/linux_boot.bin "$(datadir)" 581f50f8d1Sbellard mkdir -p "$(docdir)" 591f50f8d1Sbellard install -m 644 qemu-doc.html qemu-tech.html "$(docdir)" 6011d9f695Sbellardifndef CONFIG_WIN32 6111d9f695Sbellard mkdir -p "$(mandir)/man1" 62acd935efSbellard install qemu.1 qemu-img.1 "$(mandir)/man1" 633d11d0ebSbellard mkdir -p "$(datadir)/keymaps" 64*fed4a9adSbellard install -m 644 $(addprefix keymaps/,$(KEYMAPS)) "$(datadir)/keymaps" 6511d9f695Sbellardendif 66626df76aSbellard for d in $(TARGET_DIRS); do \ 677d3505c5Sbellard $(MAKE) -C $$d $@ || exit 1 ; \ 68626df76aSbellard done 69612384d7Sbellard 70367e86e8Sbellard# various test targets 7182c7e2a4Sbellardtest speed test2: all 727d3505c5Sbellard $(MAKE) -C tests $@ 7331e31b8aSbellard 74367e86e8SbellardTAGS: 75b9adb4a6Sbellard etags *.[ch] tests/*.[ch] 7631e31b8aSbellard 773ef693a0Sbellard# documentation 781f673135Sbellard%.html: %.texi 793ef693a0Sbellard texi2html -monolithic -number $< 803ef693a0Sbellard 815a67135aSbellardqemu.1: qemu-doc.texi 825a67135aSbellard ./texi2pod.pl $< qemu.pod 835a67135aSbellard pod2man --section=1 --center=" " --release=" " qemu.pod > $@ 845a67135aSbellard 85acd935efSbellardqemu-img.1: qemu-img.texi 86acd935efSbellard ./texi2pod.pl $< qemu-img.pod 87acd935efSbellard pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ 88acd935efSbellard 891e43adfcSbellardFILE=qemu-$(shell cat VERSION) 90586314f2Sbellard 911e43adfcSbellard# tar release (use 'make -k tar' on a checkouted tree) 92586314f2Sbellardtar: 93586314f2Sbellard rm -rf /tmp/$(FILE) 941e43adfcSbellard cp -r . /tmp/$(FILE) 9576b62fd0Sbellard ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS ) 96586314f2Sbellard rm -rf /tmp/$(FILE) 97586314f2Sbellard 9876b62fd0Sbellard# generate a binary distribution 99d691f669Sbellardtarbin: 10076b62fd0Sbellard ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \ 1017efa4387Sbellard $(bindir)/qemu $(bindir)/qemu-fast \ 1027efa4387Sbellard $(bindir)/qemu-system-ppc \ 103acd935efSbellard $(bindir)/qemu-system-sparc \ 1047efa4387Sbellard $(bindir)/qemu-i386 \ 1057efa4387Sbellard $(bindir)/qemu-arm \ 1067efa4387Sbellard $(bindir)/qemu-sparc \ 1077efa4387Sbellard $(bindir)/qemu-ppc \ 108b932cabaSbellard $(bindir)/qemu-img \ 1097efa4387Sbellard $(datadir)/bios.bin \ 1107efa4387Sbellard $(datadir)/vgabios.bin \ 111de9258a8Sbellard $(datadir)/vgabios-cirrus.bin \ 112637f6cd7Sbellard $(datadir)/ppc_rom.bin \ 1138d5f07faSbellard $(datadir)/proll.bin \ 1147efa4387Sbellard $(datadir)/linux_boot.bin \ 1151f50f8d1Sbellard $(docdir)/qemu-doc.html \ 1161f50f8d1Sbellard $(docdir)/qemu-tech.html \ 117acd935efSbellard $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 ) 118d691f669Sbellard 11931e31b8aSbellardifneq ($(wildcard .depend),) 12031e31b8aSbellardinclude .depend 12131e31b8aSbellardendif 122