libext4_utils.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 and header to the OUT_DIR Signed-off-by: Nisha Parrakat --- git/system/extras/debian/libext4_utils.mk 2021-04-29 21:46:39.384394114 +0000 +++ git/system/extras/debian/libext4_utils.mk 2021-04-29 21:49:53.808605543 +0000 @@ -1,3 +1,4 @@ +include ../../rules_yocto.mk NAME = libext4_utils ext4_utils_SOURCES := \ @@ -17,14 +18,16 @@ -Iext4_utils/include \ -Ilibfec/include \ -Isquashfs_utils \ - -I/usr/include/android \ + -I/usr/include/android -I$(OUT_DIR)/usr/include \ -D_GNU_SOURCE -DFEC_NO_KLOG -DSQUASHFS_NO_KLOG -D_LARGEFILE64_SOURCE LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \ -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ - -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \ + -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ \ -lbase -lsparse -lselinux build: $(SOURCES) - mkdir --parents $(OUT_DIR) - $(CC) $^ -o $(OUT_DIR)/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) - ln -s $(NAME).so.0 $(OUT_DIR)/$(NAME).so + mkdir --parents $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ + $(CC) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) + ln -s $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so + cp -r ext4_utils/include/* $(OUT_DIR)/usr/include/ +