Revision a540f158

b/Makefile
145 145
$(SRC_PATH)/pixman/configure:
146 146
	(cd $(SRC_PATH)/pixman; autoreconf -v --install)
147 147

  
148
DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
149
DTC_CFLAGS=$(CFLAGS) $(extra_cflags) -I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
150

  
151
subdir-dtc:dtc/libfdt dtc/tests
152
	$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt,)
153

  
154
dtc/%:
155
	mkdir -p $@
156

  
148 157
$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y)
149 158

  
150 159
ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
......
262 271
	rm -rf $$d || exit 1 ; \
263 272
        done
264 273
	if test -f pixman/config.log; then make -C pixman distclean; fi
274
	if test -f dtc/version_gen.h; then make $(DTC_MAKE_ARGS) clean; fi
265 275

  
266 276
KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
267 277
ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
b/configure
2496 2496
int main(void) { return 0; }
2497 2497
EOF
2498 2498
  if compile_prog "" "$fdt_libs" ; then
2499
    # system DTC is good - use it
2499 2500
    fdt=yes
2500
    libs_softmmu="$libs_softmmu $fdt_libs"
2501
  else
2502
    if test "$fdt" = "yes" ; then
2503
      feature_not_found "fdt"
2501
  elif test -d ${source_path}/dtc/libfdt ; then
2502
    # have submodule DTC - use it
2503
    fdt=yes
2504
    dtc_internal="yes"
2505
    mkdir -p dtc
2506
    if [ "$source_path" != `pwd` ] ; then
2507
       symlink "$source_path/dtc/Makefile" "dtc/Makefile"
2508
       symlink "$source_path/dtc/scripts" "dtc/scripts"
2504 2509
    fi
2510
    fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
2511
    fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
2512
  elif test "$fdt" = "yes" ; then
2513
    # have neither and want - prompt for system/submodule install
2514
    error_exit "ERROR: DTC not present. Your options:" \
2515
        "  (1) Preferred: Install the DTC devel package" \
2516
        "  (2) Fetch the DTC submodule, using:" \
2517
        "      git submodule update --init dtc"
2518
  else
2519
    # don't have and don't want
2505 2520
    fdt_libs=
2506 2521
    fdt=no
2507 2522
  fi
2508 2523
fi
2509 2524

  
2525
libs_softmmu="$libs_softmmu $fdt_libs"
2526

  
2510 2527
##########################################
2511 2528
# GLX probe, used by milkymist-tmu2
2512 2529
if test "$glx" != "no" ; then
......
3452 3469
fi
3453 3470

  
3454 3471
# add pixman flags after all config tests are done
3455
QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags"
3472
QEMU_CFLAGS="$QEMU_CFLAGS $pixman_cflags $fdt_cflags"
3456 3473
libs_softmmu="$libs_softmmu $pixman_libs"
3457 3474

  
3458 3475
echo "Install prefix    $prefix"
......
4515 4532
  echo "config-host.h: subdir-pixman" >> $config_host_mak
4516 4533
fi
4517 4534

  
4535
if [ "$dtc_internal" = "yes" ]; then
4536
  echo "config-host.h: subdir-dtc" >> $config_host_mak
4537
fi
4538

  
4518 4539
# build tree in object directory in case the source is not in the current directory
4519 4540
DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos"
4520 4541
DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"

Also available in: Unified diff