From ec164ffe8100057b2793c2ad91b82998d79c8524 Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Mon, 30 Mar 2026 11:31:30 +0300 Subject: [PATCH] Use conditional build in Makefile.win --- Makefile.win | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile.win b/Makefile.win index d033157..f1b111e 100644 --- a/Makefile.win +++ b/Makefile.win @@ -28,13 +28,28 @@ REMOVECOMMAND = rm -f TYPECOMMAND = cat COMPATLIBS = MAKEFILE = Makefile.win -PLUGINS = utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin SSLPLugin PCREPlugin +PLUGINS := utf8tocp1251 WindowsAuthentication TrafficPlugin StringsPlugin VERFILE := 3proxyres.o $(VERFILE) VERSION := $(VERSION) VERSIONDEP := 3proxyres.o $(VERSIONDEP) BUILDDATE := $(BUILDDATE) AFTERCLEAN = (find . -type f -name "*.o" -delete && find . -type f -name "*.res" -delete && find src/ -type f -name "Makefile.var" -delete && find bin/ -type f -executable -delete) || true +OPENSSL_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l crypto -l ssl -o testssl - 2>/dev/null && rm testssl && echo true||echo false) +ifeq ($(OPENSSL_CHECK), true) + LIBS += -l crypto -l ssl + PLUGINS += SSLPlugin +endif +PCRE_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pcre -o testpcre - 2>/dev/null && rm testpcre && echo true||echo false) +ifeq ($(PCRE_CHECK), true) + PLUGINS += PCREPlugin +endif +PAM_CHECK = $(shell echo "#include \\n int main(){return 0;}" | cc -x c $(CFLAGS) $(LDFLAGS) -l pam -o testpam - 2>/dev/null && rm testpam && echo true||echo false) +ifeq ($(PAM_CHECK), true) + PLUGINS += PamAuth +endif + + include Makefile.inc 3proxyres.o: