Skip to content

Commit

Permalink
fix linking to mbedtls for curl
Browse files Browse the repository at this point in the history
  • Loading branch information
prostoiChelovek committed Apr 15, 2024
1 parent e45057d commit 21f2d99
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 33 deletions.
19 changes: 10 additions & 9 deletions lib/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
.NOPARALLEL: curl/lib/.libs/libcurl.a

c-ares/src/lib/.libs/libcares.a:
cd c-ares && ./configure -C \
cd c-ares && ./configure \
--disable-cares-threads \
--disable-tests \
--enable-static \
--disable-shared && \
$(MAKE) -C src/lib

nghttp2/lib/.libs/libnghttp2.a:
cd nghttp2 && ./configure -C \
cd nghttp2 && ./configure \
--disable-shared \
--enable-static \
--disable-threads \
Expand All @@ -30,20 +32,19 @@ nghttp2/lib/.libs/libnghttp2.a:
--with-libbrotlidec=no && \
$(MAKE) -C lib

mbedtls/library/libmbedtls.a:
cd mbedtls && $(MAKE) library/libmbedtls.a
mbedtls/dist/lib/libmbedtls.a:
cd mbedtls && $(MAKE) -C library static && $(MAKE) DESTDIR=./dist install

curl/lib/.libs/libcurl.a: mbedtls/library/libmbedtls.a \
curl/lib/.libs/libcurl.a: mbedtls/dist/lib/libmbedtls.a \
nghttp2/lib/.libs/libnghttp2.a \
c-ares/src/lib/.libs/libcares.a
cd curl && ./configure -C \
cd curl && ./configure \
--disable-docs \
--disable-shared \
--disable-pthreads \
--disable-threaded-resolver \
--enable-ares \
--without-ssl \
--with-mbedtls=$(CURDIR)/mbedtls/ \
--with-mbedtls=$(CURDIR)/mbedtls/dist/ \
--disable-dict \
--disable-ftp \
--disable-imap \
Expand All @@ -70,7 +71,7 @@ curl/lib/.libs/libcurl.a: mbedtls/library/libmbedtls.a \
$(MAKE) -C lib

clean:
$(MAKE) -C mbedtls/library clean
rm -R mbedtls/dist/ && $(MAKE) -C mbedtls/library clean
$(MAKE) -C nghttp2 maintainer-clean
$(MAKE) -C curl maintainer-clean || :

1 change: 1 addition & 0 deletions lib/curl/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ lib/curl/docs/libcurl/opts/Makefile
lib/curl/include/Makefile
lib/curl/include/curl/Makefile
lib/curl/libcurl.pc
tests/configurehelp.pm

*.asc
*.dll
Expand Down
23 changes: 0 additions & 23 deletions lib/curl/tests/configurehelp.pm

This file was deleted.

2 changes: 2 additions & 0 deletions lib/mbedtls/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
dist/

# Random seed file created by test scripts and sample programs
seedfile
# MBEDTLS_PSA_INJECT_ENTROPY seed file created by the test framework
Expand Down
4 changes: 3 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ OBJ_MOD = $(SRC_MOD:.c=.o)
LIBS = -I../lib/curl/include \
-lcurl -L../lib/curl/lib/.libs/ \
-lnghttp2 -L../lib/nghttp2/lib/.libs/ \
-lcares -L../lib/c-ares/src/lib/.libs/
-lcares -L../lib/c-ares/src/lib/.libs/ \
-lmbedtls -lmbedcrypto -lmbedx509 -L../lib/mbedtls/dist/lib


LIBDEPS = ../lib/curl/lib/.libs/libcurl.a

Expand Down

0 comments on commit 21f2d99

Please sign in to comment.