Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=llvm
  9. PKG_VERSION:=r83568
  10. PKG_SOURCE_VERSION:=5687d8a26c08d089c60df2c92d048ab85bcdb2b9
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=git://repo.or.cz/llvm.git
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_HOST)
  16. include $(INCLUDE_DIR)/toolchain-build.mk
  17. ifeq ($(HOST_OS),Darwin)
  18. DARWIN_VERSION=$(shell sw_vers -productVersion)
  19. DARWIN_MAJVERS=$(firstword $(subst ., ,$(DARWIN_VERSION)))
  20. HOST_MAKE_FLAGS += \
  21. DARWIN_VERSION=$(DARWIN_VERSION) \
  22. DARWIN_MAJVERS=$(DARWIN_MAJVERS)
  23. endif
  24. HOST_CONFIGURE_ARGS += \
  25. --enable-optimized --enable-assertions
  26. define Host/Compile
  27. @-$(MAKE) -C $(HOST_BUILD_DIR) $(HOST_MAKE_FLAGS) uninstall
  28. $(MAKE) -C $(HOST_BUILD_DIR) $(HOST_MAKE_FLAGS)
  29. endef
  30. define Host/Install
  31. rm -f $(BUILD_DIR_HOST)/llvm
  32. ln -s llvm-$(PKG_VERSION) $(BUILD_DIR_HOST)/llvm
  33. $(MAKE) -C $(HOST_BUILD_DIR) $(HOST_MAKE_FLAGS) install
  34. endef
  35. $(eval $(call HostBuild))