Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. endif
  16. $(WRKBUILD)/.configured:
  17. (cd $(WRKBUILD); \
  18. CC='' \
  19. CFLAGS='' \
  20. LDFLAGS='' \
  21. ./configure --prefix=/usr \
  22. --target=$(GNU_TARGET_NAME) \
  23. --disable-nls \
  24. $(NEWLIB_CONFIGURE_ARGS) \
  25. )
  26. touch $@
  27. $(WRKBUILD)/.compiled:
  28. PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
  29. CC='' \
  30. CFLAGS='$(TARGET_CFLAGS)' \
  31. all
  32. touch $@
  33. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  34. PATH='$(HOST_PATH)' $(MAKE) -C $(WRKBUILD) \
  35. CC='' \
  36. CFLAGS='$(TARGET_CFLAGS)' \
  37. DESTDIR=$(STAGING_TARGET_DIR) \
  38. install
  39. touch $@
  40. include ${ADK_TOPDIR}/mk/toolchain.mk