Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. include ../rules.mk
  5. include Makefile.inc
  6. include ${ADK_TOPDIR}/mk/buildhlp.mk
  7. GDB_BUILD_DIR:= $(WRKBUILD)-obj
  8. ifeq (${ADK_MAKE_PARALLEL},y)
  9. GDB_MAKEOPTS+= -j${ADK_MAKE_JOBS}
  10. endif
  11. ifeq ($(ADK_TARGET_SIM),y)
  12. CONFIGURE_ARGS:= --enable-sim --enable-sim-stdio
  13. else
  14. CONFIGURE_ARGS:= --disable-sim
  15. endif
  16. $(WRKBUILD)/.configured:
  17. $(SED) 's/install_to_$(INSTALL_DEST) //' ${WRKBUILD}/libiberty/Makefile.in
  18. mkdir -p $(GDB_BUILD_DIR)
  19. (cd $(GDB_BUILD_DIR); PATH='$(HOST_PATH)' \
  20. gdb_cv_func_sigsetjmp=yes \
  21. M4='${STAGING_HOST_DIR}/usr/bin/m4' \
  22. $(WRKBUILD)/configure \
  23. --prefix=$(STAGING_HOST_DIR) \
  24. --build=$(GNU_HOST_NAME) \
  25. --host=$(GNU_HOST_NAME) \
  26. --target=$(GNU_TARGET_NAME) \
  27. --with-libgmp-prefix='${STAGING_HOST_DIR}/usr' \
  28. --disable-dependency-tracking \
  29. --without-uiout \
  30. --enable-gdbmi \
  31. --disable-gdbtk \
  32. --without-included-gettext \
  33. --disable-libtool-lock \
  34. --disable-nls \
  35. --with-curses \
  36. --enable-threads \
  37. --disable-tui \
  38. --disable-werror \
  39. --disable-install-libiberty \
  40. --without-python \
  41. --without-x \
  42. $(CONFIGURE_ARGS) \
  43. );
  44. touch $@
  45. $(WRKBUILD)/.compiled:
  46. PATH='$(HOST_PATH)' $(MAKE) ${GDB_MAKEOPTS} -C $(GDB_BUILD_DIR) CFLAGS="-fPIC ${CFLAGS_FOR_BUILD}"
  47. touch $@
  48. $(WRKBUILD)/.installed:
  49. $(INSTALL_BIN) $(GDB_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb
  50. ifeq ($(ADK_TARGET_SIM),y)
  51. ifeq ($(ADK_TARGET_ARCH_BFIN),y)
  52. $(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/bfin/run $(TARGET_CROSS)run
  53. endif
  54. ifeq ($(ADK_TARGET_ARCH_FRV),y)
  55. $(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/frv/run $(TARGET_CROSS)run
  56. endif
  57. ifeq ($(ADK_TARGET_ARCH_H8300),y)
  58. $(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/h8300/run $(TARGET_CROSS)run
  59. endif
  60. endif
  61. touch $@
  62. include ${ADK_TOPDIR}/mk/toolchain.mk