Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. BUILD_DIR_INITIAL:= $(WRKBUILD)-initial
  8. BUILD_DIR_FINAL:= $(WRKBUILD)-final
  9. LLVM_TARGETS:=ARM
  10. $(BUILD_DIR_INITIAL)/.configured:
  11. (cd $(DL_DIR) && wget http://llvm.org/releases/3.8.0/cfe-3.8.0.src.tar.xz)
  12. (cd $(DL_DIR) && wget http://llvm.org/releases/3.8.0/compiler-rt-3.8.0.src.tar.xz)
  13. (cd $(WRKBUILD)/tools && tar xvf $(DL_DIR)/cfe-3.8.0.src.tar.xz && mv cfe-3.8.0.src clang)
  14. (cd $(WRKBUILD)/projects && tar xvf $(DL_DIR)/compiler-rt-3.8.0.src.tar.xz && mv compiler-rt-3.8.0.src compiler-rt)
  15. mkdir -p $(BUILD_DIR_INITIAL)
  16. cd $(BUILD_DIR_INITIAL); \
  17. PATH='$(HOST_PATH)' \
  18. cmake -DCMAKE_BUILD_TYPE=Release \
  19. -DCMAKE_INSTALL_PREFIX=$(TOOLCHAIN_DIR)/usr \
  20. -DLLVM_DEFAULT_TARGET_TRIPLE="arm-none-eabi" \
  21. -DCMAKE_CXX_FLAGS="-std=c++11" \
  22. -DLLVM_TARGETS_TO_BUILD=$(LLVM_TARGETS) \
  23. $(WRKBUILD)
  24. touch $@
  25. $(BUILD_DIR_INITIAL)/.compiled: $(BUILD_DIR_INITIAL)/.configured
  26. PATH='$(TARGET_PATH)' \
  27. $(MAKE) -C $(BUILD_DIR_INITIAL) all
  28. touch $@
  29. $(WRKBUILD)/.configured: $(BUILD_DIR_INITIAL)/.compiled
  30. PATH='$(TARGET_PATH)' \
  31. $(MAKE) -C $(BUILD_DIR_INITIAL) install
  32. touch $@
  33. $(WRKBUILD)/.compiled:
  34. touch $@
  35. $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
  36. touch $@
  37. $(WRKBUILD)/.final:
  38. touch $@
  39. include ${ADK_TOPDIR}/mk/toolchain.mk