xref: /OK3568_Linux_fs/buildroot/package/android-tools/0005-Use-pkgconf-to-get-libs-deps.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunmakefiles: use pkgconf to get libs deps
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunLIBS lists library dependencies without taking into account static linking
4*4882a593Smuzhiyunthat need ordered listing and more libraries listed since differently from
5*4882a593Smuzhiyunshared linking dependency is not transparent(i.e. -lcrypto could need
6*4882a593Smuzhiyun-latomic etc.).
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunReplace -lcrypto with `pkg-config --libs libcrypto` command to be sure all
9*4882a593Smuzhiyunneeded libraries are listed during linking.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunSigned-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
12*4882a593Smuzhiyun---
13*4882a593Smuzhiyundiff -urpN android-tools-4.2.2+git20130218.orig/debian/makefiles/adbd.mk android-tools-4.2.2+git20130218/debian/makefiles/adbd.mk
14*4882a593Smuzhiyun--- android-tools-4.2.2+git20130218.orig/debian/makefiles/adbd.mk	2019-04-08 16:05:02.967710428 +0200
15*4882a593Smuzhiyun+++ android-tools-4.2.2+git20130218/debian/makefiles/adbd.mk	2019-04-08 16:30:42.463084426 +0200
16*4882a593Smuzhiyun@@ -44,7 +44,7 @@ CPPFLAGS+= -DADBD_NON_ANDROID
17*4882a593Smuzhiyun CPPFLAGS+= -I$(SRCDIR)/core/adbd
18*4882a593Smuzhiyun CPPFLAGS+= -I$(SRCDIR)/core/include
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun-LIBS+= -lc -lpthread -lz -lcrypto -lcrypt
21*4882a593Smuzhiyun+LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto` -lcrypt
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun OBJS= $(patsubst %, %.o, $(basename $(SRCS)))
24*4882a593Smuzhiyun
25*4882a593Smuzhiyundiff -urpN android-tools-4.2.2+git20130218.orig/debian/makefiles/adb.mk android-tools-4.2.2+git20130218/debian/makefiles/adb.mk
26*4882a593Smuzhiyun--- android-tools-4.2.2+git20130218.orig/debian/makefiles/adb.mk	2019-04-08 16:05:02.959701400 +0200
27*4882a593Smuzhiyun+++ android-tools-4.2.2+git20130218/debian/makefiles/adb.mk	2019-04-08 16:31:06.529426250 +0200
28*4882a593Smuzhiyun@@ -41,7 +41,7 @@ CPPFLAGS+= -DHAVE_TERMIO_H
29*4882a593Smuzhiyun CPPFLAGS+= -I$(SRCDIR)/core/adb
30*4882a593Smuzhiyun CPPFLAGS+= -I$(SRCDIR)/core/include
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun-LIBS+= -lc -lpthread -lz -lcrypto
33*4882a593Smuzhiyun+LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto`
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun OBJS= $(SRCS:.c=.o)
36