diff --git a/Makefile b/Makefile index 9e535559f5..feeb8e14b4 100644 --- a/Makefile +++ b/Makefile @@ -207,10 +207,18 @@ ifndef USE_INTERNAL_LIBS USE_INTERNAL_LIBS=1 endif +ifndef USE_INTERNAL_CURL +USE_INTERNAL_CURL=$(USE_INTERNAL_LIBS) +endif + ifndef USE_INTERNAL_OGG USE_INTERNAL_OGG=$(USE_INTERNAL_LIBS) endif +ifndef USE_INTERNAL_OPENAL +USE_INTERNAL_OPENAL=$(USE_INTERNAL_LIBS) +endif + ifndef USE_INTERNAL_VORBIS USE_INTERNAL_VORBIS=$(USE_INTERNAL_LIBS) endif @@ -219,6 +227,10 @@ ifndef USE_INTERNAL_OPUS USE_INTERNAL_OPUS=$(USE_INTERNAL_LIBS) endif +ifndef USE_INTERNAL_SDL +USE_INTERNAL_SDL=$(USE_INTERNAL_LIBS) +endif + ifndef USE_INTERNAL_ZLIB USE_INTERNAL_ZLIB=$(USE_INTERNAL_LIBS) endif @@ -560,7 +572,7 @@ ifeq ($(PLATFORM),darwin) CLIENT_LIBS += -framework IOKit RENDERER_LIBS += -framework OpenGL - ifeq ($(USE_LOCAL_HEADERS),1) + ifeq ($(USE_INTERNAL_SDL),1) # libSDL2-2.0.0.dylib for PPC is SDL 2.0.1 + changes to compile ifneq ($(findstring $(ARCH),ppc ppc64),) BASE_CFLAGS += -I$(SDLHDIR)/include-macppc @@ -710,7 +722,7 @@ ifdef MINGW ifeq ($(USE_CURL),1) CLIENT_CFLAGS += $(CURL_CFLAGS) ifneq ($(USE_CURL_DLOPEN),1) - ifeq ($(USE_LOCAL_HEADERS),1) + ifeq ($(USE_INTERNAL_CURL),1) CLIENT_CFLAGS += -DCURL_STATICLIB ifeq ($(ARCH),x86_64) CLIENT_LIBS += $(LIBSDIR)/win64/libcurl.a -lcrypt32 @@ -734,7 +746,7 @@ ifdef MINGW CLIENT_LIBS += -lmingw32 RENDERER_LIBS += -lmingw32 - ifeq ($(USE_LOCAL_HEADERS),1) + ifeq ($(USE_INTERNAL_SDL),1) CLIENT_CFLAGS += -I$(SDLHDIR)/include ifeq ($(ARCH),x86) CLIENT_LIBS += $(LIBSDIR)/win32/libSDL2main.a \ @@ -1217,8 +1229,20 @@ ifdef DEFAULT_BASEDIR BASE_CFLAGS += -DDEFAULT_BASEDIR=\\\"$(DEFAULT_BASEDIR)\\\" endif -ifeq ($(USE_LOCAL_HEADERS),1) - BASE_CFLAGS += -DUSE_LOCAL_HEADERS +ifeq ($(USE_INTERNAL_OPENAL),1) + BASE_CFLAGS += -DUSE_INTERNAL_OPENAL +endif + +ifeq ($(USE_INTERNAL_CURL),1) + BASE_CFLAGS += -DUSE_INTERNAL_CURL +endif + +ifeq ($(USE_INTERNAL_SDL),1) + BASE_CFLAGS += -DUSE_INTERNAL_SDL +endif + +ifeq ($(USE_INTERNAL_ZLIB),1) + BASE_CFLAGS += -DUSE_INTERNAL_ZLIB endif ifeq ($(BUILD_STANDALONE),1) diff --git a/code/client/cl_curl.h b/code/client/cl_curl.h index 147afc2122..0f3e2bd4c4 100644 --- a/code/client/cl_curl.h +++ b/code/client/cl_curl.h @@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../qcommon/q_shared.h" #include "../qcommon/qcommon.h" -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_CURL #include "../curl-7.54.0/include/curl/curl.h" #else #include diff --git a/code/client/qal.h b/code/client/qal.h index a478eb5395..6ca08a7307 100644 --- a/code/client/qal.h +++ b/code/client/qal.h @@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define ALC_NO_PROTOTYPES #endif -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_OPENAL #include "../AL/al.h" #include "../AL/alc.h" #else diff --git a/code/qcommon/ioapi.c b/code/qcommon/ioapi.c index aab3c00bfe..e45a5395b5 100644 --- a/code/qcommon/ioapi.c +++ b/code/qcommon/ioapi.c @@ -10,7 +10,7 @@ #include #include -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_ZLIB #include "../zlib/zlib.h" #else #include diff --git a/code/qcommon/unzip.h b/code/qcommon/unzip.h index 74dee975b6..ee8cf8c220 100644 --- a/code/qcommon/unzip.h +++ b/code/qcommon/unzip.h @@ -49,7 +49,7 @@ extern "C" { #endif -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_ZLIB #include "../zlib/zlib.h" #else #include diff --git a/code/renderercommon/qgl.h b/code/renderercommon/qgl.h index 38f9919f43..5577567208 100644 --- a/code/renderercommon/qgl.h +++ b/code/renderercommon/qgl.h @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #ifndef __QGL_H__ #define __QGL_H__ -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_SDL # include "SDL_opengl.h" #else # include diff --git a/code/renderergl2/tr_extensions.c b/code/renderergl2/tr_extensions.c index ebc985a9e4..f2b3134d21 100644 --- a/code/renderergl2/tr_extensions.c +++ b/code/renderergl2/tr_extensions.c @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ // tr_extensions.c - extensions needed by the renderer not in sdl_glimp.c -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_SDL # include "SDL.h" #else # include diff --git a/code/sdl/sdl_gamma.c b/code/sdl/sdl_gamma.c index a1e0cb5ba1..b9c70855bb 100644 --- a/code/sdl/sdl_gamma.c +++ b/code/sdl/sdl_gamma.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_SDL # include "SDL.h" #else # include diff --git a/code/sdl/sdl_glimp.c b/code/sdl/sdl_glimp.c index 30986ab118..2fae3d58af 100644 --- a/code/sdl/sdl_glimp.c +++ b/code/sdl/sdl_glimp.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_SDL # include "SDL.h" #else # include diff --git a/code/sdl/sdl_input.c b/code/sdl/sdl_input.c index 63274c61d2..e118a3a412 100644 --- a/code/sdl/sdl_input.c +++ b/code/sdl/sdl_input.c @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_SDL # include "SDL.h" #else # include diff --git a/code/sdl/sdl_snd.c b/code/sdl/sdl_snd.c index 7696a5151f..19be58f9df 100644 --- a/code/sdl/sdl_snd.c +++ b/code/sdl/sdl_snd.c @@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_SDL # include "SDL.h" #else # include diff --git a/code/sys/sys_loadlib.h b/code/sys/sys_loadlib.h index 0b1eac3e5b..b11c3bf69b 100644 --- a/code/sys/sys_loadlib.h +++ b/code/sys/sys_loadlib.h @@ -35,7 +35,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # define Sys_LibraryError() dlerror() # endif #else -# ifdef USE_LOCAL_HEADERS +# ifdef USE_INTERNAL_SDL # include "SDL.h" # include "SDL_loadso.h" # else diff --git a/code/sys/sys_local.h b/code/sys/sys_local.h index cd7fbe7fa2..5a9ab81a0d 100644 --- a/code/sys/sys_local.h +++ b/code/sys/sys_local.h @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "../qcommon/qcommon.h" #ifndef DEDICATED -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_SDL # include "SDL_version.h" #else # include diff --git a/code/sys/sys_main.c b/code/sys/sys_main.c index ae46c70558..6fbe9e15ce 100644 --- a/code/sys/sys_main.c +++ b/code/sys/sys_main.c @@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #ifndef DEDICATED -#ifdef USE_LOCAL_HEADERS +#ifdef USE_INTERNAL_SDL # include "SDL.h" # include "SDL_cpuinfo.h" #else