haproxy/deps/quictls/Makefile

52 lines
1.8 KiB
Makefile
Raw Normal View History

2023-02-09 18:31:08 +05:30
OPENSSL_VERSION = 1.1.1t
BUILD_VERSION_REPOSHA = $(shell git rev-parse --short HEAD)
2023-02-09 18:31:08 +05:30
QUICTLS_TAG = OpenSSL_$(subst .,_,$(OPENSSL_VERSION))-quic1
QUICTLS_SOURCES = https://codeload.github.com/quictls/openssl/tar.gz/$(QUICTLS_TAG)
QUICTLS_TARBALL = quictls-$(OPENSSL_VERSION).tar.gz
QUICTLS_BUILDIR = src
QUICTLS_DESTDIR = dist
QUICTLS_DESTDIR_ABS = $(shell realpath $(QUICTLS_DESTDIR))
QUICTLS_ARCHIVE = quictls-dist.tar.gz
2022-06-07 08:36:13 +05:30
all: build $(QUICTLS_DESTDIR) $(QUICTLS_ARCHIVE)
2022-06-07 08:36:13 +05:30
$(QUICTLS_TARBALL):
curl -sfS -o "$(QUICTLS_TARBALL)" "$(QUICTLS_SOURCES)"
2022-06-07 08:36:13 +05:30
$(QUICTLS_BUILDIR): $(QUICTLS_TARBALL)
@if ! [ -d "$(QUICTLS_BUILDIR)" ]; then mkdir -v "$(QUICTLS_BUILDIR)"; fi
tar -C $(QUICTLS_BUILDIR) --strip-components=1 -xf "$(QUICTLS_TARBALL)"
2022-06-07 08:36:13 +05:30
build: $(QUICTLS_BUILDIR)
cd "$(QUICTLS_BUILDIR)" && CC=cc ./config --prefix="/opt/quictls" --openssldir="/opt/quictls" --libdir="lib" no-shared
2023-04-12 19:27:33 +05:30
$(MAKE) -C "$(QUICTLS_BUILDIR)" -j "$(shell nproc)"
"$(QUICTLS_BUILDIR)/apps/openssl" version
$(MAKE) buildinfo_$(shell uname -s)
.PHONY: buildinfo_Linux
buildinfo_Linux:
@echo "Checking shared libraries openssl is linked against (Linux):"
@ldd "$(QUICTLS_BUILDIR)/apps/openssl" || true
.PHONY: buildinfo_Darwin
buildinfo_Darwin:
@echo "Checking shared libraries openssl is linked against (Darwin):"
@otool -L "$(QUICTLS_BUILDIR)/apps/openssl" || true
$(QUICTLS_DESTDIR): build
@if ! [ -d "$(QUICTLS_DESTDIR)" ]; then mkdir -v "$(QUICTLS_DESTDIR)"; fi
$(MAKE) -C "$(QUICTLS_BUILDIR)" -j "$(shell nproc)" DESTDIR="$(QUICTLS_DESTDIR_ABS)" install_sw
$(QUICTLS_DESTDIR_ABS)/opt/quictls/bin/openssl version
$(QUICTLS_ARCHIVE): $(QUICTLS_DESTDIR)
2023-04-12 19:27:33 +05:30
tar -C "$(QUICTLS_DESTDIR)" --owner=root:0 --group=root:0 -czf "$(QUICTLS_ARCHIVE)" "opt"
clean:
2022-06-07 08:36:13 +05:30
rm -fv "$(QUICTLS_TARBALL)"
rm -rf "$(QUICTLS_BUILDIR)"
rm -rf "$(QUICTLS_DESTDIR)"
rm -fv "$(QUICTLS_ARCHIVE)"
.PHONY: clean build