mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Remove SDL 1.2 support from the build systems.
This commit is contained in:
parent
3d9674f3b8
commit
333d19766f
2 changed files with 4 additions and 77 deletions
|
@ -19,7 +19,6 @@ if(YQUAKE2LIBS)
|
|||
endif()
|
||||
|
||||
set(ENV{OPENALDIR} ${YQUAKE2LIBS})
|
||||
set(ENV{SDLDIR} ${YQUAKE2LIBS})
|
||||
set(ENV{SDL2DIR} ${YQUAKE2LIBS})
|
||||
endif()
|
||||
|
||||
|
@ -80,16 +79,9 @@ endif()
|
|||
# Required libraries to build the different components of the binaries. Find
|
||||
# them and add the include/linker directories and flags (in case the package
|
||||
# manager find it in a weird place)
|
||||
find_package(SDL2)
|
||||
if(${SDL2_FOUND})
|
||||
add_definitions(-DSDL2)
|
||||
list(APPEND yquake2IncludeDirectories "${SDL2_INCLUDE_DIR}/..")
|
||||
list(APPEND yquake2SDLLinkerFlags ${SDL2_LIBRARY})
|
||||
else()
|
||||
find_package(SDL REQUIRED)
|
||||
list(APPEND yquake2IncludeDirectories "${SDL_INCLUDE_DIR}/..")
|
||||
list(APPEND yquake2SDLLinkerFlags ${SDL_LIBRARY})
|
||||
endif()
|
||||
find_package(SDL2 REQUIRED)
|
||||
list(APPEND yquake2IncludeDirectories "${SDL2_INCLUDE_DIR}/..")
|
||||
list(APPEND yquake2SDLLinkerFlags ${SDL2_LIBRARY})
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
list(APPEND yquake2IncludeDirectories ${OPENGL_INCLUDE_DIR})
|
||||
|
@ -101,8 +93,6 @@ if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
|
|||
list(APPEND yquake2ServerLinkerFlags ${EXECINFO_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
if(${ZIP_SUPPORT})
|
||||
find_package(ZLIB REQUIRED)
|
||||
list(APPEND yquake2IncludeDirectories ${ZLIB_INCLUDE_DIRS})
|
||||
|
|
65
Makefile
65
Makefile
|
@ -7,7 +7,7 @@
|
|||
# - Quake II Game (baseq2) #
|
||||
# #
|
||||
# Base dependencies: #
|
||||
# - SDL 1.2 or SDL 2.0 #
|
||||
# - SDL 2.0 #
|
||||
# - libGL #
|
||||
# #
|
||||
# Further dependencies: #
|
||||
|
@ -44,12 +44,6 @@ WITH_OPENAL:=yes
|
|||
# is ignored, OpenAL is always loaded at runtime.
|
||||
DLOPEN_OPENAL:=yes
|
||||
|
||||
# Use SDL2 instead of SDL1.2. Disables CD audio support,
|
||||
# because SDL2 has none. Use OGG/Vorbis music instead :-)
|
||||
# On Windows sdl-config isn't used, so make sure that
|
||||
# you've got the SDL2 headers and libs installed.
|
||||
WITH_SDL2:=yes
|
||||
|
||||
# Enables opening of ZIP files (also known as .pk3 paks).
|
||||
# Adds a dependency to libz
|
||||
WITH_ZIP:=yes
|
||||
|
@ -222,11 +216,7 @@ endif
|
|||
# ----------
|
||||
|
||||
# Extra CFLAGS for SDL
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
SDLCFLAGS := $(shell sdl2-config --cflags)
|
||||
else # not SDL2
|
||||
SDLCFLAGS := $(shell sdl-config --cflags)
|
||||
endif # SDL2
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -273,17 +263,9 @@ endif
|
|||
|
||||
# Extra LDFLAGS for SDL
|
||||
ifeq ($(YQ2_OSTYPE), Darwin)
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
SDLLDFLAGS := -lSDL2
|
||||
else # not SDL2
|
||||
SDLLDFLAGS := -lSDL -framework OpenGL -framework Cocoa
|
||||
endif # SDL2
|
||||
else # not Darwin
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
SDLLDFLAGS := $(shell sdl2-config --libs)
|
||||
else # not SDL2
|
||||
SDLLDFLAGS := $(shell sdl-config --libs)
|
||||
endif # SDL2
|
||||
endif # Darwin
|
||||
|
||||
# ----------
|
||||
|
@ -314,7 +296,6 @@ config:
|
|||
@echo "Build configuration"
|
||||
@echo "============================"
|
||||
@echo "WITH_OPENAL = $(WITH_OPENAL)"
|
||||
@echo "WITH_SDL2 = $(WITH_SDL2)"
|
||||
@echo "WITH_ZIP = $(WITH_ZIP)"
|
||||
@echo "WITH_SYSTEMWIDE = $(WITH_SYSTEMWIDE)"
|
||||
@echo "WITH_SYSTEMDIR = $(WITH_SYSTEMDIR)"
|
||||
|
@ -373,10 +354,6 @@ release/yquake2.exe : CFLAGS += -DZIP -DNOUNCRYPT
|
|||
release/yquake2.exe : LDFLAGS += -lz
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/yquake2.exe : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
release/yquake2.exe : LDFLAGS += -mwindows
|
||||
|
||||
else # not Windows
|
||||
|
@ -430,10 +407,6 @@ release/quake2 : CFLAGS += $(ZIPCFLAGS) -DZIP -DNOUNCRYPT
|
|||
release/quake2 : LDFLAGS += -lz
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/quake2 : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
ifeq ($(YQ2_OSTYPE), FreeBSD)
|
||||
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib' -lexecinfo
|
||||
else ifeq ($(YQ2_OSTYPE), Linux)
|
||||
|
@ -511,10 +484,6 @@ ref_gl1:
|
|||
@echo "===> Building ref_gl1.dll"
|
||||
$(MAKE) release/ref_gl1.dll
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_gl1.dll : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
release/ref_gl1.dll : LDFLAGS += -lopengl32 -shared
|
||||
|
||||
# don't want the dll to link against libSDL2main or libmingw32, and no -mwindows either
|
||||
|
@ -528,10 +497,6 @@ ref_gl1:
|
|||
$(MAKE) release/ref_gl1.dylib
|
||||
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_gl1.dylib : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
release/ref_gl1.dylib : LDFLAGS += -shared -framework OpenGL
|
||||
|
||||
else # not Windows or Darwin
|
||||
|
@ -544,10 +509,6 @@ ref_gl1:
|
|||
release/ref_gl1.so : CFLAGS += -fPIC
|
||||
release/ref_gl1.so : LDFLAGS += -shared -lGL
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_gl1.so : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
endif # OS specific ref_gl1 shit
|
||||
|
||||
build/ref_gl1/%.o: %.c
|
||||
|
@ -565,10 +526,6 @@ ref_gl3:
|
|||
@echo "===> Building ref_gl3.dll"
|
||||
$(MAKE) release/ref_gl3.dll
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_gl3.dll : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
release/ref_gl3.dll : LDFLAGS += -shared
|
||||
|
||||
else ifeq ($(YQ2_OSTYPE), Darwin)
|
||||
|
@ -578,10 +535,6 @@ ref_gl3:
|
|||
$(MAKE) release/ref_gl3.dylib
|
||||
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_gl3.dylib : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
release/ref_gl3.dylib : LDFLAGS += -shared
|
||||
|
||||
else # not Windows or Darwin
|
||||
|
@ -594,10 +547,6 @@ ref_gl3:
|
|||
release/ref_gl3.so : CFLAGS += -fPIC
|
||||
release/ref_gl3.so : LDFLAGS += -shared
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_gl3.so : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
endif # OS specific ref_gl3 shit
|
||||
|
||||
build/ref_gl3/%.o: %.c
|
||||
|
@ -615,10 +564,6 @@ ref_soft:
|
|||
@echo "===> Building ref_soft.dll"
|
||||
$(MAKE) release/ref_soft.dll
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_soft.dll : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
release/ref_soft.dll : LDFLAGS += -shared
|
||||
|
||||
else ifeq ($(YQ2_OSTYPE), Darwin)
|
||||
|
@ -627,10 +572,6 @@ ref_soft:
|
|||
@echo "===> Building ref_soft.dylib"
|
||||
$(MAKE) release/ref_soft.dylib
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_soft.dylib : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
release/ref_soft.dylib : LDFLAGS += -shared
|
||||
|
||||
else # not Windows or Darwin
|
||||
|
@ -642,10 +583,6 @@ ref_soft:
|
|||
release/ref_soft.so : CFLAGS += -fPIC
|
||||
release/ref_soft.so : LDFLAGS += -shared
|
||||
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
release/ref_soft.so : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
endif # OS specific ref_soft shit
|
||||
|
||||
build/ref_soft/%.o: %.c
|
||||
|
|
Loading…
Reference in a new issue