mirror of
https://github.com/webui-dev/webui
synced 2025-03-28 21:13:17 +00:00
Simplify TLS handling
This commit is contained in:
parent
da61335597
commit
a86217ebf5
@ -6,8 +6,8 @@ WEBUI_OUT_LIB_NAME = webui-2
|
||||
|
||||
# TLS
|
||||
WEBUI_USE_TLS =
|
||||
WEBUI_TLS_INCLUDE = .
|
||||
WEBUI_TLS_LIB = .
|
||||
WEBUI_TLS_INCLUDE ?= .
|
||||
WEBUI_TLS_LIB ?= .
|
||||
TLS_CFLAG = -DNO_SSL
|
||||
TLS_LDFLAG_DYNAMIC =
|
||||
ifeq ($(WEBUI_USE_TLS), 1)
|
||||
|
28
Makefile
28
Makefile
@ -4,27 +4,37 @@
|
||||
# == 1. VARIABLES =============================================================
|
||||
|
||||
WEBUI_OUT_LIB_NAME = webui-2
|
||||
|
||||
# TLS
|
||||
WEBUI_USE_TLS =
|
||||
WEBUI_TLS_INCLUDE = .
|
||||
WEBUI_TLS_LIB = .
|
||||
TLS_CFLAG = /D NO_SSL
|
||||
TLS_LDFLAG_DYNAMIC =
|
||||
|
||||
# TLS Enabled
|
||||
!IF "$(WEBUI_USE_TLS)" == "1"
|
||||
|
||||
WEBUI_OUT_LIB_NAME = webui-2-secure
|
||||
TLS_CFLAG = /D WEBUI_TLS /D NO_SSL_DL /D OPENSSL_API_1_1
|
||||
TLS_LDFLAG_DYNAMIC = libssl.lib libcrypto.lib
|
||||
|
||||
!IF "$(WEBUI_TLS_INCLUDE)" != ""
|
||||
TLS_CFLAG = $(TLS_CFLAG) /I"$(WEBUI_TLS_INCLUDE)"
|
||||
!ELSE
|
||||
TLS_CFLAG = $(TLS_CFLAG) /I"."
|
||||
!ENDIF
|
||||
|
||||
!IF "$(WEBUI_TLS_LIB)" != ""
|
||||
TLS_LDFLAG_DYNAMIC = $(TLS_LDFLAG_DYNAMIC) /LIBPATH:"$(WEBUI_TLS_LIB)"
|
||||
!ELSE
|
||||
TLS_LDFLAG_DYNAMIC += $(TLS_LDFLAG_DYNAMIC) /LIBPATH:"."
|
||||
!ENDIF
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Build Flags
|
||||
CIVETWEB_BUILD_FLAGS = /Fo"civetweb.obj" /c /EHsc "$(MAKEDIR)/src/civetweb/civetweb.c" /I"$(MAKEDIR)/src/civetweb/" /I"$(WEBUI_TLS_INCLUDE)"
|
||||
CIVETWEB_DEFINE_FLAGS = /D NDEBUG /D NO_CACHING /D NO_CGI /D USE_WEBSOCKET $(TLS_CFLAG)
|
||||
CIVETWEB_BUILD_FLAGS = /Fo"civetweb.obj" /c /EHsc "$(MAKEDIR)/src/civetweb/civetweb.c" /I"$(MAKEDIR)/src/civetweb/" $(TLS_CFLAG)
|
||||
CIVETWEB_DEFINE_FLAGS = /D NDEBUG /D NO_CACHING /D NO_CGI /D USE_WEBSOCKET
|
||||
WEBUI_BUILD_FLAGS = /Fo"webui.obj" /c /EHsc "$(MAKEDIR)/src/webui.c" /I"$(MAKEDIR)/include" /I"$(WEBUI_TLS_INCLUDE)" $(TLS_CFLAG)
|
||||
|
||||
# Output Commands
|
||||
LIB_STATIC_OUT = /OUT:"$(WEBUI_OUT_LIB_NAME)-static.lib" "webui.obj" "civetweb.obj"
|
||||
LIB_DYN_OUT = /DLL /OUT:"$(WEBUI_OUT_LIB_NAME).dll" "webui.obj" "civetweb.obj" user32.lib Advapi32.lib Shell32.lib Ole32.lib /LIBPATH:"$(WEBUI_TLS_LIB)" $(TLS_LDFLAG_DYNAMIC)
|
||||
LIB_DYN_OUT = /DLL /OUT:"$(WEBUI_OUT_LIB_NAME).dll" "webui.obj" "civetweb.obj" user32.lib Advapi32.lib Shell32.lib Ole32.lib $(TLS_LDFLAG_DYNAMIC)
|
||||
|
||||
# == 2.TARGETS ================================================================
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user