Makefile 1.8 KB

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