1626df76aSbellardinclude config-host.mak 2766a487aSbellard 37d13299dSbellardCFLAGS=-Wall -O2 -g 467b915a5Sbellardifdef CONFIG_WIN32 567b915a5SbellardCFLAGS+=-fpack-struct 667b915a5Sbellardendif 731e31b8aSbellardLDFLAGS=-g 8766a487aSbellardLIBS= 90ecfa993SbellardDEFINES+=-D_GNU_SOURCE 1067b915a5Sbellardifndef CONFIG_WIN32 111e43adfcSbellardTOOLS=qemu-mkcow 1267b915a5Sbellardendif 13*1f50f8d1Sbellardifdef CONFIG_STATIC 14*1f50f8d1SbellardLDFLAGS+=-static 15*1f50f8d1Sbellardendif 167d13299dSbellard 171f673135Sbellardall: dyngen$(EXESUF) $(TOOLS) qemu-doc.html qemu-tech.html qemu.1 18626df76aSbellard for d in $(TARGET_DIRS); do \ 19626df76aSbellard make -C $$d $@ || exit 1 ; \ 20626df76aSbellard done 2133e3963eSbellard 2211d9f695Sbellardqemu-mkcow: qemu-mkcow.c 23*1f50f8d1Sbellard $(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ $(LIBS) 240824d6fcSbellard 2511d9f695Sbellarddyngen$(EXESUF): dyngen.c 2611d9f695Sbellard $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^ 2731e31b8aSbellard 2831e31b8aSbellardclean: 292d80ae89Sbellard# avoid old build problems by removing potentially incorrect old files 302d80ae89Sbellard 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 3167b915a5Sbellard rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS qemu.pod 3268e73e39Sbellard make -C tests clean 33626df76aSbellard for d in $(TARGET_DIRS); do \ 34626df76aSbellard make -C $$d $@ || exit 1 ; \ 35626df76aSbellard done 3631e31b8aSbellard 377d13299dSbellarddistclean: clean 382d80ae89Sbellard rm -f config-host.mak config-host.h 3976bc6838Sbellard for d in $(TARGET_DIRS); do \ 40bc1b050dSbellard rm -rf $$d || exit 1 ; \ 4176bc6838Sbellard done 427d13299dSbellard 43626df76aSbellardinstall: all 4411d9f695Sbellard mkdir -p "$(bindir)" 4511d9f695Sbellardifndef CONFIG_WIN32 4611d9f695Sbellard install -m 755 -s $(TOOLS) "$(bindir)" 4711d9f695Sbellardendif 4811d9f695Sbellard mkdir -p "$(sharedir)" 49a735aa31Sbellard install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \ 5011d9f695Sbellard pc-bios/linux_boot.bin "$(sharedir)" 51*1f50f8d1Sbellard mkdir -p "$(docdir)" 52*1f50f8d1Sbellard install -m 644 qemu-doc.html qemu-tech.html "$(docdir)" 5311d9f695Sbellardifndef CONFIG_WIN32 5411d9f695Sbellard mkdir -p "$(mandir)/man1" 5511d9f695Sbellard install qemu.1 qemu-mkcow.1 "$(mandir)/man1" 5611d9f695Sbellardendif 57626df76aSbellard for d in $(TARGET_DIRS); do \ 58626df76aSbellard make -C $$d $@ || exit 1 ; \ 59626df76aSbellard done 60612384d7Sbellard 61367e86e8Sbellard# various test targets 6282c7e2a4Sbellardtest speed test2: all 63367e86e8Sbellard make -C tests $@ 6431e31b8aSbellard 65367e86e8SbellardTAGS: 66b9adb4a6Sbellard etags *.[ch] tests/*.[ch] 6731e31b8aSbellard 683ef693a0Sbellard# documentation 691f673135Sbellard%.html: %.texi 703ef693a0Sbellard texi2html -monolithic -number $< 713ef693a0Sbellard 725a67135aSbellardqemu.1: qemu-doc.texi 735a67135aSbellard ./texi2pod.pl $< qemu.pod 745a67135aSbellard pod2man --section=1 --center=" " --release=" " qemu.pod > $@ 755a67135aSbellard 761e43adfcSbellardFILE=qemu-$(shell cat VERSION) 77586314f2Sbellard 781e43adfcSbellard# tar release (use 'make -k tar' on a checkouted tree) 79586314f2Sbellardtar: 80586314f2Sbellard rm -rf /tmp/$(FILE) 811e43adfcSbellard cp -r . /tmp/$(FILE) 8276b62fd0Sbellard ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS ) 83586314f2Sbellard rm -rf /tmp/$(FILE) 84586314f2Sbellard 8576b62fd0Sbellard# generate a binary distribution 86d691f669Sbellardtarbin: 8776b62fd0Sbellard ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \ 8876b62fd0Sbellard $(prefix)/bin/qemu $(prefix)/bin/qemu-fast \ 89bbc9d348Sbellard $(prefix)/bin/qemu-system-ppc \ 9076b62fd0Sbellard $(prefix)/bin/qemu-i386 \ 9176b62fd0Sbellard $(prefix)/bin/qemu-arm \ 9276b62fd0Sbellard $(prefix)/bin/qemu-sparc \ 93c0637b37Sbellard $(prefix)/bin/qemu-ppc \ 94*1f50f8d1Sbellard $(prefix)/bin/qemu-mkcow \ 9576b62fd0Sbellard $(sharedir)/bios.bin \ 9676b62fd0Sbellard $(sharedir)/vgabios.bin \ 97*1f50f8d1Sbellard $(sharedir)/linux_boot.bin \ 98*1f50f8d1Sbellard $(docdir)/qemu-doc.html \ 99*1f50f8d1Sbellard $(docdir)/qemu-tech.html \ 100*1f50f8d1Sbellard $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-mkcow.1 ) 101d691f669Sbellard 10231e31b8aSbellardifneq ($(wildcard .depend),) 10331e31b8aSbellardinclude .depend 10431e31b8aSbellardendif 105