mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
New SDK for gcc-3 compilations
This commit is contained in:
parent
29bfd81b36
commit
fa64bef511
@ -273,4 +273,5 @@ void CmdMngr::clearBufforedInfo() {
|
|||||||
buf_cmdaccess = 0;
|
buf_cmdaccess = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CmdMngr::Command::uniqueid = 0;
|
int CmdMngr::Command::uniqueid = 0;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ MM_ROOT = ../metamod/metamod
|
|||||||
|
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
|
||||||
OPT_FLAGS = -O3 -fno-rtti -funroll-loops -s -pipe
|
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
||||||
DEBUG_FLAGS = -g -ggdb3
|
DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP = gcc
|
CPP = gcc
|
||||||
NAME = amxmodx_mm
|
NAME = amxmodx_mm
|
||||||
@ -15,7 +15,7 @@ OBJECTS = meta_api.cpp CFile.cpp CVault.cpp vault.cpp float.cpp file.cpp modules
|
|||||||
CMisc.cpp CTask.cpp string.cpp amxmodx.cpp CEvent.cpp CCmd.cpp CLogEvent.cpp \
|
CMisc.cpp CTask.cpp string.cpp amxmodx.cpp CEvent.cpp CCmd.cpp CLogEvent.cpp \
|
||||||
srvcmd.cpp strptime.cpp amxcore.cpp amxtime.cpp power.cpp amxxlog.cpp fakemeta.cpp \
|
srvcmd.cpp strptime.cpp amxcore.cpp amxtime.cpp power.cpp amxxlog.cpp fakemeta.cpp \
|
||||||
amxxfile.cpp CLang.cpp md5.cpp emsg.cpp CForward.cpp CPlugin.cpp CModule.cpp \
|
amxxfile.cpp CLang.cpp md5.cpp emsg.cpp CForward.cpp CPlugin.cpp CModule.cpp \
|
||||||
CMenu.cpp util.cpp amx.cpp amxdbg.cpp natives.cpp newmenus.cpp mmgr/mmgr.cpp
|
CMenu.cpp util.cpp amx.cpp amxdbg.cpp natives.cpp newmenus.cpp
|
||||||
|
|
||||||
LINK = -lz
|
LINK = -lz
|
||||||
|
|
||||||
@ -31,10 +31,11 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(MMGR)" "true"
|
ifeq "$(MMGR)" "true"
|
||||||
OBJECTS += MMGR/MMGR.CPP
|
OBJECTS += mmgr/mmgr.cpp
|
||||||
|
CFLAGS += -DMEMORY_TEST
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += -DLINUX -DNDEBUG -fPIC -Wno-deprecated -DHAVE_STDINT_H -DMEMORY_TEST
|
CFLAGS += -DLINUX -DNDEBUG -fPIC -Wno-deprecated -DHAVE_STDINT_H -static-libgcc -fno-rtti -fno-exceptions
|
||||||
|
|
||||||
ifeq "$(AMD64)" "true"
|
ifeq "$(AMD64)" "true"
|
||||||
BINARY = $(NAME)_amd64.so
|
BINARY = $(NAME)_amd64.so
|
||||||
|
@ -312,4 +312,5 @@ void Client_ResetHUD(void* mValue)
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1756,3 +1756,24 @@ void *Module_ReqFnptr(const char *funcName)
|
|||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef MEMORY_TEST
|
||||||
|
void * ::operator new(size_t size) {
|
||||||
|
return(calloc(1, size));
|
||||||
|
}
|
||||||
|
|
||||||
|
void * ::operator new[](size_t size) {
|
||||||
|
return(calloc(1, size));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ::operator delete(void * ptr) {
|
||||||
|
if(ptr)
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ::operator delete[](void * ptr) {
|
||||||
|
if(ptr)
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@ -2909,6 +2909,28 @@ void operator delete[](void *reportedAddress)
|
|||||||
Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress);
|
Mem_Deallocator(g_Mem_CurrentFilename, g_Mem_CurrentLine, g_Mem_CurrentFunc, m_alloc_delete_array, reportedAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#if !defined NO_ALLOC_OVERRIDES && !defined MEMORY_TEST
|
||||||
|
void * ::operator new(size_t size) {
|
||||||
|
return(calloc(1, size));
|
||||||
|
}
|
||||||
|
|
||||||
|
void * ::operator new[](size_t size) {
|
||||||
|
return(calloc(1, size));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ::operator delete(void * ptr) {
|
||||||
|
if(ptr)
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ::operator delete[](void * ptr) {
|
||||||
|
if(ptr)
|
||||||
|
free(ptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif //MEMORY_TEST
|
#endif //MEMORY_TEST
|
||||||
|
|
||||||
/************* stuff from dlls/util.cpp *************/
|
/************* stuff from dlls/util.cpp *************/
|
||||||
|
@ -27,6 +27,10 @@
|
|||||||
// be careful of default constructors using new/malloc!
|
// be careful of default constructors using new/malloc!
|
||||||
// #define MEMORY_TEST
|
// #define MEMORY_TEST
|
||||||
|
|
||||||
|
// Unless you use STL or exceptions, keep this commented.
|
||||||
|
// It allows you to compile without libstdc++.so as a dependency
|
||||||
|
// #define NO_ALLOC_OVERRIDES
|
||||||
|
|
||||||
// - AMXX Init functions
|
// - AMXX Init functions
|
||||||
// Also consider using FN_META_*
|
// Also consider using FN_META_*
|
||||||
// AMXX query
|
// AMXX query
|
||||||
@ -465,4 +469,4 @@
|
|||||||
|
|
||||||
#endif // USE_METAMOD
|
#endif // USE_METAMOD
|
||||||
|
|
||||||
#endif // __MODULECONFIG_H__
|
#endif // __MODULECONFIG_H__
|
||||||
|
Loading…
Reference in New Issue
Block a user