1
0

Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. ifeq ($(ADK_TARGET_CPU_ARCH),ppc)
  8. GNU_TARGET_NAME:= $(subst ppc,powerpc,$(GNU_TARGET_NAME))
  9. endif
  10. # not yet possible
  11. TARGET_CFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CFLAGS))
  12. TARGET_LDFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_LDFLAGS))
  13. # don't use fast-math for C library
  14. TARGET_CFLAGS:= $(filter-out -ffast-math,$(TARGET_CFLAGS))
  15. $(WRKBUILD)/.configured:
  16. (cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
  17. CFLAGS='$(TARGET_CFLAGS)' \
  18. ./configure --prefix=/usr \
  19. --target=$(GNU_TARGET_NAME) \
  20. --disable-gcc-wrapper \
  21. )
  22. touch $@
  23. $(WRKBUILD)/.compiled:
  24. $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' all
  25. touch $@
  26. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  27. $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' DESTDIR=$(STAGING_TARGET_DIR) install
  28. touch $@
  29. $(WRKBUILD)/.final:
  30. touch $@
  31. include ${ADK_TOPDIR}/mk/toolchain.mk