gluon.mk 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ifneq ($(__gluon_inc),1)
  2. __gluon_inc=1
  3. GLUON_SITEDIR := $(GLUONDIR)/site
  4. GLUON_IMAGEDIR := $(GLUONDIR)/images
  5. GLUON_OPENWRTDIR := $(GLUONDIR)/openwrt
  6. GLUON_BUILDDIR := $(GLUONDIR)/build
  7. BOARD_BUILDDIR = $(GLUON_BUILDDIR)/$(BOARD)
  8. BOARD_KDIR = $(BOARD_BUILDDIR)/kernel
  9. export GLUONDIR GLUON_SITEDIR GLUON_IMAGEDIR GLUON_OPENWRTDIR GLUON_BUILDDIR
  10. CONFIG_VERSION_REPO := http://downloads.openwrt.org/attitude_adjustment/12.09/%S/packages
  11. export CONFIG_VERSION_REPO
  12. $(GLUON_SITEDIR)/site.mk:
  13. $(error There was no site configuration found. Please check out a site configuration to $(GLUON_SITEDIR))
  14. -include $(GLUON_SITEDIR)/site.mk
  15. GLUON_CONFIG_VERSION := $(shell cd $(GLUON_SITEDIR) && git describe --always --dirty=.$$(stat -c %Y $(GLUON_SITEDIR)/site.conf) 2>/dev/null || stat -c %Y site.conf)
  16. export GLUON_CONFIG_VERSION
  17. GLUON_SITE_CODE := $(shell $(GLUONDIR)/scripts/site.sh site_code)
  18. export GLUON_SITE_CODE
  19. GLUON_RELEASE ?= $(shell $(GLUONDIR)/scripts/site.sh release)
  20. export GLUON_RELEASE
  21. define merge-lists
  22. $(1) :=
  23. $(foreach var,$(2),$(1) := $$(sort $$(filter-out -% $$(patsubst -%,%,$$(filter -%,$$($(var)))),$$($(1)) $$($(var))))
  24. )
  25. endef
  26. regex-escape = $(shell echo '$(1)' | sed -e 's/[]\/()$*.^|[]/\\&/g')
  27. GLUON_DEFAULT_PACKAGES := gluon-core kmod-ipv6 firewall ip6tables -uboot-envtools
  28. override DEFAULT_PACKAGES.router :=
  29. endif #__gluon_inc