gluon.mk 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ifneq ($(__gluon_inc),1)
  2. __gluon_inc=1
  3. GLUON_SITEDIR ?= $(GLUONDIR)/site
  4. GLUON_BUILDDIR ?= $(GLUONDIR)/build
  5. GLUON_ORIGOPENWRTDIR := $(GLUONDIR)/openwrt
  6. GLUON_SITE_CONFIG := $(GLUON_SITEDIR)/site.conf
  7. GLUON_OUTPUTDIR ?= $(GLUONDIR)/output
  8. GLUON_IMAGEDIR ?= $(GLUON_OUTPUTDIR)/images
  9. GLUON_MODULEDIR ?= $(GLUON_OUTPUTDIR)/modules
  10. export GLUONDIR GLUON_SITEDIR GLUON_BUILDDIR GLUON_SITE_CONFIG GLUON_OUTPUTDIR GLUON_IMAGEDIR GLUON_MODULEDIR
  11. BOARD_BUILDDIR = $(GLUON_BUILDDIR)/$(GLUON_TARGET)
  12. BOARD_KDIR = $(BOARD_BUILDDIR)/kernel
  13. export BOARD_BUILDDIR
  14. LINUX_RELEASE := 2
  15. export LINUX_RELEASE
  16. GLUON_OPENWRTDIR = $(BOARD_BUILDDIR)/openwrt
  17. $(GLUON_SITEDIR)/site.mk:
  18. $(error There was no site configuration found. Please check out a site configuration to $(GLUON_SITEDIR))
  19. -include $(GLUON_SITEDIR)/site.mk
  20. GLUON_VERSION := $(shell cd $(GLUONDIR) && git describe --always 2>/dev/null || echo unknown)
  21. export GLUON_VERSION
  22. GLUON_LANGS ?= en
  23. export GLUON_LANGS
  24. ifeq ($(OPENWRT_BUILD),1)
  25. ifeq ($(GLUON_TOOLS),1)
  26. GLUON_OPENWRT_FEEDS := base packages luci routing telephony management
  27. export GLUON_OPENWRT_FEEDS
  28. GLUON_SITE_CODE := $(shell $(GLUONDIR)/scripts/site.sh site_code)
  29. export GLUON_SITE_CODE
  30. ifeq ($(GLUON_RELEASE),)
  31. $(error GLUON_RELEASE not set. GLUON_RELEASE can be set in site.mk or on the command line.)
  32. endif
  33. export GLUON_RELEASE
  34. endif
  35. endif
  36. define merge-lists
  37. $(1) :=
  38. $(foreach var,$(2),$(1) := $$(filter-out -% $$(patsubst -%,%,$$(filter -%,$$($(var)))),$$($(1)) $$($(var)))
  39. )
  40. endef
  41. GLUON_TARGETS :=
  42. define GluonTarget
  43. gluon_target := $(1)$$(if $(2),-$(2))
  44. GLUON_TARGETS += $$(gluon_target)
  45. GLUON_TARGET_$$(gluon_target)_BOARD := $(1)
  46. GLUON_TARGET_$$(gluon_target)_SUBTARGET := $(2)
  47. endef
  48. GLUON_DEFAULT_PACKAGES := gluon-core kmod-ipv6 firewall ip6tables -uboot-envtools -wpad-mini hostapd-mini
  49. override DEFAULT_PACKAGES.router :=
  50. endif #__gluon_inc