liblog: CB Update liblog module library copy pattern [1/1]
PD#TV-72075
Problem:
lge request liblog.so have soname
but after add the feature compile fail
Solution:
modify Makefile to generate soname & realname
Verify:
local s4_ap222
Signed-off-by: Jiacai.Liu <jiacai.liu@amlogic.com>
Change-Id: I056052c0ce2c1541f439fc995f6de5ef178320fc
diff --git a/liblog/Makefile b/liblog/Makefile
index f25143b..a6da031 100644
--- a/liblog/Makefile
+++ b/liblog/Makefile
@@ -5,16 +5,19 @@
CFLAGS += -fPIC -I$(LIBLOG_SRC_DIR)/include/
LDFLAGS += -L./lib -lglibc_bridge -lc++.so -lc++abi.so
TARGET=liblog.so
-SONAME_TARTGET=liblog.so.${SO_VERSION}
+SONAME_TARGET=liblog.so.${SO_VERSION}
REAL_TARGET=liblog.so.${SO_REALNAME}
# rules
-all: $(TARGET)
+all: $(TARGET) ${SONAME_TARGET} ${REAL_TARGET}
$(REAL_TARGET): $(OBJC)
- $(CC) -fPIC -g -shared -Wl,-soname,${SONAME_TARTGET} -o $@ $^
+ $(CC) -fPIC -g -shared -Wl,-soname,${SONAME_TARGET} -o $@ $^
-$(TARGET): $(REAL_TARGET)
+$(SONAME_TARGET): $(REAL_TARGET)
+ ln -s $^ $@
+
+$(TARGET): $(SONAME_TARGET)
ln -s $^ $@
$(OBJC):%.o:%.c
@@ -28,6 +31,8 @@
install:
install -m 755 $(TARGET) $(STAGING_DIR)/usr/lib
install -m 755 $(TARGET) $(TARGET_DIR)/usr/lib
+ install -m 755 $(SONAME_TARGET) $(STAGING_DIR)/usr/lib
+ install -m 755 $(SONAME_TARGET) $(TARGET_DIR)/usr/lib
install -m 755 $(REAL_TARGET) $(STAGING_DIR)/usr/lib
install -m 755 $(REAL_TARGET) $(TARGET_DIR)/usr/lib
mkdir -p $(STAGING_DIR)/usr/include/android