blob: 04592da81f6ee33dea894cc4271d9078ed8e9248 (
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
43
44
45
46
47
48
49
50
51
52
53
54
|
From e284ceac2b10133ca916bbae8055f040607b506c Mon Sep 17 00:00:00 2001
From: Etienne Cordonnier <ecordonnier@snap.com>
Date: Fri, 3 Mar 2023 13:21:49 +0100
Subject: [PATCH 1/2] 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>
---
debian/libext4_utils.mk | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/debian/libext4_utils.mk b/debian/libext4_utils.mk
index 868e790..2e93158 100644
--- a/debian/libext4_utils.mk
+++ b/debian/libext4_utils.mk
@@ -1,3 +1,4 @@
+include ../../rules_yocto.mk
NAME = libext4_utils
ext4_utils_SOURCES := \
@@ -17,14 +18,16 @@ CPPFLAGS += \
-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 -sf $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so
+ cp -r ext4_utils/include/* $(OUT_DIR)/usr/include/
+
--
2.36.1.vfs.0.0
|