Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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); \
  20. gdb_cv_func_sigsetjmp=yes \
  21. $(WRKBUILD)/configure \
  22. --prefix=$(STAGING_HOST_DIR) \
  23. --build=$(GNU_HOST_NAME) \
  24. --host=$(GNU_HOST_NAME) \
  25. --target=$(GNU_TARGET_NAME) \
  26. --disable-dependency-tracking \
  27. --without-uiout \
  28. --enable-gdbmi \
  29. --disable-gdbtk \
  30. --without-included-gettext \
  31. --disable-libtool-lock \
  32. --disable-nls \
  33. --with-curses \
  34. --enable-threads \
  35. --disable-tui \
  36. --disable-werror \
  37. --disable-install-libiberty \
  38. --without-python \
  39. --without-x \
  40. $(CONFIGURE_ARGS) \
  41. );
  42. touch $@
  43. $(WRKBUILD)/.compiled:
  44. $(MAKE) ${GDB_MAKEOPTS} -C $(GDB_BUILD_DIR) CFLAGS="-fPIC ${CFLAGS_FOR_BUILD}"
  45. touch $@
  46. $(WRKBUILD)/.installed:
  47. $(INSTALL_BIN) $(GDB_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb
  48. ifeq ($(ADK_TARGET_SIM),y)
  49. ifeq ($(ADK_TARGET_ARCH_BFIN),y)
  50. $(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/bfin/run $(TARGET_CROSS)run
  51. endif
  52. ifeq ($(ADK_TARGET_ARCH_H8300),y)
  53. $(INSTALL_BIN) $(GDB_BUILD_DIR)/sim/h8300/run $(TARGET_CROSS)run
  54. endif
  55. endif
  56. touch $@
  57. include ${ADK_TOPDIR}/mk/toolchain.mk