Parameterize src dirs everywhere and fix PCRE incs for HAProxy
This commit is contained in:
20
deps/lua/Makefile
vendored
20
deps/lua/Makefile
vendored
@@ -1,27 +1,29 @@
|
||||
LUA_VERSION = 5.3.6
|
||||
LUA_SOURCES = https://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz
|
||||
LUA_TARBALL = lua-$(LUA_VERSION).tar.gz
|
||||
LUA_BUILDIR = src
|
||||
LUA_DESTDIR = dist
|
||||
LUA_DESTDIR_ABS = $(shell realpath $(LUA_DESTDIR))
|
||||
|
||||
all: build $(LUA_DESTDIR)
|
||||
all: $(LUA_BUILDIR) $(LUA_DESTDIR)
|
||||
|
||||
src:
|
||||
if ! [ -d "src" ]; then mkdir -v "src"; fi
|
||||
$(LUA_BUILDIR):
|
||||
@if ! [ -d "$(LUA_BUILDIR)" ]; then mkdir -v "$(LUA_BUILDIR)"; fi
|
||||
|
||||
src/lua-$(LUA_VERSION).tar.gz: src
|
||||
$(LUA_BUILDIR)/lua-$(LUA_VERSION).tar.gz: $(LUA_BUILDIR)
|
||||
curl -sSL -o "$(LUA_TARBALL)" "$(LUA_SOURCES)"
|
||||
|
||||
build: src/lua-$(LUA_VERSION).tar.gz
|
||||
tar -C src --strip-components=1 -xf "$(LUA_TARBALL)"
|
||||
$(MAKE) -C src -j$(shell nproc) linux
|
||||
build: $(LUA_BUILDIR)/lua-$(LUA_VERSION).tar.gz
|
||||
tar -C $(LUA_BUILDIR) --strip-components=1 -xf "$(LUA_TARBALL)"
|
||||
$(MAKE) -C $(LUA_BUILDIR) -j$(shell nproc) linux
|
||||
|
||||
$(LUA_DESTDIR): build
|
||||
if ! [ -d "$(LUA_DESTDIR)" ]; then mkdir -v "$(LUA_DESTDIR)"; fi
|
||||
$(MAKE) -C src -j$(shell nproc) install INSTALL_TOP="$(LUA_DESTDIR_ABS)"
|
||||
$(MAKE) -C $(LUA_BUILDIR) -j$(shell nproc) install INSTALL_TOP="$(LUA_DESTDIR_ABS)"
|
||||
|
||||
clean:
|
||||
rm -rf "src"
|
||||
rm -rf "$(LUA_BUILDIR)"
|
||||
rm -rf "$(LUA_DESTDIR)"
|
||||
rm -fv "$(LUA_TARBALL)"
|
||||
|
||||
.PHONY: clean build
|
||||
|
||||
22
deps/pcre2/Makefile
vendored
22
deps/pcre2/Makefile
vendored
@@ -1,28 +1,30 @@
|
||||
PCRE2_VERSION = 10.40
|
||||
PCRE2_SOURCES = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$(PCRE2_VERSION)/pcre2-$(PCRE2_VERSION).tar.gz
|
||||
PCRE2_TARBALL = pcre2-$(PCRE2_VERSION).tar.gz
|
||||
|
||||
PCRE2_BUILDIR = src
|
||||
PCRE2_DESTDIR = dist
|
||||
PCRE2_DESTDIR_ABS = $(shell realpath $(PCRE2_DESTDIR))
|
||||
|
||||
all: build dist
|
||||
|
||||
src:
|
||||
if ! [ -d "src" ]; then mkdir -v "src"; fi
|
||||
$(PCRE2_BUILDIR):
|
||||
@if ! [ -d "$(PCRE2_BUILDIR)" ]; then mkdir -v "$(PCRE2_BUILDIR)"; fi
|
||||
|
||||
src/pcre2-$(PCRE2_VERSION).tar.gz: src
|
||||
$(PCRE2_BUILDIR)/pcre2-$(PCRE2_VERSION).tar.gz: $(PCRE2_BUILDIR)
|
||||
curl -sSL -o "$(PCRE2_TARBALL)" "$(PCRE2_SOURCES)"
|
||||
|
||||
build: src/pcre2-$(PCRE2_VERSION).tar.gz
|
||||
tar -C src --strip-components=1 -xf "$(PCRE2_TARBALL)"
|
||||
if [ -f "src/CmakeCache.txt" ]; then rm -v "src/CmakeCache.txt"; fi
|
||||
cd "src" && cmake -DPCRE2_STATIC_PIC=ON -DPCRE2_SUPPORT_JIT=ON -DCMAKE_INSTALL_PREFIX="$(PCRE2_DESTDIR_ABS)" . && make
|
||||
build: $(PCRE2_BUILDIR)/pcre2-$(PCRE2_VERSION).tar.gz
|
||||
tar -C $(PCRE2_BUILDIR) --strip-components=1 -xf "$(PCRE2_TARBALL)"
|
||||
if [ -f "$(PCRE2_BUILDIR)/CmakeCache.txt" ]; then rm -v "$(PCRE2_BUILDIR)/CmakeCache.txt"; fi
|
||||
cd "$(PCRE2_BUILDIR)" && cmake -DPCRE2_STATIC_PIC=ON -DPCRE2_SUPPORT_JIT=ON -DCMAKE_INSTALL_PREFIX="$(PCRE2_DESTDIR_ABS)" . && make
|
||||
|
||||
dist: build
|
||||
if ! [ -d "$(PCRE2_DESTDIR)" ]; then mkdir -v "$(PCRE2_DESTDIR)"; fi
|
||||
cd "src" && make install
|
||||
cd "$(PCRE2_BUILDIR)" && make install
|
||||
|
||||
clean:
|
||||
rm -rf "src"
|
||||
rm -rf "$(PCRE2_BUILDIR)"
|
||||
rm -rf "$(PCRE2_DESTDIR)"
|
||||
rm -fv "$(PCRE2_TARBALL)"
|
||||
|
||||
.PHONY: clean build dist
|
||||
|
||||
37
deps/quictls/Makefile
vendored
37
deps/quictls/Makefile
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user