diff --git a/SRB2.cbp b/SRB2.cbp
index a6be5757..628e7da3 100644
--- a/SRB2.cbp
+++ b/SRB2.cbp
@@ -41,7 +41,6 @@ HW3SOUND for 3D hardware sound support
-
@@ -63,7 +62,6 @@ HW3SOUND for 3D hardware sound support
-
@@ -91,7 +89,6 @@ HW3SOUND for 3D hardware sound support
-
@@ -120,7 +117,6 @@ HW3SOUND for 3D hardware sound support
-
@@ -136,6 +132,7 @@ HW3SOUND for 3D hardware sound support
+
@@ -157,7 +154,6 @@ HW3SOUND for 3D hardware sound support
-
@@ -183,6 +179,7 @@ HW3SOUND for 3D hardware sound support
+
@@ -203,7 +200,6 @@ HW3SOUND for 3D hardware sound support
-
@@ -229,6 +225,7 @@ HW3SOUND for 3D hardware sound support
+
@@ -248,7 +245,6 @@ HW3SOUND for 3D hardware sound support
-
@@ -278,6 +274,7 @@ HW3SOUND for 3D hardware sound support
+
@@ -296,7 +293,6 @@ HW3SOUND for 3D hardware sound support
-
@@ -877,14 +873,15 @@ HW3SOUND for 3D hardware sound support
-
-
-
+
+
+
+
diff --git a/Srb2.dev b/Srb2.dev
index 56170386..00b7811e 100644
--- a/Srb2.dev
+++ b/Srb2.dev
@@ -1501,7 +1501,7 @@ CompileCpp=0
Link=1
Priority=1000
OverrideBuildCmd=1
-BuildCmd=$(CC) -g $(CFLAGS) -x assembler-with-cpp -c src/vid_copy.s -o $@
+BuildCmd=$(CC) $(CFLAGS) -x assembler-with-cpp -c src/vid_copy.s -o $@
[Unit152]
FileName=src\y_inter.h
@@ -2024,8 +2024,8 @@ Includes=libs/libpng-src;libs/zlib;libs/gme/include;libs/fmodex/inc;libs
Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32;libs/gme/win32;libs/gme/win32;libs/fmodex/lib
ResourceIncludes=src/win32
MakeIncludes=comptime.mk;cpdebug.mk
-Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_
-CppCompiler=-Os_@@_-g_@@_
+Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-gdwarf-2_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_
+CppCompiler=-Os_@@_-g_@@_-gdwarf-2_@@_
Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mwindows_@@_-lgme.dll_@@_-lfmodex_@@_
PreprocDefines=NORMALSRB2_@@_
CompilerSettings=00000000001000000110e1
@@ -2051,8 +2051,8 @@ Includes=libs/libpng-src;libs/zlib;libs/gme/include;libs/fmodex/inc;libs
Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32;libs/gme/win32;libs/fmodex/lib
ResourceIncludes=src/win32
MakeIncludes=comptime.mk;cpdebug.mk
-Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_
-CppCompiler=-O0_@@_-g_@@_
+Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-gdwarf-2_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_
+CppCompiler=-O0_@@_-g_@@_-gdwarf-2_@@_
Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_-lgme.dll_@@_-lfmodex_@@_
PreprocDefines=NORMALSRB2_@@_
CompilerSettings=00000000000000100110e1
@@ -2228,8 +2228,8 @@ Includes=libs/libpng-src;libs/zlib;libs
Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32
ResourceIncludes=src/win32
MakeIncludes=comptime.mk;cpdebug.mk
-Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_
-CppCompiler=-Os_@@_-g_@@_
+Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_
+CppCompiler=-Os_@@_-g_@@_-gdwarf-2_@@_
Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_
PreprocDefines=NORMALSRB2_@@_
CompilerSettings=00000000001000000110e1
@@ -2305,8 +2305,8 @@ Includes=libs/libpng-src;libs/zlib;libs
Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32
ResourceIncludes=src/win32
MakeIncludes=comptime.mk;cpdebug.mk
-Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_
-CppCompiler=-O0_@@_-g_@@_
+Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_
+CppCompiler=-O0_@@_-g_@@_-gdwarf-2_@@_
Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_
PreprocDefines=NORMALSRB2_@@_
CompilerSettings=00000000000000100110e1
diff --git a/cpdebug.mk b/cpdebug.mk
index 440ffe38..6baedf22 100644
--- a/cpdebug.mk
+++ b/cpdebug.mk
@@ -24,9 +24,9 @@ all-after:
$(OBJCOPY) $(BIN) $(DBGNAME)
$(OBJCOPY) --strip-debug $(BIN)
-$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN)
- -$(GZIP) $(GZIP_OPTS) $(DBGNAME).txt
+ -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt"
ifndef COMSPEC
- $(GZIP) $(GZIP_OPT2) $(DBGNAME).txt
+ -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt"
endif
-$(UPX) $(UPX_OPTS) $(BIN)
diff --git a/src/win32/Makefile.cfg b/src/win32/Makefile.cfg
index 8f4870c6..2ebde6b2 100644
--- a/src/win32/Makefile.cfg
+++ b/src/win32/Makefile.cfg
@@ -27,6 +27,10 @@ ifndef GCC44
#OPTS+=-mms-bitfields
endif
+ifndef MINGW64
+ OPTS+=-gdwarf-2
+endif
+
ifndef SDL
OPTS+=-D_WINDOWS
endif