Overhaul build-everything with goal of supporting Windows

This commit is contained in:
2024-11-07 19:33:22 -05:00
parent 7239d3d7f9
commit 3561b9c4c7
2 changed files with 90 additions and 75 deletions

View File

@@ -5,11 +5,9 @@
#######################################################################
ifneq "" "$(findstring -linux-,$(MAKE_HOST))"
OS=linux
OS=Linux
else ifneq "" "$(VSINSTALLDIR)"
OS=visual
else ifneq "" "$(findstring cmd.exe,$(COMSPEC))"
OS=mingw
OS=Windows
else
OS=""
endif
@@ -110,7 +108,7 @@ OBJ_DRV=\
##
#######################################################################
ifeq "$(OS)" "linux"
ifeq "$(OS)" "Linux"
OPT=-g -O0
LUPREX_EXE=luprex
LUPREXLIB_DLL=luprexlib.so
@@ -124,35 +122,13 @@ ifeq "$(OS)" "linux"
LIBS=-L./ext/openssl-3.0.1/lib/linux -lssl -lcrypto -ldl
endif
#######################################################################
##
## Make rules for mingw
##
#######################################################################
ifeq "$(OS)" "mingw"
OPT=-g -O0
LUPREX_EXE=luprex.exe
LUPREXLIB_DLL=luprexlib.dll
LUPREXSTATIC_EXE=luprexstatic.exe
COMPILE=g++ -Wall $(OPT) -std=c++17 -fvisibility=hidden -c -MMD -fPIC -o
LINKDLL=g++ -Wall $(OPT) -std=c++17 -Wl,--no-allow-shlib-undefined -shared -o
LINKEXE=g++ -Wall $(OPT) -std=c++17 -o
MAKEDEPS=true
OPENSSL_INCLUDE=-I./ext/openssl-3.0.1/inc
LUA_FLAGS=-DLUA_USE_APICHECK -DLUA_COMPAT_ALL
LIBS=-L./ext/openssl-3.0.1/lib/mingw -lssl -lcrypto -lws2_32 -lcrypt32 -lcryptui
endif
#######################################################################
##
## Make rules for visual
##
#######################################################################
ifeq "$(OS)" "visual"
ifeq "$(OS)" "Windows"
ifeq "" "$(VSINSTALLDIR)"
$(error You must use vcvars64.bat to set up the visual studio environment variables)
endif