diff --git a/engine/Makefile b/engine/Makefile index 09ed4f695..0f3a6feeb 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -488,7 +488,24 @@ SWCL_DIR=swcl_sdl$(BITS) SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(SERVERONLY_OBJS) SV_EXE_NAME=../fteqw.sv$(BITS) -SV_CFLAGS=$(SERVER_ONLY_CFLAGS) +SV_CFLAGS=$(SERVER_ONLY_CFLAGS) -lz + +MINGL_DIR=mingl_sdl$(BITS) +MINGL_EXE_NAME=../fteqw_sdl.mingl$(BITS) + +MB_DIR=m_sdl$(BITS) +M_EXE_NAME=../fteqw_sdl$(BITS) +MCL_OBJS=$(GLQUAKE_OBJS) $(SOFTWARE_OBJS) gl_vidsdl.o vid_sdl.o snd_sdl.o cd_sdl.o sys_sdl.o in_sdl.o +M_CFLAGS=$(SWCFLAGS) $(GLCFLAGS) `sdl-config --cflags` -D_MERGED_SDL +M_LDFLAGS=$(GLLDFLAGS) $(IMAGELDFLAGS) + +ifdef windir + M_LDFLAGS=$(MLDFLAGS) -lmingw32 -lwsock32 -lSDLmain -lSDL +else + #pthread is needed because of SDL. + M_LDFLAGS=$(MLDFLAGS) `sdl-config --libs` $(IMAGELDFLAGS) +endif + #specific targets override those defaults as needed. diff --git a/engine/gl/gl_vidsdl.c b/engine/gl/gl_vidsdl.c index d26302d3e..4f62800cc 100644 --- a/engine/gl/gl_vidsdl.c +++ b/engine/gl/gl_vidsdl.c @@ -18,7 +18,9 @@ HWND mainwindow; extern qboolean vid_isfullscreen; +#ifdef IN_XFLIP cvar_t in_xflip = {"in_xflip", "0"}; +#endif unsigned short intitialgammaramps[3][256]; diff --git a/engine/sw/vid_sdl.c b/engine/sw/vid_sdl.c index 8217af4df..ad9d9a458 100755 --- a/engine/sw/vid_sdl.c +++ b/engine/sw/vid_sdl.c @@ -16,7 +16,11 @@ extern SDL_Surface *sdlsurf; qbyte vid_curpal[768]; -cvar_t in_xflip = {"in_xflip", "0"}; +#ifdef IN_XFLIP + #ifndef _MERGED_SDL // in_xflip is in both SW and GL SDL renderers. + cvar_t in_xflip = {"in_xflip", "0"}; + #endif +#endif void ResetFrameBuffers(void) {