diff --git a/Makefile b/Makefile index 8dd310c1..452cb3bc 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,6 @@ # - FreeBSD # # - Linux # # - OpenBSD # -# - OS X # # - Windows (MinGW) # # ------------------------------------------------------ # @@ -69,19 +68,6 @@ WITH_SYSTEMWIDE:=no # MUST NOT be surrounded by quotation marks! WITH_SYSTEMDIR:="" -# This will set the architectures of the OSX-binaries. -# You have to make sure your libs/frameworks supports -# these architectures! To build an universal ppc-compatible -# one would add -arch ppc for example. -OSX_ARCH:=-arch i386 -arch x86_64 - -# This will set the build options to create an MacOS .app-bundle. -# The app-bundle itself will not be created, but the runtime paths -# will be set to expect the linked Frameworks in *.app/Contents/ -# Frameworks and the game-data will be expected in *.app/ -# Contents/Resources -OSX_APP:=yes - # This is an optional configuration file, it'll be used in # case of presence. CONFIG_FILE := config.mk @@ -154,14 +140,8 @@ endif # # -MMD to generate header dependencies. (They cannot be # generated if building universal binaries on OSX) -ifeq ($(OSTYPE), Darwin) -CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \ - -Wall -pipe -g -CFLAGS += $(OSX_ARCH) -else CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \ -Wall -pipe -g -ggdb -MMD -endif # ---------- @@ -184,9 +164,6 @@ endif # ---------- # Extra CFLAGS for SDL -ifeq ($(OSTYPE), Darwin) -SDLCFLAGS := -else # not darwin ifeq ($(WITH_SDL2),yes) ifeq ($(OSTYPE),Windows) SDLCFLAGS := $(shell /custom/bin/sdl2-config --cflags) @@ -200,19 +177,16 @@ else SDLCFLAGS := $(shell sdl-config --cflags) endif endif # SDL2 -endif # darwin's else # ---------- # Extra CFLAGS for X11 ifneq ($(OSTYPE), Windows) -ifneq ($(OSTYPE), Darwin) ifeq ($(WITH_X11GAMMA),yes) X11CFLAGS := $(shell pkg-config x11 --cflags) X11CFLAGS += $(shell pkg-config xxf86vm --cflags) endif endif -endif # ---------- @@ -223,8 +197,6 @@ else ifeq ($(OSTYPE),FreeBSD) INCLUDE := -I/usr/local/include else ifeq ($(OSTYPE),OpenBSD) INCLUDE := -I/usr/local/include -else ifeq ($(OSTYPE),Darwin) -INCLUDE := else ifeq ($(OSTYPE),Windows) INCLUDE := -I/custom/include endif @@ -240,8 +212,6 @@ else ifeq ($(OSTYPE),OpenBSD) LDFLAGS := -L/usr/local/lib -lm else ifeq ($(OSTYPE),Windows) LDFLAGS := -L/custom/lib -static -lws2_32 -lwinmm -else ifeq ($(OSTYPE), Darwin) -LDFLAGS := $(OSX_ARCH) -lm endif # ---------- @@ -253,32 +223,24 @@ SDLLDFLAGS := $(shell /custom/bin/sdl2-config --static-libs) else # not SDL2 SDLLDFLAGS := -lSDL endif # SDL2 -else ifeq ($(OSTYPE), Darwin) -ifeq ($(WITH_SDL2),yes) -SDLLDFLAGS := -framework SDL2 -framework OpenGL -framework Cocoa -else # not SDL2 -SDLLDFLAGS := -framework SDL -framework OpenGL -framework Cocoa -endif # SDL2 -else # not Darwin/Win +else # not Win ifeq ($(WITH_SDL2),yes) SDLLDFLAGS := $(shell sdl2-config --libs) else # not SDL2 SDLLDFLAGS := $(shell sdl-config --libs) endif # SDL2 -endif # Darwin/Win +endif # Win # ---------- # Extra LDFLAGS for X11 ifneq ($(OSTYPE), Windows) -ifneq ($(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 # ---------- @@ -376,7 +338,7 @@ release/quake2.exe : CFLAGS += -DSDL2 endif release/quake2.exe : LDFLAGS += -mwindows -lopengl32 -else +else # not Windows client: @echo "===> Building quake2" ${Q}mkdir -p release @@ -387,32 +349,18 @@ build/client/%.o: %.c ${Q}mkdir -p $(@D) ${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(X11CFLAGS) $(INCLUDE) -o $@ $< -ifeq ($(OSTYPE), Darwin) -build/client/%.o : %.m - @echo "===> CC $<" - ${Q}mkdir -p $(@D) - ${Q}$(CC) $(OSX_ARCH) -x objective-c -c $< -o $@ -endif - ifeq ($(WITH_CDA),yes) release/quake2 : CFLAGS += -DCDA endif ifeq ($(WITH_OGG),yes) release/quake2 : CFLAGS += -DOGG -ifeq ($(OSTYPE), Darwin) -release/quake2 : LDFLAGS += -framework Vorbis -framework Ogg -else release/quake2 : LDFLAGS += -lvorbis -lvorbisfile -logg endif -endif ifeq ($(WITH_OPENAL),yes) ifeq ($(OSTYPE), OpenBSD) release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so"' -else ifeq ($(OSTYPE), Darwin) -release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"/System/Library/Frameworks/OpenAL.framework/OpenAL"' -release/quake2 : LDFLAGS += -framework OpenAL else release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so.1"' endif @@ -431,15 +379,7 @@ ifeq ($(WITH_SDL2),yes) release/quake2 : CFLAGS += -DSDL2 endif -ifeq ($(OSTYPE), Darwin) -ifeq ($(OSX_APP), yes) -release/quake2 : LDFLAGS += -Xlinker -rpath -Xlinker @loader_path/../Frameworks -endif -endif - -ifneq ($(OSTYPE), Darwin) release/quake2 : LDFLAGS += -lGL -endif ifeq ($(OSTYPE), FreeBSD) release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib' @@ -485,7 +425,7 @@ ifeq ($(WITH_ZIP),yes) release/q2ded.exe : CFLAGS += -DZIP -DNOUNCRYPT release/q2ded.exe : LDFLAGS += -lz endif -else +else # not Windows server: @echo "===> Building q2ded" ${Q}mkdir -p release @@ -519,7 +459,7 @@ build/baseq2/%.o: %.c ${Q}$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $< release/baseq2/game.dll : LDFLAGS += -shared -else +else # not Windows game: @echo "===> Building baseq2/game.so" ${Q}mkdir -p release/baseq2 @@ -683,10 +623,6 @@ CLIENT_OBJS_ += \ src/backends/unix/shared/hunk.o endif -ifeq ($(OSTYPE), Darwin) -CLIENT_OBJS_ += src/backends/sdl_osx/SDLMain.o -endif - # ---------- # Used by the server @@ -726,7 +662,7 @@ SERVER_OBJS_ += \ src/backends/windows/network.o \ src/backends/windows/system.o \ src/backends/windows/shared/mem.o -else +else # not Windows SERVER_OBJS_ += \ src/backends/unix/main.o \ src/backends/unix/network.o \ diff --git a/src/backends/generic/header/qal.h b/src/backends/generic/header/qal.h index de1a3437..7c6616b1 100644 --- a/src/backends/generic/header/qal.h +++ b/src/backends/generic/header/qal.h @@ -31,12 +31,8 @@ #ifndef _QAL_API_H_ #define _QAL_API_H_ - #if defined (__APPLE__) - #include - #else #include #include - #endif /* Function pointers used to tie * the qal API to the OpenAL API */ @@ -113,12 +109,10 @@ extern LPALDOPPLERFACTOR qalDopplerFactor; extern LPALDOPPLERVELOCITY qalDopplerVelocity; extern LPALSPEEDOFSOUND qalSpeedOfSound; extern LPALDISTANCEMODEL qalDistanceModel; -#if !defined (__APPLE__) extern LPALGENFILTERS qalGenFilters; extern LPALFILTERI qalFilteri; extern LPALFILTERF qalFilterf; extern LPALDELETEFILTERS qalDeleteFilters; -#endif /* * Gives information over the OpenAL diff --git a/src/backends/generic/qal.c b/src/backends/generic/qal.c index d908828b..ae04ac2f 100644 --- a/src/backends/generic/qal.c +++ b/src/backends/generic/qal.c @@ -32,14 +32,9 @@ #ifdef USE_OPENAL -#if defined (__APPLE__) -#include -#include -#else #include #include #include -#endif #include "../../common/header/common.h" #include "../../client/sound/header/local.h" @@ -148,12 +143,10 @@ LPALDOPPLERFACTOR qalDopplerFactor; LPALDOPPLERVELOCITY qalDopplerVelocity; LPALSPEEDOFSOUND qalSpeedOfSound; LPALDISTANCEMODEL qalDistanceModel; -#if !defined (__APPLE__) LPALGENFILTERS qalGenFilters; LPALFILTERI qalFilteri; LPALFILTERF qalFilterf; LPALDELETEFILTERS qalDeleteFilters; -#endif /* * Gives information over the OpenAL @@ -324,12 +317,10 @@ QAL_Shutdown() qalDopplerVelocity = NULL; qalSpeedOfSound = NULL; qalDistanceModel = NULL; -#if !defined (__APPLE__) qalGenFilters = NULL; qalFilteri = NULL; qalFilterf = NULL; qalDeleteFilters = NULL; -#endif /* Unload the shared lib */ Sys_FreeLibrary(handle); @@ -494,7 +485,6 @@ QAL_Init() return false; } -#if !defined (__APPLE__) if (qalcIsExtensionPresent(device, "ALC_EXT_EFX") != AL_FALSE) { qalGenFilters = qalGetProcAddress("alGenFilters"); qalFilteri = qalGetProcAddress("alFilteri"); @@ -506,7 +496,6 @@ QAL_Init() qalFilterf = NULL; qalDeleteFilters = NULL; } -#endif Com_Printf("ok\n"); diff --git a/src/backends/unix/main.c b/src/backends/unix/main.c index 7bb69672..328c92d7 100644 --- a/src/backends/unix/main.c +++ b/src/backends/unix/main.c @@ -34,7 +34,7 @@ #include "../../common/header/common.h" #include "header/unix.h" -#if defined(__APPLE__) && !defined(DEDICATED_ONLY) +#if !defined(DEDICATED_ONLY) #include #endif diff --git a/src/client/sound/openal.c b/src/client/sound/openal.c index 849acdda..e2a3cefd 100644 --- a/src/client/sound/openal.c +++ b/src/client/sound/openal.c @@ -54,12 +54,7 @@ qboolean streamPlaying; static ALuint s_srcnums[MAX_CHANNELS - 1]; static ALuint streamSource; static int s_framecount; - -/* Apple crappy OpenAL implementation - has no support for filters. */ -#ifndef __APPLE__ static ALuint underwaterFilter; -#endif /* ----------------------------------------------------------------- */ @@ -661,7 +656,6 @@ AL_Update(void) void AL_Underwater() { -#if !defined (__APPLE__) int i; if (sound_started != SS_OAL) @@ -677,7 +671,6 @@ AL_Underwater() { qalSourcei(s_srcnums[i], AL_DIRECT_FILTER, underwaterFilter); } -#endif } /* @@ -686,7 +679,6 @@ AL_Underwater() void AL_Overwater() { -#if !defined (__APPLE__) int i; if (sound_started != SS_OAL) @@ -702,7 +694,6 @@ AL_Overwater() { qalSourcei(s_srcnums[i], AL_DIRECT_FILTER, 0); } -#endif } /* ----------------------------------------------------------------- */ @@ -728,7 +719,6 @@ AL_InitStreamSource() static void AL_InitUnderwaterFilter() { -#if !defined (__APPLE__) underwaterFilter = 0; if (!(qalGenFilters && qalFilteri && qalFilterf && qalDeleteFilters)) @@ -756,7 +746,6 @@ AL_InitUnderwaterFilter() s_underwater->modified = true; s_underwater_gain_hf->modified = true; -#endif } /* @@ -817,10 +806,7 @@ AL_Init(void) s_numchannels = i; AL_InitStreamSource(); - -#ifndef __APPLE__ AL_InitUnderwaterFilter(); -#endif Com_Printf("Number of OpenAL sources: %d\n\n", s_numchannels); return true; @@ -837,9 +823,8 @@ AL_Shutdown(void) AL_StreamDie(); qalDeleteSources(1, &streamSource); -#if !defined (__APPLE__) qalDeleteFilters(1, &underwaterFilter); -#endif + if (s_numchannels) { /* delete source names */ diff --git a/stuff/osx/frameworks/SDL.zip b/stuff/osx/frameworks/SDL.zip deleted file mode 100644 index fc6764ef..00000000 Binary files a/stuff/osx/frameworks/SDL.zip and /dev/null differ diff --git a/stuff/osx/frameworks/libjpeg.zip b/stuff/osx/frameworks/libjpeg.zip deleted file mode 100644 index 2d2aa3dc..00000000 Binary files a/stuff/osx/frameworks/libjpeg.zip and /dev/null differ diff --git a/stuff/osx/frameworks/ogg.zip b/stuff/osx/frameworks/ogg.zip deleted file mode 100644 index a84819db..00000000 Binary files a/stuff/osx/frameworks/ogg.zip and /dev/null differ diff --git a/stuff/osx/frameworks/vorbis.zip b/stuff/osx/frameworks/vorbis.zip deleted file mode 100644 index 7edda186..00000000 Binary files a/stuff/osx/frameworks/vorbis.zip and /dev/null differ diff --git a/stuff/osx/quake2-appbundle.zip b/stuff/osx/quake2-appbundle.zip deleted file mode 100644 index a75178fd..00000000 Binary files a/stuff/osx/quake2-appbundle.zip and /dev/null differ