Index: 23.0/Makefile
===================================================================
--- 23.0/Makefile (revision 47)
+++ 23.0/Makefile (revision 48)
@@ -82,7 +82,9 @@
build_target = $(TARGET_BUILD_DIR)/.build_done
install_target = $(TARGET_BUILD_DIR)/.install_done
+build_dev_dir = $(TARGET_BUILD_DIR)/build-dev
+
####### Targets
PKG_GROUP = libs
@@ -188,6 +190,14 @@
configure_switches += -Dprotobuf_BUILD_TESTS=OFF
+configure_dev_switches = -DCMAKE_BUILD_TYPE='Release'
+configure_dev_switches += -DCMAKE_INSTALL_PREFIX=/usr
+configure_dev_switches += -DCMAKE_INSTALL_LIBDIR=lib$(BUILD_MULTILIB_SUFFIX)
+configure_dev_switches += -DABSL_PROPAGATE_CXX_STD=ON
+configure_dev_switches += -DCMAKE_C_FLAGS='-Wno-psabi -Wno-attributes -Wno-stringop-overflow'
+configure_dev_switches += -DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-attributes -Wno-stringop-overflow'
+
+
####### Dependencies
$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
@@ -199,6 +209,15 @@
@touch $@
$(build_target): $(src_done)
+ # ======= Build development protoc =======
+ @mkdir -p $(build_dev_dir)
+ @( cd $(build_dev_dir) ; \
+ cmake $(configure_dev_switches) ../$(src_dir_name) ; \
+ )
+ @( cd $(build_dev_dir) ; \
+ $(MAKE) protoc ; \
+ )
+ # ======= Build target protoc =======
@mkdir -p $(build_dir)
@( cd $(build_dir) ; \
$(BUILD_ENVIRONMENT) cmake $(configure_switches) ../$(src_dir_name) ; \
@@ -211,6 +230,9 @@
$(install_target): $(build_target)
@mkdir -p $(PROTOBUF_PKG)
@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+ # ======= Install development protoc =======
+ @mkdir -p $(PROTOBUF_PKG)/usr/bin
+ @cp -a $(build_dev_dir)/protoc-$(version).0 $(PROTOBUF_PKG)/usr/bin/$(TARGET)-protoc
# ======= Install Documentation =======
@if [ -d $(PROTOBUF_PKG)/usr/share/man ]; then \
( cd $(PROTOBUF_PKG)/usr/share/man ; \
@@ -242,6 +264,8 @@
)
# ======= Install the same to $(TARGET_DEST_DIR) =======
$(call install-into-devenv, $(PROTOBUF_PKG))
+ # ======= Remove development protoc from target package =======
+ @rm -f $(PROTOBUF_PKG)/usr/bin/$(TARGET)-protoc
# ======= tune pkg-config *.pc search path to the target destination for development =======
@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
for file in `ls absl_*.pc` ; do \