]> git.proxmox.com Git - mirror_qemu.git/blame - Makefile
new directory structure - changed naming of qemu and vl
[mirror_qemu.git] / Makefile
CommitLineData
626df76a 1include config-host.mak
766a487a 2
7d13299d 3CFLAGS=-Wall -O2 -g
31e31b8a 4LDFLAGS=-g
766a487a 5LIBS=
0ecfa993 6DEFINES+=-D_GNU_SOURCE
1e43adfc 7TOOLS=qemu-mkcow
aa05ae6f 8
626df76a
FB
9all: dyngen $(TOOLS) qemu-doc.html
10 for d in $(TARGET_DIRS); do \
11 make -C $$d $@ || exit 1 ; \
12 done
33e3963e 13
1e43adfc 14qemu-mkcow: qemu-mkcow.o
626df76a 15 $(HOST_CC) -o $@ $^ $(LIBS)
de83cd02 16
626df76a
FB
17dyngen: dyngen.o
18 $(HOST_CC) -o $@ $^ $(LIBS)
de83cd02 19
31e31b8a 20%.o: %.c
626df76a 21 $(HOST_CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
31e31b8a
FB
22
23clean:
2d80ae89
FB
24# avoid old build problems by removing potentially incorrect old files
25 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
626df76a
FB
26 rm -f *.o *.a $(TOOLS) dyngen TAGS
27 for d in $(TARGET_DIRS); do \
28 make -C $$d $@ || exit 1 ; \
29 done
31e31b8a 30
7d13299d 31distclean: clean
2d80ae89 32 rm -f config-host.mak config-host.h
76bc6838
FB
33 for d in $(TARGET_DIRS); do \
34 rm -f $$d/config.h $$d/config.mak || exit 1 ; \
35 done
7d13299d 36
626df76a 37install: all
d5a0b50c 38 mkdir -p $(prefix)/bin
626df76a
FB
39 install -m 755 -s $(TOOLS) $(prefix)/bin
40 for d in $(TARGET_DIRS); do \
41 make -C $$d $@ || exit 1 ; \
42 done
612384d7 43
367e86e8 44# various test targets
626df76a 45test speed: all
367e86e8 46 make -C tests $@
31e31b8a 47
367e86e8 48TAGS:
b9adb4a6 49 etags *.[ch] tests/*.[ch]
31e31b8a 50
3ef693a0
FB
51# documentation
52qemu-doc.html: qemu-doc.texi
53 texi2html -monolithic -number $<
54
1e43adfc 55FILE=qemu-$(shell cat VERSION)
586314f2 56
1e43adfc 57# tar release (use 'make -k tar' on a checkouted tree)
586314f2
FB
58tar:
59 rm -rf /tmp/$(FILE)
1e43adfc 60 cp -r . /tmp/$(FILE)
586314f2
FB
61 ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) )
62 rm -rf /tmp/$(FILE)
63
d691f669
FB
64# generate a binary distribution including the test binary environnment
65BINPATH=/usr/local/qemu-i386
66
67tarbin:
1eb87257
FB
68 tar zcvf /tmp/qemu-$(VERSION)-i386-glibc21.tar.gz \
69 $(BINPATH)/etc $(BINPATH)/lib $(BINPATH)/bin $(BINPATH)/usr
70 tar zcvf /tmp/qemu-$(VERSION)-i386-wine.tar.gz \
71 $(BINPATH)/wine
d691f669 72
31e31b8a
FB
73ifneq ($(wildcard .depend),)
74include .depend
75endif