1 | Index: ioemu/Makefile |
---|
2 | =================================================================== |
---|
3 | --- ioemu.orig/Makefile 2007-05-03 15:38:37.000000000 +0100 |
---|
4 | +++ ioemu/Makefile 2007-05-03 15:38:39.000000000 +0100 |
---|
5 | @@ -1,11 +1,14 @@ |
---|
6 | # Makefile for QEMU. |
---|
7 | |
---|
8 | -include config-host.mak |
---|
9 | +XEN_ROOT=../.. |
---|
10 | +include $(XEN_ROOT)/tools/Rules.mk |
---|
11 | + |
---|
12 | +-include config-host.mak |
---|
13 | |
---|
14 | .PHONY: all clean distclean dvi info install install-doc tar tarbin \ |
---|
15 | speed test test2 html dvi info |
---|
16 | |
---|
17 | -CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I. |
---|
18 | +CFLAGS+=-Wall -O2 -g -fno-strict-aliasing -I. |
---|
19 | ifdef CONFIG_DARWIN |
---|
20 | CFLAGS+= -mdynamic-no-pic |
---|
21 | endif |
---|
22 | @@ -25,9 +28,11 @@ |
---|
23 | DOCS= |
---|
24 | endif |
---|
25 | |
---|
26 | +TOOLS= |
---|
27 | + |
---|
28 | all: $(TOOLS) $(DOCS) recurse-all |
---|
29 | |
---|
30 | -subdir-%: dyngen$(EXESUF) |
---|
31 | +subdir-%: |
---|
32 | $(MAKE) -C $(subst subdir-,,$@) all |
---|
33 | |
---|
34 | recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS)) |
---|
35 | @@ -44,7 +49,7 @@ |
---|
36 | rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ |
---|
37 | $(MAKE) -C tests clean |
---|
38 | for d in $(TARGET_DIRS); do \ |
---|
39 | - $(MAKE) -C $$d $@ || exit 1 ; \ |
---|
40 | + [ -d $$d ] && $(MAKE) -C $$d $@ || exit 0 ; \ |
---|
41 | done |
---|
42 | |
---|
43 | distclean: clean |
---|
44 | @@ -60,24 +65,24 @@ |
---|
45 | |
---|
46 | install-doc: $(DOCS) |
---|
47 | mkdir -p "$(DESTDIR)$(docdir)" |
---|
48 | - $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" |
---|
49 | + $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)" |
---|
50 | ifndef CONFIG_WIN32 |
---|
51 | mkdir -p "$(DESTDIR)$(mandir)/man1" |
---|
52 | - $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" |
---|
53 | + $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" |
---|
54 | endif |
---|
55 | |
---|
56 | install: all $(if $(BUILD_DOCS),install-doc) |
---|
57 | mkdir -p "$(DESTDIR)$(bindir)" |
---|
58 | - $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" |
---|
59 | - mkdir -p "$(DESTDIR)$(datadir)" |
---|
60 | - for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ |
---|
61 | - video.x openbios-sparc32 linux_boot.bin; do \ |
---|
62 | - $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ |
---|
63 | - done |
---|
64 | +# $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" |
---|
65 | +# mkdir -p "$(DESTDIR)$(datadir)" |
---|
66 | +# for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ |
---|
67 | +# video.x openbios-sparc32 linux_boot.bin; do \ |
---|
68 | +# $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ |
---|
69 | +# done |
---|
70 | ifndef CONFIG_WIN32 |
---|
71 | mkdir -p "$(DESTDIR)$(datadir)/keymaps" |
---|
72 | for x in $(KEYMAPS); do \ |
---|
73 | - $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \ |
---|
74 | + $(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \ |
---|
75 | done |
---|
76 | endif |
---|
77 | for d in $(TARGET_DIRS); do \ |
---|
78 | @@ -89,7 +94,7 @@ |
---|
79 | $(MAKE) -C tests $@ |
---|
80 | |
---|
81 | TAGS: |
---|
82 | - etags *.[ch] tests/*.[ch] |
---|
83 | + etags *.[ch] target-i386-dm/*.[ch] hw/*.[ch] |
---|
84 | |
---|
85 | cscope: |
---|
86 | rm -f ./cscope.* |
---|
87 | @@ -107,11 +112,11 @@ |
---|
88 | texi2dvi $< |
---|
89 | |
---|
90 | qemu.1: qemu-doc.texi |
---|
91 | - $(SRC_PATH)/texi2pod.pl $< qemu.pod |
---|
92 | + perl -w $(SRC_PATH)/texi2pod.pl $< qemu.pod |
---|
93 | pod2man --section=1 --center=" " --release=" " qemu.pod > $@ |
---|
94 | |
---|
95 | qemu-img.1: qemu-img.texi |
---|
96 | - $(SRC_PATH)/texi2pod.pl $< qemu-img.pod |
---|
97 | + perl -w $(SRC_PATH)/texi2pod.pl $< qemu-img.pod |
---|
98 | pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@ |
---|
99 | |
---|
100 | info: qemu-doc.info qemu-tech.info |
---|
101 | Index: ioemu/Makefile.target |
---|
102 | =================================================================== |
---|
103 | --- ioemu.orig/Makefile.target 2007-05-03 15:38:37.000000000 +0100 |
---|
104 | +++ ioemu/Makefile.target 2007-05-03 15:38:39.000000000 +0100 |
---|
105 | @@ -1,5 +1,8 @@ |
---|
106 | include config.mak |
---|
107 | |
---|
108 | +XEN_ROOT=../../.. |
---|
109 | +include $(XEN_ROOT)/tools/Rules.mk |
---|
110 | + |
---|
111 | TARGET_BASE_ARCH:=$(TARGET_ARCH) |
---|
112 | ifeq ($(TARGET_ARCH), x86_64) |
---|
113 | TARGET_BASE_ARCH:=i386 |
---|
114 | @@ -10,14 +13,21 @@ |
---|
115 | ifeq ($(TARGET_ARCH), sparc64) |
---|
116 | TARGET_BASE_ARCH:=sparc |
---|
117 | endif |
---|
118 | -TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
---|
119 | +TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)$(TARGET_SUB) |
---|
120 | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio |
---|
121 | DEFINES=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) |
---|
122 | +DEFINES+= -I$(XEN_ROOT)/tools/libxc |
---|
123 | +DEFINES+= -I$(XEN_ROOT)/tools/xenstore |
---|
124 | ifdef CONFIG_USER_ONLY |
---|
125 | VPATH+=:$(SRC_PATH)/linux-user |
---|
126 | DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) |
---|
127 | endif |
---|
128 | -CFLAGS=-Wall -O2 -g -fno-strict-aliasing |
---|
129 | +CFLAGS+=-Wall -O2 -g -fno-strict-aliasing |
---|
130 | +SSE2 := $(call cc-option,$(CC),-msse2,) |
---|
131 | +ifeq ($(SSE2),-msse2) |
---|
132 | +CFLAGS += -DUSE_SSE2=1 -msse2 |
---|
133 | +endif |
---|
134 | +CFLAGS+= $(LOCAL_CFLAGS) |
---|
135 | #CFLAGS+=-Werror |
---|
136 | LDFLAGS=-g |
---|
137 | LIBS= |
---|
138 | @@ -165,8 +175,12 @@ |
---|
139 | |
---|
140 | ######################################################### |
---|
141 | |
---|
142 | -DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
---|
143 | +DEFINES+=-D_GNU_SOURCE |
---|
144 | +#-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
---|
145 | LIBS+=-lm |
---|
146 | +LIBS+=-L../../libxc -lxenctrl -lxenguest |
---|
147 | +LIBS+=-L../../xenstore -lxenstore |
---|
148 | +LIBS+=-lpthread |
---|
149 | ifndef CONFIG_USER_ONLY |
---|
150 | LIBS+=-lz |
---|
151 | endif |
---|
152 | @@ -281,7 +295,7 @@ |
---|
153 | all: $(PROGS) |
---|
154 | |
---|
155 | $(QEMU_USER): $(OBJS) |
---|
156 | - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
---|
157 | + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) |
---|
158 | ifeq ($(ARCH),alpha) |
---|
159 | # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of |
---|
160 | # the address space (31 bit so sign extending doesn't matter) |
---|
161 | @@ -528,10 +542,16 @@ |
---|
162 | clean: |
---|
163 | rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o |
---|
164 | |
---|
165 | +distclean: clean |
---|
166 | + rm -rf config.mak config.h |
---|
167 | + |
---|
168 | install: all |
---|
169 | + mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(configdir)" |
---|
170 | ifneq ($(PROGS),) |
---|
171 | - $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" |
---|
172 | + $(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)" |
---|
173 | endif |
---|
174 | + $(INSTALL_PROG) $(TARGET_PATH)/qemu-dm.debug "$(DESTDIR)$(bindir)" |
---|
175 | + $(INSTALL_PROG) $(TARGET_PATH)/qemu-ifup "$(DESTDIR)$(configdir)" |
---|
176 | |
---|
177 | ifneq ($(wildcard .depend),) |
---|
178 | include .depend |
---|
179 | Index: ioemu/configure |
---|
180 | =================================================================== |
---|
181 | --- ioemu.orig/configure 2007-05-03 15:38:37.000000000 +0100 |
---|
182 | +++ ioemu/configure 2007-05-03 15:38:39.000000000 +0100 |
---|
183 | @@ -18,8 +18,8 @@ |
---|
184 | |
---|
185 | # default parameters |
---|
186 | prefix="" |
---|
187 | -interp_prefix="/usr/gnemul/qemu-%M" |
---|
188 | static="no" |
---|
189 | +libdir="lib" |
---|
190 | cross_prefix="" |
---|
191 | cc="gcc" |
---|
192 | host_cc="gcc" |
---|
193 | @@ -65,6 +65,7 @@ |
---|
194 | ;; |
---|
195 | x86_64|amd64) |
---|
196 | cpu="x86_64" |
---|
197 | + libdir="lib64" |
---|
198 | ;; |
---|
199 | *) |
---|
200 | cpu="unknown" |
---|
201 | @@ -91,7 +92,7 @@ |
---|
202 | kernel_path="" |
---|
203 | cocoa="no" |
---|
204 | check_gfx="yes" |
---|
205 | -check_gcc="yes" |
---|
206 | +check_gcc="no" |
---|
207 | softmmu="yes" |
---|
208 | user="no" |
---|
209 | build_docs="no" |
---|
210 | @@ -380,6 +381,8 @@ |
---|
211 | exit 1 |
---|
212 | fi |
---|
213 | |
---|
214 | +kqemu="no" |
---|
215 | + |
---|
216 | if test -z "$cross_prefix" ; then |
---|
217 | |
---|
218 | # --- |
---|
219 | @@ -505,14 +508,16 @@ |
---|
220 | datadir="$prefix" |
---|
221 | docdir="$prefix" |
---|
222 | bindir="$prefix" |
---|
223 | +configdir="" |
---|
224 | else |
---|
225 | if test -z "$prefix" ; then |
---|
226 | prefix="/usr/local" |
---|
227 | fi |
---|
228 | mandir="$prefix/share/man" |
---|
229 | -datadir="$prefix/share/qemu" |
---|
230 | +datadir="$prefix/share/xen/qemu" |
---|
231 | docdir="$prefix/share/doc/qemu" |
---|
232 | -bindir="$prefix/bin" |
---|
233 | +bindir="$prefix/$libdir/xen/bin" |
---|
234 | +configdir="/etc/xen" |
---|
235 | fi |
---|
236 | |
---|
237 | echo "Install prefix $prefix" |
---|
238 | @@ -583,6 +588,8 @@ |
---|
239 | echo "mandir=$mandir" >> $config_mak |
---|
240 | echo "datadir=$datadir" >> $config_mak |
---|
241 | echo "docdir=$docdir" >> $config_mak |
---|
242 | +echo "configdir=$configdir" >> $config_mak |
---|
243 | +echo "LIBDIR=$libdir" >> $config_mak |
---|
244 | echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h |
---|
245 | echo "MAKE=$make" >> $config_mak |
---|
246 | echo "INSTALL=$install" >> $config_mak |
---|
247 | @@ -770,7 +777,7 @@ |
---|
248 | # don't use ln -sf as not all "ln -sf" over write the file/link |
---|
249 | # |
---|
250 | rm -f $target_dir/Makefile |
---|
251 | -ln -s $source_path/Makefile.target $target_dir/Makefile |
---|
252 | +ln -s ../Makefile.target $target_dir/Makefile |
---|
253 | |
---|
254 | |
---|
255 | echo "# Automatically generated by configure - do not modify" > $config_mak |
---|
256 | @@ -784,6 +791,12 @@ |
---|
257 | interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"` |
---|
258 | echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h |
---|
259 | |
---|
260 | +target_sub= |
---|
261 | +if expr $target : '.*-dm' > /dev/null ; then |
---|
262 | + target_sub=-dm |
---|
263 | +fi |
---|
264 | +echo "TARGET_SUB=${target_sub}" >> $config_mak |
---|
265 | + |
---|
266 | if test "$target_cpu" = "i386" ; then |
---|
267 | echo "TARGET_ARCH=i386" >> $config_mak |
---|
268 | echo "#define TARGET_ARCH \"i386\"" >> $config_h |
---|
269 | @@ -850,6 +863,10 @@ |
---|
270 | echo "#define CONFIG_USER_ONLY 1" >> $config_h |
---|
271 | fi |
---|
272 | |
---|
273 | +if expr $target : '.*-dm' > /dev/null ; then |
---|
274 | + echo "#define CONFIG_DM 1" >> $config_h |
---|
275 | +fi |
---|
276 | + |
---|
277 | if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64"; then |
---|
278 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
---|
279 | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h |
---|