diff --git a/libs/recipes/curl/rules.mk b/libs/recipes/curl/rules.mk new file mode 100644 index 00000000..46f9e3ea --- /dev/null +++ b/libs/recipes/curl/rules.mk @@ -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 + + diff --git a/libs/recipes/curl/targets.mk b/libs/recipes/curl/targets.mk new file mode 100644 index 00000000..a68071db --- /dev/null +++ b/libs/recipes/curl/targets.mk @@ -0,0 +1,2 @@ +CURL_WASM_LIB = $(WASM)/lib/libcurl.a +OPTIONAL_WASM_LIBS += $(CURL_WASM_LIB) diff --git a/libs/recipes/nghttp2/rules.mk b/libs/recipes/nghttp2/rules.mk new file mode 100644 index 00000000..c2086a75 --- /dev/null +++ b/libs/recipes/nghttp2/rules.mk @@ -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 + diff --git a/libs/recipes/nghttp2/targets.mk b/libs/recipes/nghttp2/targets.mk new file mode 100644 index 00000000..859f145f --- /dev/null +++ b/libs/recipes/nghttp2/targets.mk @@ -0,0 +1,2 @@ +NGHTTP2_WASM_LIB = $(WASM)/lib/libnghttp2.a +OPTIONAL_WASM_LIBS += $(NGHTTP2_WASM_LIB)