diff --git a/polymer/eduke32/Makefile.msvc b/polymer/eduke32/Makefile.msvc
index e46c94b50..89384a6c8 100644
--- a/polymer/eduke32/Makefile.msvc
+++ b/polymer/eduke32/Makefile.msvc
@@ -9,6 +9,10 @@ INC=$(SRC)
RSRC=rsrc
o=obj
+!ifndef WINBITS
+WINBITS=32
+!endif
+
WINLIB=\$(WINBITS)
!if ($(WINBITS)==32)
@@ -33,13 +37,23 @@ PLATFORM=platform\Windows
AUDIOINC=source\jaudiolib\third-party\common
AUDIOPLATFORM=source\jaudiolib\third-party\Windows
+!ifndef RENDERTYPE
+RENDERTYPE=WIN
+!endif
+!ifndef MIXERTYPE
+MIXERTYPE=WIN
+!endif
+
!ifdef DEBUG
# debugging options
flags_cl=/Od /Zi
flags_link=/DEBUG
!else
# release options
-flags_cl=/O2 /GL /arch:SSE /MP # /I$(WDKROOT)\inc\crt /I$(WDKROOT)\inc\api
+flags_cl=/O2 /GL /MP # /I$(WDKROOT)\inc\crt /I$(WDKROOT)\inc\api
+!if ($(WINBITS)!=64)
+flags_cl=$(flags_cl) /arch:SSE
+!endif
flags_link=/RELEASE /LTCG # /LIBPATH:$(WDKROOT)\lib\wxp\i386 /LIBPATH:$(WDKROOT)\lib\Crt\i386
!endif
@@ -60,12 +74,16 @@ MT=mt
CFLAGS= /MT /J /nologo $(flags_cl) \
/I$(INC) /I$(EINC)\msvc /I$(EINC)\ /I$(SRC)\jmact /I$(JAUDIOLIBDIR)\include /I$(ENETDIR)\include \
/W2 $(ENGINEOPTS) \
- /I$(PLATFORM)\include /I$(AUDIOINC)\include /DRENDERTYPEWIN=1 /DMIXERTYPEWIN=1 /DUSE_LIBVPX
+ /I$(PLATFORM)\include /I$(AUDIOINC)\include /DRENDERTYPE$(RENDERTYPE)=1 /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2 /DUSE_LIBVPX
-LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib comctl32.lib shlwapi.lib \
+LIBS=user32.lib gdi32.lib shell32.lib winmm.lib ws2_32.lib comctl32.lib shlwapi.lib oleaut32.lib ole32.lib imm32.lib version.lib \
libFLAC.a libogg.a libvorbis.a libvorbisfile.a libvpx.a libpng_mini.a libz_mini.a libcompat-from-mingw-w64.a \
dsound.lib advapi32.lib libcompat-to-msvc.a
+!if ("$(RENDERTYPE)"=="SDL")
+LIBS=libSDL2main.a libSDL2.a libSDL2_mixer.a $(LIBS)
+!endif
+
LIBS=/NODEFAULTLIB:glu32.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib /NODEFAULTLIB:libcmt.lib \
/NODEFAULTLIB:libcmtd.lib $(LIBS)
@@ -91,8 +109,6 @@ JMACTOBJ=$(OBJ)\file_lib.$o \
$(OBJ)\joystick.$o \
$(OBJ)\mathutil.$o \
$(OBJ)\scriplib.$o
-
-AUDIOLIBOBJ=$(OBJ)\midi.$o $(OBJ)\music.$o $(OBJ)\mpu401.$o
GAMEOBJS=$(OBJ)\game.$o \
$(OBJ)\game_inline.$o \
@@ -125,7 +141,6 @@ GAMEOBJS=$(OBJ)\game.$o \
$(OBJ)\gameres.res \
$(OBJ)\startwin.game.$o \
$(JMACTOBJ) \
- $(AUDIOLIBOBJ) \
$(OBJ)\sounds.$o \
$(OBJ)\soundsdyn.$o \
!ifdef DEBUG
@@ -140,12 +155,26 @@ EDITOROBJS=$(OBJ)\astub.$o \
$(OBJ)\m32exec.$o \
$(OBJ)\sounds_mapster32.$o \
$(OBJ)\buildres.res \
- $(AUDIOLIB_FX) \
!ifdef DEBUG
$(OBJ)\mdump.$o
!endif
-
+!if ("$(RENDERTYPE)"=="SDL")
+GAMEOBJS=$(GAMEOBJS) $(OBJ)\game_icon.$o
+EDITOROBJS=$(EDITOROBJS) $(OBJ)\build_icon.$o
+!endif
+
+!if ("$(MIXERTYPE)"=="WIN")
+GAMEOBJS=$(GAMEOBJS) $(OBJ)\midi.$o $(OBJ)\music.$o $(OBJ)\mpu401.$o
+!endif
+!if ("$(MIXERTYPE)"=="SDL")
+GAMEOBJS=$(GAMEOBJS) $(OBJ)\sdlmusic.$o
+!endif
+
+GAMEOBJS=$(GAMEOBJS) $(MUSICOBJ)
+EDITOROBJS=$(EDITOROBJS) $(MUSICOBJ)
+
+
# RULES
.SUFFIXES: .masm
@@ -161,6 +190,9 @@ EDITOROBJS=$(OBJ)\astub.$o \
{$(SRC)\}.c{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
+{$(RSRC)\}.c{$(OBJ)\}.$o:
+ $(CC) /c $(CFLAGS) /Fo$@ $<
+
{$(SRC)\}.cpp{$(OBJ)\}.$o:
$(CC) /c $(CFLAGS) /Fo$@ $<
@@ -186,18 +218,20 @@ enginelib editorlib: AlwaysBuild
echo OBJ=$(MAKEDIR)\$(EOBJ)\ > $(EOBJ)\overrides.mak
echo CFLAGS=$(ENGINEOPTS) >> $(EOBJ)\overrides.mak
echo WINBITS=$(WINBITS) >> $(EOBJ)\overrides.mak
+ echo RENDERTYPE=$(RENDERTYPE) >> $(EOBJ)\overrides.mak
+ echo MIXERTYPE=$(MIXERTYPE) >> $(EOBJ)\overrides.mak
cd $(EROOT)
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(EOBJ)\overrides.mak" $@
cd $(MAKEDIR)
jaudiolib:
cd $(JAUDIOLIBDIR)
- nmake /f Makefile.msvc
+ nmake /f Makefile.msvc "MIXERTYPE=$(MIXERTYPE)" "WINBITS=$(WINBITS)"
cd $(MAKEDIR)
enet:
cd $(ENETDIR)
- nmake /f Makefile.msvc
+ nmake /f Makefile.msvc "WINBITS=$(WINBITS)"
cd $(MAKEDIR)
AlwaysBuild: ;
diff --git a/polymer/eduke32/build/Makefile.msvc b/polymer/eduke32/build/Makefile.msvc
index bc5e98d42..bcb7293f2 100644
--- a/polymer/eduke32/build/Makefile.msvc
+++ b/polymer/eduke32/build/Makefile.msvc
@@ -3,6 +3,10 @@
!include $(OVERRIDES)
!endif
+!ifndef RENDERTYPE
+RENDERTYPE=WIN
+!endif
+
SRC=src
!ifndef OBJ
OBJ=obj.msc
@@ -16,6 +20,10 @@ o=obj
res=res
asm=masm
+!ifndef WINBITS
+WINBITS=32
+!endif
+
!if ($(WINBITS)==64)
NOASM=1
!endif
@@ -39,11 +47,15 @@ flags_link=/DEBUG
flags_lib=
!else
# release options
-flags_cl=/O2 /GL /arch:SSE /MP # /I$(WDKROOT)\inc\crt
+flags_cl=/O2 /GL /MP # /I$(WDKROOT)\inc\crt
+!if ($(WINBITS)!=64)
+flags_cl=$(flags_cl) /arch:SSE
+!endif
flags_link=/RELEASE /LTCG # /LIBPATH:$(WDKROOT)\lib\Crt\i386 /LIBPATH:$(WDKROOT)\lib\wxp\i386
flags_lib=/LTCG
!endif
+
CC=cl
AS=ml
RC=rc
@@ -81,19 +93,23 @@ ENGINEOBJS= \
$(OBJ)\osd.$o \
$(OBJ)\pragmas.$o \
$(OBJ)\scriptfile.$o \
- $(OBJ)\winlayer.$o \
$(OBJ)\polymer.$o \
$(OBJ)\mutex.$o \
- $(OBJ)\rawinput.$o \
$(OBJ)\winbits.$o
EDITOROBJS=$(OBJ)\build.$o \
$(OBJ)\startwin.editor.$o \
$(OBJ)\config.$o
-RENDERTYPE=WIN
+!if ("$(RENDERTYPE)"=="WIN")
+ENGINEOBJS=$(ENGINEOBJS) $(OBJ)\winlayer.$o $(OBJ)\rawinput.$o
+!endif
+!if ("$(RENDERTYPE)"=="SDL")
+ENGINEOBJS=$(ENGINEOBJS) $(OBJ)\sdlayer.$o
+!endif
+
LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib wsock32.lib comctl32.lib dxguid.lib
-CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /W2
+CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2 /W2
# RULES
.SUFFIXES: .masm
diff --git a/polymer/eduke32/eduke32.sln b/polymer/eduke32/eduke32.sln
index 3f5d55730..e262a28d6 100644
--- a/polymer/eduke32/eduke32.sln
+++ b/polymer/eduke32/eduke32.sln
@@ -7,18 +7,30 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
+ Debug-SDL|Win32 = Debug-SDL|Win32
+ Debug-SDL|x64 = Debug-SDL|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
+ Release-SDL|Win32 = Release-SDL|Win32
+ Release-SDL|x64 = Release-SDL|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Debug|Win32.ActiveCfg = Debug|Win32
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Debug|Win32.Build.0 = Debug|Win32
- {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release|Win32.ActiveCfg = Release|Win32
- {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release|Win32.Build.0 = Release|Win32
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Debug|x64.ActiveCfg = Debug|x64
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Debug|x64.Build.0 = Debug|x64
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Debug-SDL|Win32.ActiveCfg = Debug-SDL|Win32
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Debug-SDL|Win32.Build.0 = Debug-SDL|Win32
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Debug-SDL|x64.ActiveCfg = Debug-SDL|x64
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Debug-SDL|x64.Build.0 = Debug-SDL|x64
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release|Win32.ActiveCfg = Release|Win32
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release|Win32.Build.0 = Release|Win32
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release|x64.ActiveCfg = Release|x64
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release|x64.Build.0 = Release|x64
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release-SDL|Win32.ActiveCfg = Release-SDL|Win32
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release-SDL|Win32.Build.0 = Release-SDL|Win32
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release-SDL|x64.ActiveCfg = Release-SDL|x64
+ {8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Release-SDL|x64.Build.0 = Release-SDL|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/polymer/eduke32/eduke32.vcxproj b/polymer/eduke32/eduke32.vcxproj
index dc8a2638a..efbd574a1 100644
--- a/polymer/eduke32/eduke32.vcxproj
+++ b/polymer/eduke32/eduke32.vcxproj
@@ -17,6 +17,22 @@
Release
x64
+
+ Debug-SDL
+ Win32
+
+
+ Release-SDL
+ Win32
+
+
+ Debug-SDL
+ x64
+
+
+ Release-SDL
+ x64
+
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}
@@ -38,6 +54,20 @@
Makefile
+
+ Makefile
+ v110
+
+
+ Makefile
+ v110
+
+
+ Makefile
+
+
+ Makefile
+
@@ -53,6 +83,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
<_ProjectFileVersion>10.0.30319.1
@@ -101,6 +143,51 @@
$(NMakeForcedIncludes)
$(NMakeAssemblySearchPath)
$(NMakeForcedUsingAssemblies)
+ $(Configuration)\
+ $(Configuration)\
+ nmake /f Makefile.msvc DEBUG=1 WINBITS=32 RENDERTYPE=SDL
+ nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=32 RENDERTYPE=SDL
+ nmake /f Makefile.msvc veryclean WINBITS=32 RENDERTYPE=SDL
+ eduke32.exe
+ $(NMakePreprocessorDefinitions)
+ $(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;
+ $(NMakeForcedIncludes)
+ $(NMakeAssemblySearchPath)
+ $(NMakeForcedUsingAssemblies)
+ $(Configuration)\
+ $(Configuration)\
+ nmake /f Makefile.msvc WINBITS=32 RENDERTYPE=SDL
+ nmake /f Makefile.msvc veryclean all WINBITS=32 RENDERTYPE=SDL
+ nmake /f Makefile.msvc veryclean WINBITS=32 RENDERTYPE=SDL
+ eduke32.exe
+ $(NMakePreprocessorDefinitions)
+ $(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;
+ $(NMakeForcedIncludes)
+ $(NMakeAssemblySearchPath)
+ $(NMakeForcedUsingAssemblies)
+ $(SourcePath)
+ $(Configuration)\
+ $(Configuration)\
+ nmake /f Makefile.msvc DEBUG=1 WINBITS=64 RENDERTYPE=SDL
+ nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=64 RENDERTYPE=SDL
+ nmake /f Makefile.msvc veryclean WINBITS=64 RENDERTYPE=SDL
+ eduke32.exe
+ $(NMakePreprocessorDefinitions)
+ $(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;
+ $(NMakeForcedIncludes)
+ $(NMakeAssemblySearchPath)
+ $(NMakeForcedUsingAssemblies)
+ $(Configuration)\
+ $(Configuration)\
+ nmake /f Makefile.msvc WINBITS=64 RENDERTYPE=SDL
+ nmake /f Makefile.msvc veryclean all WINBITS=64 RENDERTYPE=SDL
+ nmake /f Makefile.msvc veryclean WINBITS=64 RENDERTYPE=SDL
+ eduke32.exe
+ $(NMakePreprocessorDefinitions)
+ $(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;
+ $(NMakeForcedIncludes)
+ $(NMakeAssemblySearchPath)
+ $(NMakeForcedUsingAssemblies)
$(SourcePath)
@@ -127,6 +214,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/polymer/eduke32/source/enet/Makefile.msvc b/polymer/eduke32/source/enet/Makefile.msvc
index 6fc69b565..a4f02292c 100644
--- a/polymer/eduke32/source/enet/Makefile.msvc
+++ b/polymer/eduke32/source/enet/Makefile.msvc
@@ -10,7 +10,10 @@ flags_link=/DEBUG
flags_lib=
!else
# release options
-flags_cl=/Ox /GL /arch:SSE
+flags_cl=/Ox /GL
+!if ($(WINBITS)!=64)
+flags_cl=$(flags_cl) /arch:SSE
+!endif
flags_link=/RELEASE /LTCG
flags_lib=/LTCG
!endif
@@ -23,7 +26,7 @@ CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(SRC)
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
!endif
-CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /D "_CRT_SECURE_NO_DEPRECATE" /W2 /Iinclude/msvc /DWIN32
+CFLAGS=$(CFLAGS) /D "_CRT_SECURE_NO_DEPRECATE" /W2 /Iinclude/msvc /DWIN32
OBJECTS=$(OBJ)\callbacks.o \
$(OBJ)\host.o \
diff --git a/polymer/eduke32/source/jaudiolib/Makefile.msvc b/polymer/eduke32/source/jaudiolib/Makefile.msvc
index 0d56c23b3..0976a62c5 100644
--- a/polymer/eduke32/source/jaudiolib/Makefile.msvc
+++ b/polymer/eduke32/source/jaudiolib/Makefile.msvc
@@ -3,6 +3,10 @@ INC=include
SRC=src
JFAUDIOLIB=libjfaudiolib.lib
+!ifndef MIXERTYPE
+MIXERTYPE=WIN
+!endif
+
!ifdef DEBUG
# debugging options
flags_cl=/Od /Zi
@@ -10,7 +14,10 @@ flags_link=/DEBUG
flags_lib=
!else
# release options
-flags_cl=/Ox /GL /arch:SSE
+flags_cl=/Ox /GL
+!if ($(WINBITS)!=64)
+flags_cl=$(flags_cl) /arch:SSE
+!endif
flags_link=/RELEASE /LTCG
flags_lib=/LTCG
!endif
@@ -26,7 +33,7 @@ CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC) /I$(SRC) /I$(
CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS
!endif
-CFLAGS=$(CFLAGS) /DRENDERTYPEWIN=1 /DMIXERTYPEWIN=1 /D "_CRT_SECURE_NO_DEPRECATE" /W2 /Iinclude/msvc /DHAVE_DS /DHAVE_VORBIS /DHAVE_FLAC
+CFLAGS=$(CFLAGS) /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2 /D "_CRT_SECURE_NO_DEPRECATE" /W2 /Iinclude/msvc /DHAVE_VORBIS /DHAVE_FLAC
OBJECTS=$(OBJ)\drivers.o \
$(OBJ)\fx_man.o \
@@ -38,8 +45,16 @@ OBJECTS=$(OBJ)\drivers.o \
$(OBJ)\vorbis.o \
$(OBJ)\flac.o \
$(OBJ)\xa.o \
- $(OBJ)\driver_nosound.o \
- $(OBJ)\driver_directsound.o
+ $(OBJ)\driver_nosound.o
+
+!if ("$(MIXERTYPE)"=="WIN")
+CFLAGS=$(CFLAGS) /DHAVE_DS
+OBJECTS=$(OBJECTS) $(OBJ)/driver_directsound.o
+!endif
+!if ("$(MIXERTYPE)"=="SDL")
+CFLAGS=$(CFLAGS) /DHAVE_SDL
+OBJECTS=$(OBJECTS) $(OBJ)/driver_sdl.o
+!endif
{$(SRC)}.c{$(OBJ)}.o:
$(CC) /c $(CFLAGS) /Fo$@ $<