mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Remove CDA and X11GAMMA build system support.
* CDA was only supported of the client was build with SDL 1.2. Our Windows binaries had no CDA support for years, I'm pretty sure that it never worked on Linux and no computer build after 2005 has even the necessary hardware. So let's just remove it. * X11GAMMA was a hack to work around SDL 1.2s inability to set the gamma on newer xorg-server versions. It has been broken for some time now an is rather ugly. Remove it. This is the first step in removing SDL 1.2 support.
This commit is contained in:
parent
38a499c335
commit
307d5eecf7
2 changed files with 2 additions and 75 deletions
|
@ -87,7 +87,6 @@ if(${SDL2_FOUND})
|
|||
list(APPEND yquake2SDLLinkerFlags ${SDL2_LIBRARY})
|
||||
else()
|
||||
find_package(SDL REQUIRED)
|
||||
add_definitions(-DWITH_CDA)
|
||||
list(APPEND yquake2IncludeDirectories "${SDL_INCLUDE_DIR}/..")
|
||||
list(APPEND yquake2SDLLinkerFlags ${SDL_LIBRARY})
|
||||
endif()
|
||||
|
@ -177,7 +176,6 @@ set(Backends-Generic-Source
|
|||
${BACKENDS_SRC_DIR}/generic/qal.c
|
||||
${BACKENDS_SRC_DIR}/generic/vid.c
|
||||
|
||||
${BACKENDS_SRC_DIR}/sdl/cd.c
|
||||
${BACKENDS_SRC_DIR}/sdl/input.c
|
||||
${BACKENDS_SRC_DIR}/sdl/refresh.c
|
||||
${BACKENDS_SRC_DIR}/sdl/sound.c
|
||||
|
@ -376,7 +374,6 @@ set(Client-Header
|
|||
${CLIENT_SRC_DIR}/header/screen.h
|
||||
${CLIENT_SRC_DIR}/header/vid.h
|
||||
${CLIENT_SRC_DIR}/menu/header/qmenu.h
|
||||
${CLIENT_SRC_DIR}/sound/header/cdaudio.h
|
||||
${CLIENT_SRC_DIR}/sound/header/local.h
|
||||
${CLIENT_SRC_DIR}/sound/header/sound.h
|
||||
${CLIENT_SRC_DIR}/sound/header/vorbis.h
|
||||
|
|
74
Makefile
74
Makefile
|
@ -27,12 +27,6 @@
|
|||
# User configurable options
|
||||
# -------------------------
|
||||
|
||||
# Enables CD audio playback. CD audio playback is used
|
||||
# for the background music and doesn't add any further
|
||||
# dependencies. It should work on all platforms where
|
||||
# CD playback is supported by SDL.
|
||||
WITH_CDA:=yes
|
||||
|
||||
# Enables OGG/Vorbis support. OGG/Vorbis files can be
|
||||
# used as a substitute of CD audio playback. Adds
|
||||
# dependencies to libogg, libvorbis and libvorbisfile.
|
||||
|
@ -56,12 +50,6 @@ DLOPEN_OPENAL:=yes
|
|||
# you've got the SDL2 headers and libs installed.
|
||||
WITH_SDL2:=yes
|
||||
|
||||
# Set the gamma via X11 and not via SDL. This works
|
||||
# around problems in some SDL version. Adds dependencies
|
||||
# to pkg-config, libX11 and libXxf86vm. Unsupported on
|
||||
# Windows and OS X.
|
||||
WITH_X11GAMMA:=no
|
||||
|
||||
# Enables opening of ZIP files (also known as .pk3 paks).
|
||||
# Adds a dependency to libz
|
||||
WITH_ZIP:=yes
|
||||
|
@ -137,18 +125,6 @@ endif
|
|||
# cross-compiling.
|
||||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
# Disable CDA for SDL2
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
ifeq ($(WITH_CDA),yes)
|
||||
WITH_CDA:=no
|
||||
|
||||
# Evil hack to tell the "all" target
|
||||
# that CDA was disabled because SDL2
|
||||
# is enabled.
|
||||
CDA_DISABLED:=yes
|
||||
endif
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
# Base CFLAGS.
|
||||
|
@ -254,18 +230,6 @@ endif # SDL2
|
|||
|
||||
# ----------
|
||||
|
||||
# Extra CFLAGS for X11
|
||||
ifneq ($(YQ2_OSTYPE), Windows)
|
||||
ifneq ($(YQ2_OSTYPE), Darwin)
|
||||
ifeq ($(WITH_X11GAMMA),yes)
|
||||
X11CFLAGS := $(shell $(PKG_CONFIG) x11 --cflags)
|
||||
X11CFLAGS += $(shell $(PKG_CONFIG) xxf86vm --cflags)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
# Base include path.
|
||||
ifeq ($(YQ2_OSTYPE),Linux)
|
||||
INCLUDE := -I/usr/include
|
||||
|
@ -324,19 +288,6 @@ endif # Darwin
|
|||
|
||||
# ----------
|
||||
|
||||
# Extra LDFLAGS for X11
|
||||
ifneq ($(YQ2_OSTYPE), Windows)
|
||||
ifneq ($(YQ2_OSTYPE), Darwin)
|
||||
ifeq ($(WITH_X11GAMMA),yes)
|
||||
X11LDFLAGS := $(shell $(PKG_CONFIG) x11 --libs)
|
||||
X11LDFLAGS += $(shell $(PKG_CONFIG) xxf86vm --libs)
|
||||
X11LDFLAGS += $(shell $(PKG_CONFIG) xrandr --libs)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
# When make is invoked by "make VERBOSE=1" print
|
||||
# the compiler and linker commands.
|
||||
|
||||
|
@ -362,21 +313,13 @@ all: config client server game ref_gl1 ref_gl3 ref_soft
|
|||
config:
|
||||
@echo "Build configuration"
|
||||
@echo "============================"
|
||||
@echo "WITH_CDA = $(WITH_CDA)"
|
||||
@echo "WITH_OPENAL = $(WITH_OPENAL)"
|
||||
@echo "WITH_SDL2 = $(WITH_SDL2)"
|
||||
@echo "WITH_X11GAMMA = $(WITH_X11GAMMA)"
|
||||
@echo "WITH_ZIP = $(WITH_ZIP)"
|
||||
@echo "WITH_SYSTEMWIDE = $(WITH_SYSTEMWIDE)"
|
||||
@echo "WITH_SYSTEMDIR = $(WITH_SYSTEMDIR)"
|
||||
@echo "============================"
|
||||
@echo ""
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
ifeq ($(CDA_DISABLED),yes)
|
||||
@echo "WARNING: CDA disabled because SDL2 doesn't support it!"
|
||||
@echo ""
|
||||
endif
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -416,10 +359,6 @@ build/client/%.o: %.c
|
|||
${Q}mkdir -p $(@D)
|
||||
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
ifeq ($(WITH_CDA),yes)
|
||||
release/yquake2.exe : CFLAGS += -DCDA
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OGG),yes)
|
||||
release/yquake2.exe : CFLAGS += -DOGG
|
||||
release/yquake2.exe : LDFLAGS += -lvorbisfile -lvorbis -logg
|
||||
|
@ -461,10 +400,6 @@ endif
|
|||
|
||||
release/quake2 : CFLAGS += -Wno-unused-result
|
||||
|
||||
ifeq ($(WITH_CDA),yes)
|
||||
release/quake2 : CFLAGS += -DCDA
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OGG),yes)
|
||||
release/quake2 : CFLAGS += -DOGG
|
||||
release/quake2 : LDFLAGS += -lvorbis -lvorbisfile -logg
|
||||
|
@ -495,10 +430,6 @@ release/quake2 : CFLAGS += $(ZIPCFLAGS) -DZIP -DNOUNCRYPT
|
|||
release/quake2 : LDFLAGS += -lz
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_X11GAMMA),yes)
|
||||
release/quake2 : CFLAGS += -DX11GAMMA
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/quake2 : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
@ -622,7 +553,7 @@ endif # OS specific ref_gl1 shit
|
|||
build/ref_gl1/%.o: %.c
|
||||
@echo "===> CC $<"
|
||||
${Q}mkdir -p $(@D)
|
||||
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(X11CFLAGS) $(INCLUDE) -o $@ $<
|
||||
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -825,7 +756,6 @@ CLIENT_OBJS_ := \
|
|||
src/backends/generic/misc.o \
|
||||
src/backends/generic/qal.o \
|
||||
src/backends/generic/vid.o \
|
||||
src/backends/sdl/cd.o \
|
||||
src/backends/sdl/input.o \
|
||||
src/backends/sdl/refresh.o \
|
||||
src/backends/sdl/sound.o \
|
||||
|
@ -1094,7 +1024,7 @@ release/quake2.exe : src/win-wrapper/wrapper.c icon
|
|||
else
|
||||
release/quake2 : $(CLIENT_OBJS)
|
||||
@echo "===> LD $@"
|
||||
${Q}$(CC) $(CLIENT_OBJS) $(LDFLAGS) $(SDLLDFLAGS) $(X11LDFLAGS) -o $@
|
||||
${Q}$(CC) $(CLIENT_OBJS) $(LDFLAGS) $(SDLLDFLAGS) -o $@
|
||||
endif
|
||||
|
||||
# release/q2ded
|
||||
|
|
Loading…
Reference in a new issue