Commit cec7d0b6e187f57d67f8624794ec3f15d76953f4
1 parent
093f8f06
Don't link usermode emulation against libqemu_common.a
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4607 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
16 additions
and
4 deletions
Makefile
| ... | ... | @@ -26,10 +26,15 @@ LIBS+=$(AIOLIBS) |
| 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,6 +146,14 @@ libqemu_common.a: $(OBJS) |
| 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 | ... | ... |
Makefile.target
| ... | ... | @@ -414,14 +414,13 @@ OBJS+=gdbstub.o |
| 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 | ... | ... |