Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. NEWLIB_CONFIGURE_ARGS:= --enable-newlib-io-long-long \
  8. --enable-newlib-register-fini \
  9. --disable-newlib-supplied-syscalls
  10. ifeq ($(ADK_TARGET_OS_FROSTED),y)
  11. NEWLIB_CONFIGURE_ARGS+= --enable-newlib-fvwrite-in-streamio=no \
  12. --enable-newlib-fseek-optimization=no \
  13. --enable-newlib_wide_orient=no \
  14. --enable-newlib-unbuf-stream-opt=yes
  15. TARGET_CFLAGS+="-DREENTRANT_SYSCALLS_PROVIDED"
  16. endif
  17. $(WRKBUILD)/.configured:
  18. (cd $(WRKBUILD); \
  19. CC='' \
  20. CFLAGS='' \
  21. LDFLAGS='' \
  22. CFLAGS_FOR_TARGET='$(TARGET_CFLAGS)' \
  23. ./configure --prefix=/usr \
  24. --target=$(GNU_TARGET_NAME) \
  25. --disable-nls \
  26. $(NEWLIB_CONFIGURE_ARGS) \
  27. )
  28. touch $@
  29. $(WRKBUILD)/.compiled:
  30. PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
  31. CC='' \
  32. CFLAGS='' \
  33. CFLAGS_FOR_TARGET='$(TARGET_CFLAGS)' \
  34. all
  35. touch $@
  36. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  37. PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
  38. CC='' \
  39. CFLAGS='' \
  40. CFLAGS_FOR_TARGET='$(TARGET_CFLAGS)' \
  41. DESTDIR=$(STAGING_TARGET_DIR) \
  42. install
  43. touch $@
  44. include ${ADK_TOPDIR}/mk/toolchain.mk