Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions libs/recipes/curl/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
CURL_VERSION = 8.14.1
CURL_TARBALL = $(DOWNLOAD)/curl-$(CURL_VERSION).tar.gz
CURL_URL = https://curl.se/download/curl-$(CURL_VERSION).tar.gz

.PHONY: curl
curl: $(CURL_WASM_LIB)

$(CURL_TARBALL):
mkdir -p $(DOWNLOAD)
wget $(CURL_URL) -O $@

$(CURL_WASM_LIB): $(CURL_TARBALL) $(NGHTTP2_WASM_LIB) $(OPENSSL_WASM_LIB)
mkdir -p $(BUILD)/curl-$(CURL_VERSION)/build
tar -C $(BUILD) -xf $(CURL_TARBALL)
cd $(BUILD)/curl-$(CURL_VERSION)/build && \
PKG_CONFIG="pkg-config --static" emconfigure ../configure \
--enable-shared=no \
--enable-static=yes \
--prefix=$(WASM) \
--with-openssl \
--with-zlib \
--with-nghttp2 \
--disable-threaded-resolver \
--without-libpsl \
--disable-netrc \
--disable-ipv6 \
--disable-tftp \
--disable-ntlm-wb \
--enable-websockets \
--disable-ftp \
--disable-file \
--disable-gopher \
--disable-imap \
--disable-mqtt \
--disable-pop3 \
--disable-rtsp \
--disable-smb \
--disable-smtp \
--disable-telnet \
--disable-dict && \
emmake make install


2 changes: 2 additions & 0 deletions libs/recipes/curl/targets.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CURL_WASM_LIB = $(WASM)/lib/libcurl.a
OPTIONAL_WASM_LIBS += $(CURL_WASM_LIB)
22 changes: 22 additions & 0 deletions libs/recipes/nghttp2/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
NGHTTP2_VERSION = 1.65.0
NGHTTP2_TARBALL = $(DOWNLOAD)/nghttp2-$(NGHTTP2_VERSION).tar.gz
NGHTTP2_URL = https://github.com/nghttp2/nghttp2/releases/download/v$(NGHTTP2_VERSION)/nghttp2-$(NGHTTP2_VERSION).tar.gz

.PHONY: nghttp2
nghttp2: $(NGHTTP2_WASM_LIB)

$(NGHTTP2_TARBALL):
mkdir -p $(DOWNLOAD)
wget $(NGHTTP2_URL) -O $@

$(NGHTTP2_WASM_LIB): $(NGHTTP2_TARBALL)
mkdir -p $(BUILD)/nghttp2-$(NGHTTP2_VERSION)/build
tar -C $(BUILD) -xf $(NGHTTP2_TARBALL)
cd $(BUILD)/nghttp2-$(NGHTTP2_VERSION)/build && \
emconfigure ../configure \
--enable-shared=no \
--enable-static=yes \
--enable-lib-only \
--prefix=$(WASM) && \
emmake make install

2 changes: 2 additions & 0 deletions libs/recipes/nghttp2/targets.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NGHTTP2_WASM_LIB = $(WASM)/lib/libnghttp2.a
OPTIONAL_WASM_LIBS += $(NGHTTP2_WASM_LIB)