* Move the conditional compilation of bg_lib.c from the Makefile to cpp in

order to force dependency generation on bg_lib.*
* Make testing USE_ defines more consistent
This commit is contained in:
Tim Angus 2007-09-22 20:32:11 +00:00
parent 60260f1c60
commit 7562caa310
13 changed files with 55 additions and 69 deletions

View file

@ -20,11 +20,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
#if USE_CURL
#ifdef USE_CURL
#include "client.h"
cvar_t *cl_cURLLib;
#if USE_CURL_DLOPEN
#ifdef USE_CURL_DLOPEN
#include "../sys/sys_loadlib.h"
char* (*qcurl_version)(void);
@ -88,7 +88,7 @@ CL_cURL_Init
*/
qboolean CL_cURL_Init()
{
#if USE_CURL_DLOPEN
#ifdef USE_CURL_DLOPEN
if(cURLLib)
return qtrue;
@ -156,7 +156,7 @@ CL_cURL_Shutdown
void CL_cURL_Shutdown( void )
{
CL_cURL_Cleanup();
#if USE_CURL_DLOPEN
#ifdef USE_CURL_DLOPEN
if(cURLLib)
{
Sys_UnloadLibrary(cURLLib);

View file

@ -37,14 +37,14 @@ extern cvar_t *cl_cURLLib;
#define DEFAULT_CURL_LIB "libcurl.so.3"
#endif
#if USE_LOCAL_HEADERS
#ifdef USE_LOCAL_HEADERS
#include "../libcurl/curl/curl.h"
#else
#include <curl/curl.h>
#endif
#if USE_CURL_DLOPEN
#ifdef USE_CURL_DLOPEN
extern char* (*qcurl_version)(void);
extern CURL* (*qcurl_easy_init)(void);

View file

@ -689,7 +689,7 @@ CL_ShutdownAll
*/
void CL_ShutdownAll(void) {
#if USE_CURL
#ifdef USE_CURL
CL_cURL_Shutdown();
#endif
// clear sounds
@ -1451,7 +1451,7 @@ Called when all downloading has been completed
*/
void CL_DownloadsComplete( void ) {
#if USE_CURL
#ifdef USE_CURL
// if we downloaded with cURL
if(clc.cURLUsed) {
clc.cURLUsed = qfalse;
@ -1579,7 +1579,7 @@ void CL_NextDownload(void) {
*s++ = 0;
else
s = localName + strlen(localName); // point at the nul byte
#if USE_CURL
#ifdef USE_CURL
if(!(cl_allowDownload->integer & DLF_NO_REDIRECT)) {
if(clc.sv_allowDownload & DLF_NO_REDIRECT) {
Com_Printf("WARNING: server does not "
@ -2205,7 +2205,7 @@ void CL_Frame ( int msec ) {
return;
}
#if USE_CURL
#ifdef USE_CURL
if(clc.downloadCURLM) {
CL_cURL_PerformDownload();
// we can't process frames normally when in disconnected
@ -2698,7 +2698,7 @@ void CL_Init( void ) {
cl_showMouseRate = Cvar_Get ("cl_showmouserate", "0", 0);
cl_allowDownload = Cvar_Get ("cl_allowDownload", "0", CVAR_ARCHIVE);
#if USE_CURL
#ifdef USE_CURL
cl_cURLLib = Cvar_Get("cl_cURLLib", DEFAULT_CURL_LIB, CVAR_ARCHIVE);
#endif

View file

@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../cgame/cg_public.h"
#include "../game/bg_public.h"
#if USE_CURL
#ifdef USE_CURL
#include "cl_curl.h"
#endif /* USE_CURL */

View file

@ -23,11 +23,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// Dynamically loads OpenAL
#if USE_OPENAL
#ifdef USE_OPENAL
#include "qal.h"
#if USE_OPENAL_DLOPEN
#ifdef USE_OPENAL_DLOPEN
#include "../sys/sys_loadlib.h"

View file

@ -28,12 +28,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../qcommon/q_shared.h"
#include "../qcommon/qcommon.h"
#if USE_OPENAL_DLOPEN
#ifdef USE_OPENAL_DLOPEN
#define AL_NO_PROTOTYPES
#define ALC_NO_PROTOTYPES
#endif
#if USE_LOCAL_HEADERS
#ifdef USE_LOCAL_HEADERS
#include "../AL/al.h"
#include "../AL/alc.h"
#else
@ -47,7 +47,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#endif
#if USE_OPENAL_DLOPEN
#ifdef USE_OPENAL_DLOPEN
extern LPALENABLE qalEnable;
extern LPALDISABLE qalDisable;
extern LPALISENABLED qalIsEnabled;

View file

@ -102,7 +102,7 @@ void S_CodecInit()
{
codecs = NULL;
S_CodecRegister(&wav_codec);
#if USE_CODEC_VORBIS
#ifdef USE_CODEC_VORBIS
S_CodecRegister(&ogg_codec);
#endif
}

View file

@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// OGG support is enabled by this define
#if USE_CODEC_VORBIS
#ifdef USE_CODEC_VORBIS
// includes for the Q3 sound system
#include "client.h"

View file

@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "snd_codec.h"
#include "client.h"
#if USE_OPENAL
#ifdef USE_OPENAL
#include "qal.h"
@ -1864,7 +1864,7 @@ S_AL_Init
*/
qboolean S_AL_Init( soundInterface_t *si )
{
#if USE_OPENAL
#ifdef USE_OPENAL
qboolean enumsupport, founddev = qfalse;