mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-21 14:54:14 +01:00
Updated sample plugin makefiles
Fixed sample_mm compilation Removed troublesome oslink.h from sample_mm --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40280
This commit is contained in:
parent
d467cb6930
commit
97bc4e0cea
@ -4,12 +4,13 @@
|
|||||||
HL2SDK = ../../hl2sdk
|
HL2SDK = ../../hl2sdk
|
||||||
SMM_ROOT = ../..
|
SMM_ROOT = ../..
|
||||||
SRCDS = ~/srcds
|
SRCDS = ~/srcds
|
||||||
|
EXTRA_FLAGS =
|
||||||
|
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
|
||||||
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
||||||
DEBUG_FLAGS = -g -ggdb3
|
DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP = gcc-3.4
|
CPP = gcc-4.1
|
||||||
BINARY = sample_mm_i486.so
|
BINARY = sample_mm_i486.so
|
||||||
|
|
||||||
OBJECTS = SamplePlugin.cpp cvars.cpp convar.cpp
|
OBJECTS = SamplePlugin.cpp cvars.cpp convar.cpp
|
||||||
@ -29,7 +30,7 @@ else
|
|||||||
CFLAGS = $(OPT_FLAGS)
|
CFLAGS = $(OPT_FLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Wno-non-virtual-dtor -Werror -fPIC -fno-exceptions -fno-rtti -msse
|
CFLAGS += -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Wno-non-virtual-dtor -Werror -fPIC -fno-exceptions -fno-rtti -msse $(EXTRA_FLAGS)
|
||||||
|
|
||||||
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||||
|
|
||||||
|
@ -141,8 +141,6 @@ bool SamplePlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen,
|
|||||||
{
|
{
|
||||||
PLUGIN_SAVEVARS();
|
PLUGIN_SAVEVARS();
|
||||||
|
|
||||||
int num = 0;
|
|
||||||
|
|
||||||
GET_V_IFACE(serverFactory, m_ServerDll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
GET_V_IFACE(serverFactory, m_ServerDll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
||||||
GET_V_IFACE(engineFactory, m_Engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
GET_V_IFACE(engineFactory, m_Engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
||||||
GET_V_IFACE(serverFactory, m_ServerClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
|
GET_V_IFACE(serverFactory, m_ServerClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
/* ======== SourceMM ========
|
|
||||||
* Copyright (C) 2004-2006 Metamod:Source Development Team
|
|
||||||
* No warranties of any kind
|
|
||||||
*
|
|
||||||
* License: zlib/libpng
|
|
||||||
*
|
|
||||||
* Author(s): David "BAILOPAN" Anderson
|
|
||||||
* ============================
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _INCLUDE_OSLINK_H
|
|
||||||
#define _INCLUDE_OSLINK_H
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Defines OS-independent information
|
|
||||||
* @file oslink.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined __WIN32__ || defined _WIN32 || defined WIN32
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#define OS_WIN32
|
|
||||||
#if defined _MSC_VER && _MSC_VER >= 1400
|
|
||||||
#undef ARRAYSIZE
|
|
||||||
#else
|
|
||||||
#define mkdir(a) _mkdir(a)
|
|
||||||
#endif
|
|
||||||
#include <windows.h>
|
|
||||||
#include <io.h>
|
|
||||||
#include <direct.h>
|
|
||||||
#define dlmount(x) LoadLibrary(x)
|
|
||||||
#define dlsym(x, s) GetProcAddress(x, s)
|
|
||||||
#define dlclose(x) FreeLibrary(x)
|
|
||||||
const char* dlerror();
|
|
||||||
#elif defined __linux__
|
|
||||||
#define OS_LINUX
|
|
||||||
#include <dlfcn.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
#define dlmount(x) dlopen(x,RTLD_NOW)
|
|
||||||
typedef void* HINSTANCE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined __linux__
|
|
||||||
extern int errno;
|
|
||||||
int GetLastError();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined __WIN32__ || defined _WIN32 || defined WIN32
|
|
||||||
#define SMM_API extern "C" __declspec(dllexport)
|
|
||||||
#elif defined __GNUC__
|
|
||||||
#define SMM_API extern "C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined __WIN32__ || defined _WIN32 || defined WIN32
|
|
||||||
typedef __int64 int64_t;
|
|
||||||
typedef unsigned __int64 uint64_t;
|
|
||||||
#elif defined __GNUC__
|
|
||||||
#if !__GLIBC_HAVE_LONG_LONG
|
|
||||||
typedef long long int64_t;
|
|
||||||
typedef unsigned long long uint64_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __linux__
|
|
||||||
#define snprintf _snprintf
|
|
||||||
#define vsnprintf _vsnprintf
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif //_INCLUDE_OSLINK_H
|
|
@ -4,12 +4,13 @@
|
|||||||
HL2SDK = ../../hl2sdk
|
HL2SDK = ../../hl2sdk
|
||||||
SMM_ROOT = ../..
|
SMM_ROOT = ../..
|
||||||
SRCDS = ~/srcds
|
SRCDS = ~/srcds
|
||||||
|
EXTRA_FLAGS =
|
||||||
|
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
|
||||||
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
OPT_FLAGS = -O3 -funroll-loops -s -pipe
|
||||||
DEBUG_FLAGS = -g -ggdb3
|
DEBUG_FLAGS = -g -ggdb3
|
||||||
CPP = gcc-3.4
|
CPP = gcc-4.1
|
||||||
BINARY = stub_mm_i486.so
|
BINARY = stub_mm_i486.so
|
||||||
|
|
||||||
OBJECTS = stub_mm.cpp
|
OBJECTS = stub_mm.cpp
|
||||||
@ -29,7 +30,7 @@ else
|
|||||||
CFLAGS = $(OPT_FLAGS)
|
CFLAGS = $(OPT_FLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Wno-non-virtual-dtor -Werror -fPIC -fno-exceptions -fno-rtti -msse
|
CFLAGS += -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Wno-non-virtual-dtor -Werror -fPIC -fno-exceptions -fno-rtti -msse $(EXTRA_FLAGS)
|
||||||
|
|
||||||
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user