Parameterize src dirs everywhere and fix PCRE incs for HAProxy

This commit is contained in:
Tristan
2022-06-06 06:52:47 +01:00
parent 6376218f49
commit 069e156f0c
6 changed files with 72 additions and 49 deletions

37
deps/quictls/Makefile vendored
View File

@@ -1,37 +1,38 @@
QUICTLS_VERSION = OpenSSL_1_1_1o
QUICTLS_SOURCES = https://codeload.github.com/quictls/openssl/tar.gz/$(QUICTLS_VERSION)+quic
QUICTLS_TARBALL = quictls-$(QUICTLS_VERSION).tar.gz
QUICTLS_BUILDIR = src
QUICTLS_DESTDIR = dist
QUICTLS_DESTDIR_ABS = $(shell realpath $(QUICTLS_DESTDIR))
QUICTLS_ARCHIVE = quictls-$(QUICTLS_VERSION)-dist.tar.gz
all: build $(QUICTLS_DESTDIR) archive
all: $(QUICTLS_DESTDIR) $(QUICTLS_ARCHIVE)
src:
if ! [ -d "src" ]; then mkdir -v "src"; fi
$(QUICTLS_BUILDIR):
@if ! [ -d "$(QUICTLS_BUILDIR)" ]; then mkdir -v "$(QUICTLS_BUILDIR)"; fi
src/quictls-$(QUICTLS_VERSION).tar.gz: src
$(QUICTLS_BUILDIR)/quictls-$(QUICTLS_VERSION).tar.gz: $(QUICTLS_BUILDIR)
curl -sSL -o "$(QUICTLS_TARBALL)" "$(QUICTLS_SOURCES)"
build: src/quictls-$(QUICTLS_VERSION).tar.gz
tar -C src --strip-components=1 -xf "$(QUICTLS_TARBALL)"
cd "src" && ./config --prefix="/opt/quictls" --openssldir="/opt/quictls" no-shared
$(MAKE) -C "src" -j "$(shell nproc)"
ldd "src/apps/openssl" || true
src/apps/openssl version
build: $(QUICTLS_BUILDIR)/quictls-$(QUICTLS_VERSION).tar.gz
tar -C $(QUICTLS_BUILDIR) --strip-components=1 -xf "$(QUICTLS_TARBALL)"
cd "$(QUICTLS_BUILDIR)" && ./config --prefix="/opt/quictls" --openssldir="/opt/quictls" no-shared
$(MAKE) -C "$(QUICTLS_BUILDIR)" -j "$(shell nproc)"
ldd "$(QUICTLS_BUILDIR)/apps/openssl" || true
"$(QUICTLS_BUILDIR)/apps/openssl" version
$(QUICTLS_DESTDIR):
$(QUICTLS_DESTDIR): build
if ! [ -d "$(QUICTLS_DESTDIR)" ]; then mkdir -v "$(QUICTLS_DESTDIR)"; fi
$(MAKE) -C "src" -j "$(shell nproc)" DESTDIR="$(QUICTLS_DESTDIR_ABS)" install_sw
$(MAKE) -C "$(QUICTLS_BUILDIR)" -j "$(shell nproc)" DESTDIR="$(QUICTLS_DESTDIR_ABS)" install_sw
# Take a moment to hate on how fucking shit the `tar` CLI is with me, especially regarding the awkward dance of path prefixes. Press S.
archive: $(QUICTLS_DESTDIR)
$(QUICTLS_ARCHIVE): $(QUICTLS_DESTDIR)
tar -C "$(QUICTLS_DESTDIR)" -cjf "$(QUICTLS_ARCHIVE)" "opt"
clean:
@rm -rf "src" || true
@rm -rf "$(QUICTLS_TARBALL)" || true
@rm -rf "$(QUICTLS_DESTDIR)" || true
@rm -v "$(QUICTLS_ARCHIVE)" || true
rm -rf "$(QUICTLS_BUILDIR)"
rm -rf "$(QUICTLS_DESTDIR)"
rm -rf "$(QUICTLS_TARBALL)"
rm -fv "$(QUICTLS_ARCHIVE)"
.PHONY: clean build $(QUICTLS_DESTDIR) dist archive
.PHONY: clean build