blob: efccfab9c16b52a27fe7e07657295e37c9f8926c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
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 <Nisha.Parrakat@kpit.com>
--- 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/
+
|