protobuf.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ################################################################################
  2. #
  3. # protobuf
  4. #
  5. ################################################################################
  6. # When bumping this package, make sure to also verify if the
  7. # python-protobuf package still works and to update its hash,
  8. # as they share the same version/site variables.
  9. PROTOBUF_VERSION = 3.13.0
  10. PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
  11. PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
  12. PROTOBUF_LICENSE = BSD-3-Clause
  13. PROTOBUF_LICENSE_FILES = LICENSE
  14. # N.B. Need to use host protoc during cross compilation.
  15. PROTOBUF_DEPENDENCIES = host-protobuf
  16. PROTOBUF_CONF_OPTS = --with-protoc=$(HOST_DIR)/bin/protoc
  17. PROTOBUF_CXXFLAGS = $(TARGET_CXXFLAGS)
  18. ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
  19. PROTOBUF_CXXFLAGS += -O0
  20. endif
  21. PROTOBUF_CONF_ENV = CXXFLAGS="$(PROTOBUF_CXXFLAGS)"
  22. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
  23. PROTOBUF_CONF_ENV += LIBS=-latomic
  24. endif
  25. PROTOBUF_INSTALL_STAGING = YES
  26. ifeq ($(BR2_PACKAGE_ZLIB),y)
  27. PROTOBUF_DEPENDENCIES += zlib
  28. endif
  29. $(eval $(autotools-package))
  30. $(eval $(host-autotools-package))