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