1
0

Makefile 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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. $(WRKBUILD)/.configured:
  14. (cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
  15. CFLAGS='$(TARGET_CFLAGS)' \
  16. ./configure --prefix=/usr \
  17. --target=$(GNU_TARGET_NAME) \
  18. --disable-gcc-wrapper \
  19. )
  20. touch $@
  21. $(WRKBUILD)/.compiled:
  22. $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' all
  23. touch $@
  24. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  25. $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' DESTDIR=$(STAGING_TARGET_DIR) install
  26. touch $@
  27. $(WRKBUILD)/.final:
  28. touch $@
  29. include ${ADK_TOPDIR}/mk/toolchain.mk