open-plc-utils.mk 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. ################################################################################
  2. #
  3. # open-plc-utils
  4. #
  5. ################################################################################
  6. OPEN_PLC_UTILS_VERSION = 1be781d1ea81827e5f6c1a35961c65dd4d15472c
  7. OPEN_PLC_UTILS_SITE = $(call github,qca,open-plc-utils,$(OPEN_PLC_UTILS_VERSION))
  8. OPEN_PLC_UTILS_LICENSE = BSD-3-Clause
  9. OPEN_PLC_UTILS_LICENSE_FILES = LICENSE
  10. # We unfortunately can't use TARGET_CONFIGURE_OPTS, as it would
  11. # override the package CFLAGS, LDFLAGS and CXXFLAGS definitions.
  12. #
  13. # Yes, we're passing __UCLIBC__ in EXTRA_CFLAGS, as it fixes a build
  14. # issue for non-uClibc toolchains. It is the very crappy solution
  15. # suggested at https://github.com/qca/open-plc-utils/issues/36.
  16. OPEN_PLC_UTILS_MAKE_OPTS = \
  17. EXTRA_CFLAGS="$(TARGET_CFLAGS) -D__UCLIBC__" \
  18. EXTRA_CXXFLAGS="$(TARGET_CXXFLAGS)" \
  19. EXTRA_LDFLAGS="$(TARGET_LDFLAGS)"
  20. define OPEN_PLC_UTILS_BUILD_CMDS
  21. $(TARGET_MAKE_ENV) $(MAKE) CROSS=$(TARGET_CROSS) \
  22. $(OPEN_PLC_UTILS_MAKE_OPTS) -C $(@D)
  23. endef
  24. define OPEN_PLC_UTILS_INSTALL_TARGET_CMDS
  25. $(TARGET_MAKE_ENV) $(MAKE) ROOTFS=$(TARGET_DIR) -C $(@D) install
  26. endef
  27. $(eval $(generic-package))