Revision cec7d0b6

b/Makefile
26 26

  
27 27
all: $(TOOLS) $(DOCS) recurse-all 
28 28

  
29
subdir-%: dyngen$(EXESUF) libqemu_common.a
29
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
30

  
31
subdir-%: dyngen$(EXESUF)
30 32
	$(MAKE) -C $(subst subdir-,,$@) all
31 33

  
32
recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
34
$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
35
$(filter %-user,$(SUBDIR_RULES)): libqemu_user.a
36

  
37
recurse-all: $(SUBDIR_RULES)
33 38

  
34 39
#######################################################################
35 40
# BLOCK_OBJS is code used by both qemu system emulation and qemu-img
......
141 146
	rm -f $@ 
142 147
	$(AR) rcs $@ $(OBJS)
143 148

  
149
#######################################################################
150
# USER_OBJS is code used by qemu userspace emulation
151
USER_OBJS=cutils.o
152

  
153
libqemu_user.a: $(USER_OBJS)
154
	rm -f $@ 
155
	$(AR) rcs $@ $(USER_OBJS)
156

  
144 157
QEMU_IMG_BLOCK_OBJS = $(BLOCK_OBJS)
145 158
ifdef CONFIG_WIN32
146 159
QEMU_IMG_BLOCK_OBJS += qemu-img-block-raw-win32.o
b/Makefile.target
414 414
endif
415 415

  
416 416
OBJS+= libqemu.a
417
OBJS+= ../libqemu_common.a
418 417

  
419 418
# Note: this is a workaround. The real fix is to avoid compiling
420 419
# cpu_signal_handler() in cpu-exec.c.
421 420
signal.o: signal.c
422 421
	$(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
423 422

  
424
$(QEMU_PROG): $(OBJS)
423
$(QEMU_PROG): $(OBJS) ../libqemu_user.a
425 424
	$(CC) $(LDFLAGS) -o $@ $^  $(LIBS)
426 425
ifeq ($(ARCH),alpha)
427 426
# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of

Also available in: Unified diff