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
|
From cae154ec12a864ada8372b393fceb1d682c78c60 Mon Sep 17 00:00:00 2001
From: Etienne Cordonnier <ecordonnier@snap.com>
Date: Fri, 3 Mar 2023 14:38:05 +0100
Subject: [PATCH 07/15] libcrypto_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/libcrypto_utils.mk | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/debian/libcrypto_utils.mk b/debian/libcrypto_utils.mk
index 3afd4124..80c52f30 100644
--- a/debian/libcrypto_utils.mk
+++ b/debian/libcrypto_utils.mk
@@ -1,15 +1,17 @@
+include ../../rules_yocto.mk
NAME:= libcrypto_utils
SOURCES := android_pubkey.c
SOURCES := $(foreach source, $(SOURCES), libcrypto_utils/$(source))
-CPPFLAGS += -Ilibcrypto_utils/include -Iinclude
+CPPFLAGS += -Ilibcrypto_utils/include -Iinclude -I$(OUT_DIR)/usr/include
LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \
-Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
- -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \
- -lcrypto -Wl,-z,defs
+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android \
+ -l:libcrypto.so.0 -Wl,-z,defs
build: $(SOURCES)
- $(CC) $^ -o $(NAME).so.0 $(CPPFLAGS) $(LDFLAGS)
- ln -s $(NAME).so.0 $(NAME).so
+ $(CC) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CPPFLAGS) $(LDFLAGS)
+ ln -sf $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so
+ cp -r libcrypto_utils/include/* $(OUT_DIR)/usr/include/
clean:
- $(RM) $(NAME).so*
+ $(RM) $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so*
--
2.36.1.vfs.0.0
|