patching liblog.mk to build in yocto environment.
|
|
Changes include:
|
Introduced an output folder which will keep all the outputs from the
|
android-tools.
|
|
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 <Nisha.Parrakat@kpit.com>
|
|
Upstream-Status: Pending
|
|
--- git/system/core/debian/liblog.mk 2021-05-17 08:13:28.304700936 +0000
|
+++ git/system/core/debian/liblog.mk 2021-05-17 08:15:59.590064282 +0000
|
@@ -1,3 +1,4 @@
|
+include ../../rules_yocto.mk
|
NAME = liblog
|
|
# copied from liblog/Android.bp
|
@@ -39,11 +40,12 @@
|
LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 -lpthread
|
|
build: $(COBJECTS) $(CXXOBJECTS)
|
- $(CXX) $^ -o $(NAME).so.0 $(LDFLAGS)
|
- ln -s $(NAME).so.0 $(NAME).so
|
+ $(CXX) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(LDFLAGS)
|
+ ln -s $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so
|
+ cp -r liblog/include/* $(OUT_DIR)/usr/include/
|
|
clean:
|
- $(RM) $(COBJECTS) $(CXXOBJECTS) $(NAME).so*
|
+ $(RM) $(COBJECTS) $(CXXOBJECTS) $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so*
|
|
$(COBJECTS): %.o: %.c
|
$(CC) $< -o $@ $(CFLAGS) $(CPPFLAGS)
|