Revision 4d904533

b/Makefile
80 80
endif
81 81

  
82 82
$(common-obj-y): $(GENERATED_HEADERS)
83
$(filter %-softmmu,$(SUBDIR_RULES)): $(common-obj-y)
83
$(filter %-softmmu,$(SUBDIR_RULES)): $(common-obj-y) subdir-libdis
84 84

  
85
$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) subdir-libuser
85
$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) subdir-libdis-user subdir-libuser
86 86

  
87 87
ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
88 88
romsubdir-%:
......
152 152
	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d
153 153
	rm -f qemu-img-cmds.h
154 154
	$(MAKE) -C tests clean
155
	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser; do \
155
	for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser libdis libdis-user; do \
156 156
	if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
157 157
        done
158 158

  
......
161 161
	rm -f config-all-devices.mak
162 162
	rm -f roms/seabios/config.mak roms/vgabios/config.mak
163 163
	rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pdf,pg,toc,tp,vr}
164
	for d in $(TARGET_DIRS) libhw32 libhw64 libuser; do \
164
	for d in $(TARGET_DIRS) libhw32 libhw64 libuser libdis libdis-user; do \
165 165
	rm -rf $$d || exit 1 ; \
166 166
        done
167 167

  
b/Makefile.dis
1
# Makefile for disassemblers.
2

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

  
7
.PHONY: all
8

  
9
$(call set-vpath, $(SRC_PATH))
10

  
11
QEMU_CFLAGS+=-I..
12

  
13
include $(SRC_PATH)/Makefile.objs
14

  
15
all: $(libdis-y)
16
# Dummy command so that make thinks it has done something
17
	@true
18

  
19
clean:
20
	rm -f *.o *.d *.a *~
21

  
22
# Include automatically generated dependency files
23
-include $(wildcard *.d */*.d)
b/Makefile.objs
154 154

  
155 155
hw-obj-y += dma-helpers.o sysbus.o isa-bus.o
156 156
hw-obj-$(CONFIG_QDEV_ADDR) += qdev-addr.o
157

  
158
######################################################################
159
# libdis
160
# NOTE: the disassembler code is only needed for debugging
161

  
162
libdis-y =
163
libdis-$(CONFIG_ALPHA_DIS) += alpha-dis.o
164
libdis-$(CONFIG_ARM_DIS) += arm-dis.o
165
libdis-$(CONFIG_CRIS_DIS) += cris-dis.o
166
libdis-$(CONFIG_HPPA_DIS) += hppa-dis.o
167
libdis-$(CONFIG_I386_DIS) += i386-dis.o
168
libdis-$(CONFIG_M68K_DIS) += m68k-dis.o
169
libdis-$(CONFIG_MICROBLAZE_DIS) += microblaze-dis.o
170
libdis-$(CONFIG_MIPS_DIS) += mips-dis.o
171
libdis-$(CONFIG_PPC_DIS) += ppc-dis.o
172
libdis-$(CONFIG_S390_DIS) += s390-dis.o
173
libdis-$(CONFIG_SH4_DIS) += sh4-dis.o
174
libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o
b/Makefile.target
55 55
libobj-$(CONFIG_NEED_MMU) += mmu.o
56 56
libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
57 57

  
58
# NOTE: the disassembler code is only needed for debugging
59 58
libobj-y += disas.o
60
libobj-$(CONFIG_ALPHA_DIS) += alpha-dis.o
61
libobj-$(CONFIG_ARM_DIS) += arm-dis.o
62
libobj-$(CONFIG_CRIS_DIS) += cris-dis.o
63
libobj-$(CONFIG_HPPA_DIS) += hppa-dis.o
64
libobj-$(CONFIG_I386_DIS) += i386-dis.o
65
libobj-$(CONFIG_M68K_DIS) += m68k-dis.o
66
libobj-$(CONFIG_MICROBLAZE_DIS) += microblaze-dis.o
67
libobj-$(CONFIG_MIPS_DIS) += mips-dis.o
68
libobj-$(CONFIG_PPC_DIS) += ppc-dis.o
69
libobj-$(CONFIG_S390_DIS) += s390-dis.o
70
libobj-$(CONFIG_SH4_DIS) += sh4-dis.o
71
libobj-$(CONFIG_SPARC_DIS) += sparc-dis.o
72 59

  
73 60
$(libobj-y): $(GENERATED_HEADERS)
74 61

  
......
116 103
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
117 104

  
118 105
obj-y += $(addprefix ../libuser/, $(user-obj-y))
106
obj-y += $(addprefix ../libdis-user/, $(libdis-y))
119 107
obj-y += $(libobj-y)
120 108

  
121 109
endif #CONFIG_LINUX_USER
......
142 130
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
143 131

  
144 132
obj-y += $(addprefix ../libuser/, $(user-obj-y))
133
obj-y += $(addprefix ../libdis-user/, $(libdis-y))
145 134
obj-y += $(libobj-y)
146 135

  
147 136
endif #CONFIG_DARWIN_USER
......
163 152
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
164 153

  
165 154
obj-y += $(addprefix ../libuser/, $(user-obj-y))
155
obj-y += $(addprefix ../libdis-user/, $(libdis-y))
166 156
obj-y += $(libobj-y)
167 157

  
168 158
endif #CONFIG_BSD_USER
......
329 319
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
330 320

  
331 321
obj-y += $(addprefix ../, $(common-obj-y))
322
obj-y += $(addprefix ../libdis/, $(libdis-y))
332 323
obj-y += $(libobj-y)
333 324
obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
334 325

  
b/configure
2273 2273
  fi
2274 2274
fi
2275 2275

  
2276
for d in libdis libdis-user; do
2277
    mkdir -p $d
2278
    rm -f $d/Makefile
2279
    ln -s $source_path/Makefile.dis $d/Makefile
2280
    echo > $d/config.mak
2281
done
2282

  
2276 2283
for target in $target_list; do
2277 2284
target_dir="$target"
2278 2285
config_target_mak=$target_dir/config-target.mak
......
2563 2570
cflags="-I\$(SRC_PATH)/tcg $cflags"
2564 2571
cflags="-I\$(SRC_PATH)/fpu $cflags"
2565 2572

  
2573
if test "$target_user_only" = "yes" ; then
2574
    libdis_config_mak=libdis-user/config.mak
2575
else
2576
    libdis_config_mak=libdis/config.mak
2577
fi
2578

  
2566 2579
for i in $ARCH $TARGET_BASE_ARCH ; do
2567 2580
  case "$i" in
2568 2581
  alpha)
2569 2582
    echo "CONFIG_ALPHA_DIS=y"  >> $config_target_mak
2583
    echo "CONFIG_ALPHA_DIS=y"  >> $libdis_config_mak
2570 2584
  ;;
2571 2585
  arm)
2572 2586
    echo "CONFIG_ARM_DIS=y"  >> $config_target_mak
2587
    echo "CONFIG_ARM_DIS=y"  >> $libdis_config_mak
2573 2588
  ;;
2574 2589
  cris)
2575 2590
    echo "CONFIG_CRIS_DIS=y"  >> $config_target_mak
2591
    echo "CONFIG_CRIS_DIS=y"  >> $libdis_config_mak
2576 2592
  ;;
2577 2593
  hppa)
2578 2594
    echo "CONFIG_HPPA_DIS=y"  >> $config_target_mak
2595
    echo "CONFIG_HPPA_DIS=y"  >> $libdis_config_mak
2579 2596
  ;;
2580 2597
  i386|x86_64)
2581 2598
    echo "CONFIG_I386_DIS=y"  >> $config_target_mak
2599
    echo "CONFIG_I386_DIS=y"  >> $libdis_config_mak
2582 2600
  ;;
2583 2601
  m68k)
2584 2602
    echo "CONFIG_M68K_DIS=y"  >> $config_target_mak
2603
    echo "CONFIG_M68K_DIS=y"  >> $libdis_config_mak
2585 2604
  ;;
2586 2605
  microblaze)
2587 2606
    echo "CONFIG_MICROBLAZE_DIS=y"  >> $config_target_mak
2607
    echo "CONFIG_MICROBLAZE_DIS=y"  >> $libdis_config_mak
2588 2608
  ;;
2589 2609
  mips*)
2590 2610
    echo "CONFIG_MIPS_DIS=y"  >> $config_target_mak
2611
    echo "CONFIG_MIPS_DIS=y"  >> $libdis_config_mak
2591 2612
  ;;
2592 2613
  ppc*)
2593 2614
    echo "CONFIG_PPC_DIS=y"  >> $config_target_mak
2615
    echo "CONFIG_PPC_DIS=y"  >> $libdis_config_mak
2594 2616
  ;;
2595 2617
  s390*)
2596 2618
    echo "CONFIG_S390_DIS=y"  >> $config_target_mak
2619
    echo "CONFIG_S390_DIS=y"  >> $libdis_config_mak
2597 2620
  ;;
2598 2621
  sh4)
2599 2622
    echo "CONFIG_SH4_DIS=y"  >> $config_target_mak
2623
    echo "CONFIG_SH4_DIS=y"  >> $libdis_config_mak
2600 2624
  ;;
2601 2625
  sparc*)
2602 2626
    echo "CONFIG_SPARC_DIS=y"  >> $config_target_mak
2627
    echo "CONFIG_SPARC_DIS=y"  >> $libdis_config_mak
2603 2628
  ;;
2604 2629
  esac
2605 2630
done

Also available in: Unified diff