summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/selinux/android-tools/android-tools/0001-libcrypto.mk-modifications-to-make-it-build-in-yocto.patch
blob: 7d6d588dd51a050c0c9281b095a16cb1d132c670 (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
From 30193c177138551a9aa269ae249ed2800811b223 Mon Sep 17 00:00:00 2001
From: Etienne Cordonnier <ecordonnier@snap.com>
Date: Fri, 3 Mar 2023 13:24:11 +0100
Subject: [PATCH] libcrypto.mk: modifications to make it build in yocto
 environment

Adding an include file that is setting the common flags.

Modified the build rule so that it outputs the binary and include
to the OUT_DIR

Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
---
 debian/libcrypto.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/debian/libcrypto.mk b/debian/libcrypto.mk
index 4c0268e..8b41056 100644
--- a/debian/libcrypto.mk
+++ b/debian/libcrypto.mk
@@ -1,3 +1,4 @@
+include ../../rules_yocto.mk
 include sources.mk
 
 NAME = libcrypto
@@ -26,6 +27,8 @@ CPPFLAGS += -Isrc/include -Isrc/crypto
 LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 -lpthread
 
 build: $(SOURCES)
-	mkdir --parents debian/out
-	$(CC) $^ -o debian/out/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
-	ln -s $(NAME).so.0 debian/out/$(NAME).so
\ No newline at end of file
+	mkdir --parents $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/ 
+	mkdir --parents $(OUT_DIR)/usr/include
+	$(CC) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DOPENSSL_NO_ASM
+	ln -sf $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so
+	cp -r include/openssl $(OUT_DIR)/usr/include
-- 
2.36.1.vfs.0.0