Use cv2pdb to generate PDB files for visual studio

This commit is contained in:
2023-05-08 21:58:26 -04:00
parent d70b9f0d13
commit 66f3cd8464
4 changed files with 62 additions and 36 deletions

View File

@@ -7,7 +7,7 @@
*.a binary
*.lib binary
*.o binary
*.obj binary
*.exe binary
*.bat text eol=crlf
*.a filter=lfs diff=lfs merge=lfs -text
*.lib filter=lfs diff=lfs merge=lfs -text

1
luprex/.gitignore vendored
View File

@@ -10,6 +10,7 @@ luprex
*.o
*.dll
*.exe
*.pdb
*.so
*.a

View File

@@ -5,34 +5,17 @@
#######################################################################
ifneq "" "$(findstring -linux-,$(MAKE_HOST))"
OS=linux
EXE=luprex
DLL=luprex.so
LIBS=-L./ext/openssl-linux -lssl -lcrypto -ldl
LUAFLAGS=-DLUA_USE_APICHECK -DLUA_USE_POSIX
LINKDLL=-export-dynamic -Wl,--no-allow-shlib-undefined -Wl,-z,defs -shared
OPT=-g -O0
OS=linux
else ifneq "" "$(findstring cmd.exe,$(COMSPEC))"
OS=mingw
endif
OS=mingw
EXE=luprex.exe
DLL=luprex.dll
LIBS=-L./ext/openssl-mingw -lssl -lcrypto -lws2_32 -lcrypt32 -lcryptui
LUAFLAGS=-DLUA_USE_APICHECK -DLUA_COMPAT_ALL
LINKDLL=-Wl,--no-allow-shlib-undefined -shared
OPT=-g -O0
else
$(error Cannot figure out whether to build the linux or mingw version)
ifeq "$(OS)" ""
$(error Cannot figure out which OS to build for."
endif
$(info Building for $(OS)...)
#######################################################################
##
## List of all OBJ files
@@ -110,46 +93,85 @@ OBJ_CORE=\
obj/core/printbuffer.o\
obj/core/serializelua.o\
OBJ_DRV=\
obj/drv/drvutil.o\
obj/drv/sslutil.o\
obj/drv/driver-$(OS).o\
#######################################################################
##
## Make rules
## Make rules for linux
##
#######################################################################
ifeq "$(OS)" "linux"
OPT=-g -O0
GPP=g++ -Wall -fvisibility=hidden $(OPT) -std=c++17 -MMD
all: $(EXE) $(DLL)
luprex: $(OBJ_DRV) luprexlib.so
$(GPP) -o $@ $(OBJ_DRV) -L./ext/openssl-linux -lssl -lcrypto -ldl
$(EXE): $(OBJ_DRV)
$(GPP) -o $@ $(OBJ_DRV) $(LIBS)
$(DLL): $(OBJ_ERIS) $(OBJ_CORE)
$(GPP) $(LINKDLL) -o $@ $^
luprexlib.so: $(OBJ_ERIS) $(OBJ_CORE)
$(GPP) -export-dynamic -Wl,--no-allow-shlib-undefined -Wl,-z,defs -shared-o $@ $^
obj/eris/%.o: ext/eris-master/src/%.c
$(GPP) -fPIC $(LUAFLAGS) -o $@ -c $<
$(GPP) -fPIC -DLUA_USE_APICHECK -DLUA_USE_POSIX -o $@ -c $<
obj/core/%.o: cpp/core/%.cpp
$(GPP) -fPIC -I./ext/eris-master/src -I./cpp/wrap -I./cpp/core -o $@ -c $<
obj/core/%.s: cpp/core/%.cpp
$(GPP) -S -fPIC -I./ext/eris-master/src -I./cpp/wrap -I./cpp/core -o $@ -c $<
obj/drv/%.o: cpp/drv/%.cpp
$(GPP) -I./ext -I./src/drv -o $@ -c $<
endif
#######################################################################
##
## Make rules for mingw
##
#######################################################################
ifeq "$(OS)" "mingw"
OPT=-g -O0
GPP=g++ -Wall -fvisibility=hidden $(OPT) -std=c++17 -MMD
luprex.exe: $(OBJ_DRV) luprexlib.dll
$(GPP) -o $@ $(OBJ_DRV) -L./ext/openssl-mingw -lssl -lcrypto -lws2_32 -lcrypt32 -lcryptui
ext/cv2pdb.exe luprex.exe
luprexlib.dll: $(OBJ_ERIS) $(OBJ_CORE)
$(GPP) -Wl,--no-allow-shlib-undefined -shared -o $@ $^
ext/cv2pdb.exe luprexlib.dll
obj/eris/%.o: ext/eris-master/src/%.c
$(GPP) -fPIC -DLUA_USE_APICHECK -DLUA_COMPAT_ALL -o $@ -c $<
obj/core/%.o: cpp/core/%.cpp
$(GPP) -fPIC -I./ext/eris-master/src -I./cpp/wrap -I./cpp/core -o $@ -c $<
obj/drv/%.o: cpp/drv/%.cpp
$(GPP) -I./ext -I./src/drv -o $@ -c $<
clean:
rm -f luprex luprex.exe luprex.so luprex.dll obj/core/*.* obj/drv/*.* obj/eris/*.*
endif
#######################################################################
##
## Make Clean, deliberately OS independent
##
#######################################################################
clean:
rm -f luprex luprex.exe luprex.so luprexlib.dll *.pdb obj/core/*.* obj/drv/*.* obj/eris/*.*
#######################################################################
##
## Automatically generated Make Dependencies

BIN
luprex/ext/cv2pdb.exe LFS Normal file

Binary file not shown.