]> git.proxmox.com Git - qemu.git/blame - Makefile
different serial number for each drive (initial patch by Mike Nordell)
[qemu.git] / Makefile
CommitLineData
626df76a 1include config-host.mak
766a487a 2
7d13299d 3CFLAGS=-Wall -O2 -g
67b915a5
FB
4ifdef CONFIG_WIN32
5CFLAGS+=-fpack-struct
6endif
31e31b8a 7LDFLAGS=-g
766a487a 8LIBS=
0ecfa993 9DEFINES+=-D_GNU_SOURCE
67b915a5 10ifndef CONFIG_WIN32
1e43adfc 11TOOLS=qemu-mkcow
67b915a5 12endif
1f50f8d1
FB
13ifdef CONFIG_STATIC
14LDFLAGS+=-static
15endif
aa05ae6f 16
1f673135 17all: dyngen$(EXESUF) $(TOOLS) qemu-doc.html qemu-tech.html qemu.1
626df76a 18 for d in $(TARGET_DIRS); do \
7d3505c5 19 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 20 done
33e3963e 21
11d9f695 22qemu-mkcow: qemu-mkcow.c
1f50f8d1 23 $(CC) $(CFLAGS) $(LDFLAGS) $(DEFINES) -o $@ $^ $(LIBS)
de83cd02 24
11d9f695
FB
25dyngen$(EXESUF): dyngen.c
26 $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
31e31b8a
FB
27
28clean:
2d80ae89
FB
29# avoid old build problems by removing potentially incorrect old files
30 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
67b915a5 31 rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS qemu.pod
7d3505c5 32 $(MAKE) -C tests clean
626df76a 33 for d in $(TARGET_DIRS); do \
7d3505c5 34 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 35 done
31e31b8a 36
7d13299d 37distclean: clean
2d80ae89 38 rm -f config-host.mak config-host.h
76bc6838 39 for d in $(TARGET_DIRS); do \
bc1b050d 40 rm -rf $$d || exit 1 ; \
76bc6838 41 done
7d13299d 42
626df76a 43install: all
11d9f695
FB
44 mkdir -p "$(bindir)"
45ifndef CONFIG_WIN32
46 install -m 755 -s $(TOOLS) "$(bindir)"
47endif
7efa4387 48 mkdir -p "$(datadir)"
a735aa31 49 install -m 644 pc-bios/bios.bin pc-bios/vgabios.bin \
7efa4387 50 pc-bios/linux_boot.bin "$(datadir)"
1f50f8d1
FB
51 mkdir -p "$(docdir)"
52 install -m 644 qemu-doc.html qemu-tech.html "$(docdir)"
11d9f695
FB
53ifndef CONFIG_WIN32
54 mkdir -p "$(mandir)/man1"
55 install qemu.1 qemu-mkcow.1 "$(mandir)/man1"
56endif
626df76a 57 for d in $(TARGET_DIRS); do \
7d3505c5 58 $(MAKE) -C $$d $@ || exit 1 ; \
626df76a 59 done
612384d7 60
367e86e8 61# various test targets
82c7e2a4 62test speed test2: all
7d3505c5 63 $(MAKE) -C tests $@
31e31b8a 64
367e86e8 65TAGS:
b9adb4a6 66 etags *.[ch] tests/*.[ch]
31e31b8a 67
3ef693a0 68# documentation
1f673135 69%.html: %.texi
3ef693a0
FB
70 texi2html -monolithic -number $<
71
5a67135a
FB
72qemu.1: qemu-doc.texi
73 ./texi2pod.pl $< qemu.pod
74 pod2man --section=1 --center=" " --release=" " qemu.pod > $@
75
1e43adfc 76FILE=qemu-$(shell cat VERSION)
586314f2 77
1e43adfc 78# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
79tar:
80 rm -rf /tmp/$(FILE)
1e43adfc 81 cp -r . /tmp/$(FILE)
76b62fd0 82 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS )
586314f2
FB
83 rm -rf /tmp/$(FILE)
84
76b62fd0 85# generate a binary distribution
d691f669 86tarbin:
76b62fd0 87 ( cd / ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
7efa4387
FB
88 $(bindir)/qemu $(bindir)/qemu-fast \
89 $(bindir)/qemu-system-ppc \
90 $(bindir)/qemu-i386 \
91 $(bindir)/qemu-arm \
92 $(bindir)/qemu-sparc \
93 $(bindir)/qemu-ppc \
94 $(bindir)/qemu-mkcow \
95 $(datadir)/bios.bin \
96 $(datadir)/vgabios.bin \
97 $(datadir)/linux_boot.bin \
1f50f8d1
FB
98 $(docdir)/qemu-doc.html \
99 $(docdir)/qemu-tech.html \
100 $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-mkcow.1 )
d691f669 101
31e31b8a
FB
102ifneq ($(wildcard .depend),)
103include .depend
104endif