Revision add16157

b/Makefile
40 40

  
41 41
$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
42 42

  
43
$(filter %-user,$(SUBDIR_RULES)): libuser.a
44

  
45
libuser.a:
46
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libuser V="$(V)" TARGET_DIR="$*/" all,)
47

  
43 48
ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
44 49
romsubdir-%:
45 50
	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/",)
......
185 190
	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d
186 191
	rm -f qemu-img-cmds.h
187 192
	$(MAKE) -C tests clean
188
	for d in $(ALL_SUBDIRS) libhw32 libhw64; do \
193
	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
189 194
	$(MAKE) -C $$d $@ || exit 1 ; \
190 195
        done
191 196

  
192 197
distclean: clean
193 198
	rm -f config-host.mak config-host.h config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi
194 199
	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
195
	for d in $(TARGET_DIRS) libhw32 libhw64; do \
200
	for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
196 201
	rm -rf $$d || exit 1 ; \
197 202
        done
198 203

  
b/Makefile.target
82 82
QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
83 83
obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
84 84
      elfload.o linuxload.o uaccess.o gdbstub.o gdbstub-xml.o
85
obj-y += envlist.o path.o
86 85

  
87 86
obj-$(TARGET_HAS_BFLT) += flatload.o
88 87
obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o
......
98 97

  
99 98
obj-m68k-y += m68k-sim.o m68k-semi.o
100 99

  
101
ARLIBS=libqemu.a
100
ARLIBS=../libuser/libuser.a libqemu.a
101

  
102 102
endif #CONFIG_LINUX_USER
103 103

  
104 104
#########################################################
......
116 116

  
117 117
obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
118 118
        gdbstub.o gdbstub-xml.o
119
obj-y += envlist.o path.o
120 119

  
121 120
obj-i386-y += ioport-user.o
122 121

  
123
ARLIBS=libqemu.a
122
ARLIBS=../libuser/libuser.a libqemu.a
124 123

  
125 124
endif #CONFIG_DARWIN_USER
126 125

  
......
134 133

  
135 134
obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
136 135
        gdbstub.o gdbstub-xml.o uaccess.o
137
obj-y += envlist.o path.o
138 136

  
139 137
obj-i386-y += ioport-user.o
140 138

  
141
ARLIBS=libqemu.a
139
ARLIBS=../libuser/libuser.a libqemu.a
142 140

  
143 141
endif #CONFIG_BSD_USER
144 142

  
145
ifdef CONFIG_USER_ONLY
146
# hack to compile with -fpie for *-user targets
147
obj-y += tcg-runtime-user.o host-utils-user.o
148
obj-y += cutils-user.o cache-utils-user.o
149
tcg-runtime-user.c host-utils-user.c cutils-user.c cache-utils-user.c:
150
	@echo "  LN	$(TARGET_DIR)$@"
151
	@ln -s $(SRC_PATH)/$(@:%-user.c=%.c) $@
152
endif
153

  
154

  
155 143
#########################################################
156 144
# System emulator target
157 145
ifdef CONFIG_SOFTMMU
b/Makefile.user
1
# Makefile for qemu target independent user files.
2

  
3
include ../config-host.mak
4
include $(SRC_PATH)/rules.mak
5

  
6
.PHONY: all
7

  
8
VPATH=$(SRC_PATH)
9

  
10
QEMU_CFLAGS+=-I..
11

  
12
obj-y =
13
obj-y += envlist.o path.o
14
obj-y += tcg-runtime.o host-utils.o
15
obj-y += cutils.o cache-utils.o
16

  
17
all: libuser.a
18
# Dummy command so that make thinks it has done something
19
	@true
20

  
21
libuser.a: $(obj-y)
22

  
23
clean:
24
	rm -f *.o *.d *.a *~
25

  
26
# Include automatically generated dependency files
27
-include $(wildcard *.d */*.d)
b/configure
2489 2489
  echo "HWLIB=libqemuhw$hwlib.a" > $d/config.mak
2490 2490
  echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" >> $d/config.mak
2491 2491
done
2492

  
2493
d=libuser
2494
mkdir -p $d
2495
rm -f $d/Makefile
2496
ln -s $source_path/Makefile.user $d/Makefile

Also available in: Unified diff