summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/selinux/android-tools/android-tools/libcrypto_utils_mk_change_out_dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/selinux/android-tools/android-tools/libcrypto_utils_mk_change_out_dir.patch')
-rw-r--r--dynamic-layers/selinux/android-tools/android-tools/libcrypto_utils_mk_change_out_dir.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/dynamic-layers/selinux/android-tools/android-tools/libcrypto_utils_mk_change_out_dir.patch b/dynamic-layers/selinux/android-tools/android-tools/libcrypto_utils_mk_change_out_dir.patch
new file mode 100644
index 0000000..a0dd348
--- /dev/null
+++ b/dynamic-layers/selinux/android-tools/android-tools/libcrypto_utils_mk_change_out_dir.patch
@@ -0,0 +1,38 @@
1libcrypto_utils.mk: modifications to make it build in yocto environment
2
3Adding an include file that is setting the common flags.
4Changed the cppflag to include the headers from other components
5of android-tools
6
7Modified LDflags so that the libraries that are coming from other android-tools
8are searched in the output folder.
9
10Modified the build rule so that it outputs the binary and header to the OUT_DIR
11
12Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
13
14--- git/system/core/debian/libcrypto_utils.mk 2021-04-30 14:18:54.071379767 +0200
15+++ git/system/core/debian/libcrypto_utils.mk 2021-04-30 14:22:46.179047308 +0200
16@@ -1,15 +1,17 @@
17+include ../../rules_yocto.mk
18 NAME:= libcrypto_utils
19 SOURCES := android_pubkey.c
20 SOURCES := $(foreach source, $(SOURCES), libcrypto_utils/$(source))
21-CPPFLAGS += -Ilibcrypto_utils/include -Iinclude
22+CPPFLAGS += -Ilibcrypto_utils/include -Iinclude -I$(OUT_DIR)/usr/include
23 LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \
24 -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
25- -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \
26+ -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android \
27 -lcrypto -Wl,-z,defs
28
29 build: $(SOURCES)
30- $(CC) $^ -o $(NAME).so.0 $(CPPFLAGS) $(LDFLAGS)
31- ln -s $(NAME).so.0 $(NAME).so
32+ $(CC) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CPPFLAGS) $(LDFLAGS)
33+ ln -s $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so
34+ cp -r libcrypto_utils/include/* $(OUT_DIR)/usr/include/
35
36 clean:
37- $(RM) $(NAME).so*
38+ $(RM) $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so*