Use cv2pdb to generate PDB files for visual studio
This commit is contained in:
2
luprex/.gitattributes
vendored
2
luprex/.gitattributes
vendored
@@ -7,7 +7,7 @@
|
|||||||
*.a binary
|
*.a binary
|
||||||
*.lib binary
|
*.lib binary
|
||||||
*.o binary
|
*.o binary
|
||||||
*.obj binary
|
*.exe binary
|
||||||
*.bat text eol=crlf
|
*.bat text eol=crlf
|
||||||
*.a filter=lfs diff=lfs merge=lfs -text
|
*.a filter=lfs diff=lfs merge=lfs -text
|
||||||
*.lib filter=lfs diff=lfs merge=lfs -text
|
*.lib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|||||||
1
luprex/.gitignore
vendored
1
luprex/.gitignore
vendored
@@ -10,6 +10,7 @@ luprex
|
|||||||
*.o
|
*.o
|
||||||
*.dll
|
*.dll
|
||||||
*.exe
|
*.exe
|
||||||
|
*.pdb
|
||||||
*.so
|
*.so
|
||||||
*.a
|
*.a
|
||||||
|
|
||||||
|
|||||||
@@ -5,34 +5,17 @@
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
ifneq "" "$(findstring -linux-,$(MAKE_HOST))"
|
ifneq "" "$(findstring -linux-,$(MAKE_HOST))"
|
||||||
|
|
||||||
OS=linux
|
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
|
|
||||||
|
|
||||||
else ifneq "" "$(findstring cmd.exe,$(COMSPEC))"
|
else ifneq "" "$(findstring cmd.exe,$(COMSPEC))"
|
||||||
|
|
||||||
OS=mingw
|
OS=mingw
|
||||||
EXE=luprex.exe
|
endif
|
||||||
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
|
endif
|
||||||
$(info Building for $(OS)...)
|
$(info Building for $(OS)...)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
##
|
##
|
||||||
## List of all OBJ files
|
## List of all OBJ files
|
||||||
@@ -110,46 +93,85 @@ OBJ_CORE=\
|
|||||||
obj/core/printbuffer.o\
|
obj/core/printbuffer.o\
|
||||||
obj/core/serializelua.o\
|
obj/core/serializelua.o\
|
||||||
|
|
||||||
|
|
||||||
OBJ_DRV=\
|
OBJ_DRV=\
|
||||||
obj/drv/drvutil.o\
|
obj/drv/drvutil.o\
|
||||||
obj/drv/sslutil.o\
|
obj/drv/sslutil.o\
|
||||||
obj/drv/driver-$(OS).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
|
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)
|
luprexlib.so: $(OBJ_ERIS) $(OBJ_CORE)
|
||||||
$(GPP) -o $@ $(OBJ_DRV) $(LIBS)
|
$(GPP) -export-dynamic -Wl,--no-allow-shlib-undefined -Wl,-z,defs -shared-o $@ $^
|
||||||
|
|
||||||
$(DLL): $(OBJ_ERIS) $(OBJ_CORE)
|
|
||||||
$(GPP) $(LINKDLL) -o $@ $^
|
|
||||||
|
|
||||||
obj/eris/%.o: ext/eris-master/src/%.c
|
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
|
obj/core/%.o: cpp/core/%.cpp
|
||||||
$(GPP) -fPIC -I./ext/eris-master/src -I./cpp/wrap -I./cpp/core -o $@ -c $<
|
$(GPP) -fPIC -I./ext/eris-master/src -I./cpp/wrap -I./cpp/core -o $@ -c $<
|
||||||
|
|
||||||
obj/core/%.s: cpp/core/%.cpp
|
obj/drv/%.o: cpp/drv/%.cpp
|
||||||
$(GPP) -S -fPIC -I./ext/eris-master/src -I./cpp/wrap -I./cpp/core -o $@ -c $<
|
$(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
|
obj/drv/%.o: cpp/drv/%.cpp
|
||||||
$(GPP) -I./ext -I./src/drv -o $@ -c $<
|
$(GPP) -I./ext -I./src/drv -o $@ -c $<
|
||||||
|
|
||||||
clean:
|
endif
|
||||||
rm -f luprex luprex.exe luprex.so luprex.dll obj/core/*.* obj/drv/*.* obj/eris/*.*
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
##
|
||||||
|
## 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
|
## Automatically generated Make Dependencies
|
||||||
|
|||||||
BIN
luprex/ext/cv2pdb.exe
LFS
Normal file
BIN
luprex/ext/cv2pdb.exe
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user