From 84117bd7e3bb3b7df20d86749155d78cae3783df Mon Sep 17 00:00:00 2001 From: Lance Date: Tue, 7 Apr 2009 03:48:32 +0000 Subject: [PATCH] MinGL & Merged targets added to SDL. Dedicated server, OpenGL & Software rendered SDL clients now build in Linux and run but untested. r3162 was to resolve the SDL MinGL's build error: undefined reference to `NET_Sleep' git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3163 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/Makefile | 19 ++++++++++++++++++- engine/gl/gl_vidsdl.c | 2 ++ engine/sw/vid_sdl.c | 6 +++++- 3 files changed, 25 insertions(+), 2 deletions(-) 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) {