libbase.mk: modifications to make it build in yocto environment Adding an include file that is setting the common flags. Changed the cppflag to include the headers from other components of android-tools Modified LDflags so that the libraries that are coming from other android-tools are searched in the output folder. Modified the build rule so that it outputs the binary to the OUT_DIR Signed-off-by: Nisha Parrakat --- git/system/core/debian/libbase.mk 2021-04-29 22:01:13.664181133 +0200 +++ git/system/core/debian/libbase.mk 2021-04-29 22:04:52.328123833 +0200 @@ -1,3 +1,4 @@ +include ../../rules_yocto.mk NAME = libbase SOURCES = \ chrono_utils.cpp \ @@ -20,8 +21,9 @@ LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 build: $(SOURCES) - $(CXX) $^ -o $(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) - ln -s $(NAME).so.0 $(NAME).so + $(CXX) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) + ln -s $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so + cp -r base/include/* $(OUT_DIR)/usr/include/ clean: - $(RM) $(NAME).so* + $(RM) $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so*