open-plc-utils.mk 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. ################################################################################
  2. #
  3. # open-plc-utils
  4. #
  5. ################################################################################
  6. OPEN_PLC_UTILS_VERSION = 32408520fcebe785983a68e39ec83830a3005779
  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) \
  26. BIN="$(TARGET_DIR)/usr/bin" -C $(@D) install
  27. endef
  28. $(eval $(generic-package))