Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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-gmp='${STAGING_HOST_DIR}/usr' \
  28. --with-mpfr='${STAGING_HOST_DIR}/usr' \
  29. --with-expat \
  30. --with-libexpat-prefix='${STAGING_HOST_DIR}/usr' \
  31. --with-libiconv-prefix='${STAGING_HOST_DIR}/usr' \
  32. --disable-dependency-tracking \
  33. --without-uiout \
  34. --enable-gdbmi \
  35. --disable-gdbtk \
  36. --without-included-gettext \
  37. --disable-libtool-lock \
  38. --disable-nls \
  39. --with-curses \
  40. --enable-threads \
  41. --disable-tui \
  42. --disable-werror \
  43. --disable-install-libiberty \
  44. --without-python \
  45. --without-x \
  46. $(CONFIGURE_ARGS) \
  47. );
  48. touch $@
  49. $(WRKBUILD)/.compiled:
  50. PATH='$(HOST_PATH)' $(MAKE) ${GDB_MAKEOPTS} -C $(GDB_BUILD_DIR) CFLAGS="-fPIC ${CFLAGS_FOR_BUILD}"
  51. touch $@
  52. $(WRKBUILD)/.installed:
  53. $(INSTALL_BIN) $(GDB_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb
  54. ifeq ($(ADK_TARGET_SIM),y)
  55. ifeq ($(ADK_TARGET_ARCH_BFIN),y)
  56. $(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/bfin/run $(TARGET_CROSS)run
  57. endif
  58. ifeq ($(ADK_TARGET_ARCH_FRV),y)
  59. $(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/frv/run $(TARGET_CROSS)run
  60. endif
  61. ifeq ($(ADK_TARGET_ARCH_H8300),y)
  62. $(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/h8300/run $(TARGET_CROSS)run
  63. endif
  64. endif
  65. touch $@
  66. include ${ADK_TOPDIR}/mk/toolchain.mk