mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-13 05:51:19 +00:00
Merge branch 'master' into mobile_hacks
This commit is contained in:
commit
e9da5ef68d
@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <memory.h>
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
#include "studio_util.h"
|
#include "studio_util.h"
|
||||||
#include "r_studioint.h"
|
#include "r_studioint.h"
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <memory.h>
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
#include "studio_util.h"
|
#include "studio_util.h"
|
||||||
#include "r_studioint.h"
|
#include "r_studioint.h"
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <memory.h>
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
#include "studio_util.h"
|
#include "studio_util.h"
|
||||||
#include "r_studioint.h"
|
#include "r_studioint.h"
|
||||||
|
@ -31,7 +31,8 @@
|
|||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
typedef unsigned short word;
|
typedef unsigned short word;
|
||||||
typedef float vec_t;
|
typedef float vec_t;
|
||||||
typedef int ( *pfnUserMsgHook )( const char *pszName, int iSize, void *pbuf );
|
// redefine
|
||||||
|
//typedef int ( *pfnUserMsgHook )( const char *pszName, int iSize, void *pbuf );
|
||||||
|
|
||||||
#include "util_vector.h"
|
#include "util_vector.h"
|
||||||
|
|
||||||
@ -43,7 +44,11 @@ typedef int ( *pfnUserMsgHook )( const char *pszName, int iSize, void *pbuf );
|
|||||||
#endif
|
#endif
|
||||||
#include "exportdef.h"
|
#include "exportdef.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#if HAVE_CMATH
|
||||||
|
#include <cmath>
|
||||||
|
#else
|
||||||
|
#include <math.h>
|
||||||
|
#endif
|
||||||
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
|
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
|
||||||
#define XASH_64BIT
|
#define XASH_64BIT
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include "cl_util.h"
|
#include "cl_util.h"
|
||||||
#include "demo.h"
|
#include "demo.h"
|
||||||
#include "demo_api.h"
|
#include "demo_api.h"
|
||||||
#include <memory.h>
|
|
||||||
|
|
||||||
int g_demosniper = 0;
|
int g_demosniper = 0;
|
||||||
int g_demosniperdamage = 0;
|
int g_demosniperdamage = 0;
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
|
|
||||||
// Client side entity management functions
|
// Client side entity management functions
|
||||||
|
|
||||||
#include <memory.h>
|
|
||||||
|
|
||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
#include "cl_util.h"
|
#include "cl_util.h"
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
|
@ -347,3 +347,4 @@ int CBasePlayerWeapon::ExtractClipAmmo( CBasePlayerWeapon *pWeapon ) { return 0;
|
|||||||
void CBasePlayerWeapon::RetireWeapon( void ) { }
|
void CBasePlayerWeapon::RetireWeapon( void ) { }
|
||||||
void CSoundEnt::InsertSound( int iType, const Vector &vecOrigin, int iVolume, float flDuration ) {}
|
void CSoundEnt::InsertSound( int iType, const Vector &vecOrigin, int iVolume, float flDuration ) {}
|
||||||
void RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, float flRadius, int iClassIgnore, int bitsDamageType ){}
|
void RadiusDamage( Vector vecSrc, entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, float flRadius, int iClassIgnore, int bitsDamageType ){}
|
||||||
|
void CSprite::AnimateUntilDead( void ) {}
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
#define HUD_IFACEH
|
#define HUD_IFACEH
|
||||||
|
|
||||||
#include "exportdef.h"
|
#include "exportdef.h"
|
||||||
|
// redefine
|
||||||
typedef int (*pfnUserMsgHook)( const char *pszName, int iSize, void *pbuf );
|
// typedef int (*pfnUserMsgHook)( const char *pszName, int iSize, void *pbuf );
|
||||||
#include "wrect.h"
|
#include "wrect.h"
|
||||||
#include "../engine/cdll_int.h"
|
#include "../engine/cdll_int.h"
|
||||||
extern cl_enginefunc_t gEngfuncs;
|
extern cl_enginefunc_t gEngfuncs;
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
#include "cl_util.h"
|
#include "cl_util.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <memory.h>
|
|
||||||
|
|
||||||
int CL_ButtonBits( int );
|
int CL_ButtonBits( int );
|
||||||
void CL_ResetButtonBits( int bits );
|
void CL_ResetButtonBits( int bits );
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
// $NoKeywords: $
|
// $NoKeywords: $
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
#include <memory.h>
|
|
||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
#include "cl_util.h"
|
#include "cl_util.h"
|
||||||
#include "const.h"
|
#include "const.h"
|
||||||
|
@ -33,10 +33,10 @@
|
|||||||
#ifndef M_PI_F
|
#ifndef M_PI_F
|
||||||
#define M_PI_F (float)M_PI
|
#define M_PI_F (float)M_PI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern vec3_t vec3_origin;
|
extern vec3_t vec3_origin;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
// if C++ mangling differs from C symbol name
|
||||||
|
#if defined _MSC_VER || defined __WATCOMC__
|
||||||
vec3_t vec3_origin;
|
vec3_t vec3_origin;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,8 +22,11 @@
|
|||||||
// Misc C-runtime library headers
|
// Misc C-runtime library headers
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#if HAVE_CMATH
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#else
|
||||||
|
#include <math.h>
|
||||||
|
#endif
|
||||||
// Header file containing definition of globalvars_t and entvars_t
|
// Header file containing definition of globalvars_t and entvars_t
|
||||||
typedef unsigned int func_t; //
|
typedef unsigned int func_t; //
|
||||||
typedef int string_t; // from engine's pr_comp.h;
|
typedef int string_t; // from engine's pr_comp.h;
|
||||||
|
@ -53,7 +53,7 @@ def build(bld):
|
|||||||
if bld.env.DEST_OS == 'win32':
|
if bld.env.DEST_OS == 'win32':
|
||||||
libs += ["USER32"]
|
libs += ["USER32"]
|
||||||
|
|
||||||
if bld.env.DEST_OS not in ['android']:
|
if bld.env.DEST_OS not in ['android', 'dos']:
|
||||||
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR)
|
install_path = os.path.join(bld.env.GAMEDIR, bld.env.CLIENT_DIR)
|
||||||
else:
|
else:
|
||||||
install_path = bld.env.PREFIX
|
install_path = bld.env.PREFIX
|
||||||
@ -61,6 +61,7 @@ def build(bld):
|
|||||||
bld.shlib(
|
bld.shlib(
|
||||||
source = source,
|
source = source,
|
||||||
target = 'client' + bld.env.POSTFIX,
|
target = 'client' + bld.env.POSTFIX,
|
||||||
|
name = 'client',
|
||||||
features = 'c cxx',
|
features = 'c cxx',
|
||||||
includes = includes,
|
includes = includes,
|
||||||
defines = defines,
|
defines = defines,
|
||||||
|
@ -22,7 +22,11 @@
|
|||||||
#include <tgmath.h>
|
#include <tgmath.h>
|
||||||
#endif // HAVE_TGMATH_H
|
#endif // HAVE_TGMATH_H
|
||||||
#else // __cplusplus
|
#else // __cplusplus
|
||||||
|
#if HAVE_CMATH
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#else
|
||||||
|
#include <math.h>
|
||||||
|
#endif
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
typedef float vec_t;
|
typedef float vec_t;
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
*
|
*
|
||||||
****/
|
****/
|
||||||
|
|
||||||
|
/* all this mess was here to use quake mathlib instead of hlsdk vectors
|
||||||
|
* it may break debug info or even build because global symbols types differ
|
||||||
|
* it's better to define VectorCopy macro for Vector class */
|
||||||
|
#if 0
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -50,7 +54,17 @@ typedef unsigned char byte;
|
|||||||
#include "enginecallback.h"
|
#include "enginecallback.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern globalvars_t *gpGlobals;
|
//extern globalvars_t *gpGlobals;
|
||||||
|
#else
|
||||||
|
#include "extdll.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "activity.h"
|
||||||
|
#include "activitymap.h"
|
||||||
|
#include "animation.h"
|
||||||
|
#include "scriptevent.h"
|
||||||
|
#include "studio.h"
|
||||||
|
#define VectorCopy(a,b) {(b)[0]=(a)[0];(b)[1]=(a)[1];(b)[2]=(a)[2];}
|
||||||
|
#endif
|
||||||
|
|
||||||
#pragma warning( disable : 4244 )
|
#pragma warning( disable : 4244 )
|
||||||
|
|
||||||
|
@ -536,6 +536,9 @@ void CBullsquid::HandleAnimEvent( MonsterEvent_t *pEvent )
|
|||||||
{
|
{
|
||||||
case BSQUID_AE_SPIT:
|
case BSQUID_AE_SPIT:
|
||||||
{
|
{
|
||||||
|
if( m_hEnemy == 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
Vector vecSpitOffset;
|
Vector vecSpitOffset;
|
||||||
Vector vecSpitDir;
|
Vector vecSpitDir;
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#define NOMCX
|
#define NOMCX
|
||||||
#define NOIME
|
#define NOIME
|
||||||
#define HSPRITE HSPRITE_win32
|
#define HSPRITE HSPRITE_win32
|
||||||
#include "windows.h"
|
#include <windows.h>
|
||||||
#undef HSPRITE
|
#undef HSPRITE
|
||||||
#else // _WIN32
|
#else // _WIN32
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
@ -66,7 +66,11 @@ typedef int BOOL;
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#if HAVE_CMATH
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#else
|
||||||
|
#include <math.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI_F
|
#ifndef M_PI_F
|
||||||
#define M_PI_F (float)M_PI
|
#define M_PI_F (float)M_PI
|
||||||
|
@ -42,10 +42,13 @@ CGraph WorldGraph;
|
|||||||
LINK_ENTITY_TO_CLASS( info_node, CNodeEnt )
|
LINK_ENTITY_TO_CLASS( info_node, CNodeEnt )
|
||||||
LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt )
|
LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt )
|
||||||
|
|
||||||
#if !defined _WIN32
|
#ifdef __DOS__
|
||||||
|
#include <direct.h>
|
||||||
|
#define CreateDirectoryA(p, n) mkdir(p)
|
||||||
|
#elif !defined _WIN32
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#define CreateDirectoryA(p, n) mkdir(p, 0777)
|
#define CreateDirectoryA(p, n) mkdir(p,777)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
@ -1729,7 +1729,7 @@ void CSaveRestoreBuffer::BufferRewind( int size )
|
|||||||
m_pdata->size -= size;
|
m_pdata->size -= size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#if !defined _WIN32 && !defined __WATCOMC__
|
||||||
extern "C" {
|
extern "C" {
|
||||||
unsigned _rotr( unsigned val, int shift )
|
unsigned _rotr( unsigned val, int shift )
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ def build(bld):
|
|||||||
|
|
||||||
libs = []
|
libs = []
|
||||||
|
|
||||||
if bld.env.DEST_OS not in ['android']:
|
if bld.env.DEST_OS not in ['android', 'dos']:
|
||||||
install_path = os.path.join(bld.env.GAMEDIR, bld.env.SERVER_DIR)
|
install_path = os.path.join(bld.env.GAMEDIR, bld.env.SERVER_DIR)
|
||||||
else:
|
else:
|
||||||
install_path = bld.env.PREFIX
|
install_path = bld.env.PREFIX
|
||||||
@ -69,6 +69,7 @@ def build(bld):
|
|||||||
bld.shlib(
|
bld.shlib(
|
||||||
source = source,
|
source = source,
|
||||||
target = bld.env.SERVER_NAME + bld.env.POSTFIX,
|
target = bld.env.SERVER_NAME + bld.env.POSTFIX,
|
||||||
|
name = 'server',
|
||||||
features = 'c cxx',
|
features = 'c cxx',
|
||||||
includes = includes,
|
includes = includes,
|
||||||
defines = defines,
|
defines = defines,
|
||||||
|
@ -52,7 +52,7 @@ For more information, please refer to <http://unlicense.org/>
|
|||||||
#undef XASH_ARMv5
|
#undef XASH_ARMv5
|
||||||
#undef XASH_ARMv6
|
#undef XASH_ARMv6
|
||||||
#undef XASH_ARMv7
|
#undef XASH_ARMv7
|
||||||
#undef XASH_BIG_ENDIAN
|
//#undef XASH_BIG_ENDIAN
|
||||||
#undef XASH_BSD
|
#undef XASH_BSD
|
||||||
#undef XASH_E2K
|
#undef XASH_E2K
|
||||||
#undef XASH_EMSCRIPTEN
|
#undef XASH_EMSCRIPTEN
|
||||||
@ -60,7 +60,7 @@ For more information, please refer to <http://unlicense.org/>
|
|||||||
#undef XASH_IOS
|
#undef XASH_IOS
|
||||||
#undef XASH_JS
|
#undef XASH_JS
|
||||||
#undef XASH_LINUX
|
#undef XASH_LINUX
|
||||||
#undef XASH_LITTLE_ENDIAN
|
//#undef XASH_LITTLE_ENDIAN
|
||||||
#undef XASH_MINGW
|
#undef XASH_MINGW
|
||||||
#undef XASH_MIPS
|
#undef XASH_MIPS
|
||||||
#undef XASH_MOBILE_PLATFORM
|
#undef XASH_MOBILE_PLATFORM
|
||||||
@ -92,12 +92,14 @@ For more information, please refer to <http://unlicense.org/>
|
|||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
#define XASH_ANDROID 1
|
#define XASH_ANDROID 1
|
||||||
#endif // defined(__ANDROID__)
|
#endif // defined(__ANDROID__)
|
||||||
|
#define XASH_POSIX 1
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
#include <TargetConditionals.h>
|
#include <TargetConditionals.h>
|
||||||
#define XASH_APPLE 1
|
#define XASH_APPLE 1
|
||||||
#if TARGET_OS_IOS
|
#if TARGET_OS_IOS
|
||||||
#define XASH_IOS 1
|
#define XASH_IOS 1
|
||||||
#endif // TARGET_OS_IOS
|
#endif // TARGET_OS_IOS
|
||||||
|
#define XASH_POSIX 1
|
||||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
#define XASH_BSD 1
|
#define XASH_BSD 1
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
@ -107,8 +109,12 @@ For more information, please refer to <http://unlicense.org/>
|
|||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
#define XASH_OPENBSD 1
|
#define XASH_OPENBSD 1
|
||||||
#endif
|
#endif
|
||||||
|
#define XASH_POSIX 1
|
||||||
#elif defined __EMSCRIPTEN__
|
#elif defined __EMSCRIPTEN__
|
||||||
#define XASH_EMSCRIPTEN 1
|
#define XASH_EMSCRIPTEN 1
|
||||||
|
#elif defined __WATCOMC__ && defined __DOS__
|
||||||
|
#define XASH_DOS4GW 1
|
||||||
|
#define XASH_LITTLE_ENDIAN
|
||||||
#else
|
#else
|
||||||
#error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug"
|
#error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug"
|
||||||
#endif
|
#endif
|
||||||
@ -127,7 +133,7 @@ For more information, please refer to <http://unlicense.org/>
|
|||||||
#error "Both XASH_LITTLE_ENDIAN and XASH_BIG_ENDIAN are defined"
|
#error "Both XASH_LITTLE_ENDIAN and XASH_BIG_ENDIAN are defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(XASH_LITTLE_ENDIAN) || !defined(XASH_BIG_ENDIAN)
|
#if !defined(XASH_LITTLE_ENDIAN) && !defined(XASH_BIG_ENDIAN)
|
||||||
#if defined XASH_MSVC || __LITTLE_ENDIAN__
|
#if defined XASH_MSVC || __LITTLE_ENDIAN__
|
||||||
//!!! Probably all WinNT installations runs in little endian
|
//!!! Probably all WinNT installations runs in little endian
|
||||||
#define XASH_LITTLE_ENDIAN 1
|
#define XASH_LITTLE_ENDIAN 1
|
||||||
|
@ -49,7 +49,9 @@ DEFINES = [
|
|||||||
'XASH_OPENBSD',
|
'XASH_OPENBSD',
|
||||||
'XASH_WIN32',
|
'XASH_WIN32',
|
||||||
'XASH_WIN64',
|
'XASH_WIN64',
|
||||||
'XASH_X86'
|
'XASH_X86',
|
||||||
|
'XASH_DOS4GW',
|
||||||
|
'XASH_POSIX'
|
||||||
]
|
]
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
@ -75,8 +77,11 @@ def configure(conf):
|
|||||||
buildos = "openbsd"
|
buildos = "openbsd"
|
||||||
elif conf.env.XASH_EMSCRIPTEN:
|
elif conf.env.XASH_EMSCRIPTEN:
|
||||||
buildos = "emscripten"
|
buildos = "emscripten"
|
||||||
|
elif conf.env.XASH_DOS4GW:
|
||||||
|
buildos = "dos4gw" # unused, just in case
|
||||||
else:
|
else:
|
||||||
conf.fatal("Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug")
|
conf.fatal("Place your operating system name in build.h and library_naming.py!\n"
|
||||||
|
"If this is a mistake, try to fix conditions above and report a bug")
|
||||||
|
|
||||||
if conf.env.XASH_AMD64:
|
if conf.env.XASH_AMD64:
|
||||||
buildarch = "amd64"
|
buildarch = "amd64"
|
||||||
@ -110,7 +115,8 @@ def configure(conf):
|
|||||||
elif conf.env.XASH_E2K:
|
elif conf.env.XASH_E2K:
|
||||||
buildarch = "e2k"
|
buildarch = "e2k"
|
||||||
else:
|
else:
|
||||||
raise conf.fatal("Place your architecture name here! If this is a mistake, try to fix conditions above and report a bug")
|
raise conf.fatal("Place your architecture name in build.h and library_naming.py!\n"
|
||||||
|
"If this is a mistake, try to fix conditions above and report a bug")
|
||||||
|
|
||||||
conf.env.revert()
|
conf.env.revert()
|
||||||
|
|
||||||
|
12
wscript
12
wscript
@ -73,7 +73,7 @@ def configure(conf):
|
|||||||
conf.fatal('Please set a build type, for example "-T release"')
|
conf.fatal('Please set a build type, for example "-T release"')
|
||||||
elif not conf.options.BUILD_TYPE in valid_build_types:
|
elif not conf.options.BUILD_TYPE in valid_build_types:
|
||||||
conf.end_msg(conf.options.BUILD_TYPE, color='RED')
|
conf.end_msg(conf.options.BUILD_TYPE, color='RED')
|
||||||
conf.fatal('Invalid build type. Valid are: %s' % valid_build_types.join(', '))
|
conf.fatal('Invalid build type. Valid are: %s' % ', '.join(valid_build_types))
|
||||||
conf.end_msg(conf.options.BUILD_TYPE)
|
conf.end_msg(conf.options.BUILD_TYPE)
|
||||||
|
|
||||||
# -march=native should not be used
|
# -march=native should not be used
|
||||||
@ -183,8 +183,6 @@ def configure(conf):
|
|||||||
|
|
||||||
compiler_optional_flags = [
|
compiler_optional_flags = [
|
||||||
'-fdiagnostics-color=always',
|
'-fdiagnostics-color=always',
|
||||||
'-Werror=implicit-function-declaration',
|
|
||||||
'-Werror=int-conversion',
|
|
||||||
'-Werror=return-type',
|
'-Werror=return-type',
|
||||||
'-Werror=parentheses',
|
'-Werror=parentheses',
|
||||||
'-Werror=vla',
|
'-Werror=vla',
|
||||||
@ -196,6 +194,8 @@ def configure(conf):
|
|||||||
]
|
]
|
||||||
|
|
||||||
c_compiler_optional_flags = [
|
c_compiler_optional_flags = [
|
||||||
|
'-Werror=implicit-function-declaration',
|
||||||
|
'-Werror=int-conversion',
|
||||||
'-Werror=implicit-int',
|
'-Werror=implicit-int',
|
||||||
'-Werror=declaration-after-statement'
|
'-Werror=declaration-after-statement'
|
||||||
]
|
]
|
||||||
@ -249,10 +249,16 @@ def configure(conf):
|
|||||||
conf.define_cond('HAVE_TGMATH_H', tgmath_usable)
|
conf.define_cond('HAVE_TGMATH_H', tgmath_usable)
|
||||||
else:
|
else:
|
||||||
conf.undefine('HAVE_TGMATH_H')
|
conf.undefine('HAVE_TGMATH_H')
|
||||||
|
cmath_usable = conf.check_cxx(fragment='''#include<cmath>
|
||||||
|
int main(void){ return (int)sqrt(2.0f); }''',
|
||||||
|
msg='Checking if cmath is usable', mandatory = False)
|
||||||
|
conf.define_cond('HAVE_CMATH', cmath_usable)
|
||||||
|
|
||||||
if conf.env.COMPILER_CC == 'msvc':
|
if conf.env.COMPILER_CC == 'msvc':
|
||||||
conf.define('_CRT_SECURE_NO_WARNINGS', 1)
|
conf.define('_CRT_SECURE_NO_WARNINGS', 1)
|
||||||
conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1)
|
conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1)
|
||||||
|
elif conf.env.COMPILER_CC == 'owcc':
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
conf.env.append_unique('DEFINES', ['stricmp=strcasecmp', 'strnicmp=strncasecmp', '_snprintf=snprintf', '_vsnprintf=vsnprintf', '_LINUX', 'LINUX'])
|
conf.env.append_unique('DEFINES', ['stricmp=strcasecmp', 'strnicmp=strncasecmp', '_snprintf=snprintf', '_vsnprintf=vsnprintf', '_LINUX', 'LINUX'])
|
||||||
conf.env.append_unique('CXXFLAGS', ['-Wno-invalid-offsetof', '-fno-rtti', '-fno-exceptions'])
|
conf.env.append_unique('CXXFLAGS', ['-Wno-invalid-offsetof', '-fno-rtti', '-fno-exceptions'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user