Updated sample plugin makefiles
authorScott Ehlert <ds@alliedmods.net>
Mon Aug 14 19:39:47 2006 +0000 (2006-08-14)
changeset 249eaf9071cedc8
parent 248 39c46de9d3b8
child 250 2eac473ac291
Updated sample plugin makefiles
Fixed sample_mm compilation
Removed troublesome oslink.h from sample_mm
sourcemm/sample_mm/Makefile
sourcemm/sample_mm/SamplePlugin.cpp
sourcemm/sample_mm/oslink.h
sourcemm/stub_mm/Makefile
     1.1 --- a/sourcemm/sample_mm/Makefile	Mon Aug 14 15:39:40 2006 +0000
     1.2 +++ b/sourcemm/sample_mm/Makefile	Mon Aug 14 19:39:47 2006 +0000
     1.3 @@ -4,12 +4,13 @@
     1.4  HL2SDK = ../../hl2sdk
     1.5  SMM_ROOT = ../..
     1.6  SRCDS = ~/srcds
     1.7 +EXTRA_FLAGS = 
     1.8  
     1.9  ### EDIT BELOW FOR OTHER PROJECTS ###
    1.10  
    1.11  OPT_FLAGS = -O3 -funroll-loops -s -pipe
    1.12  DEBUG_FLAGS = -g -ggdb3
    1.13 -CPP = gcc-3.4
    1.14 +CPP = gcc-4.1
    1.15  BINARY = sample_mm_i486.so
    1.16  
    1.17  OBJECTS = SamplePlugin.cpp cvars.cpp convar.cpp
    1.18 @@ -29,7 +30,7 @@
    1.19  	CFLAGS = $(OPT_FLAGS)
    1.20  endif
    1.21  
    1.22 -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
    1.23 +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)
    1.24  
    1.25  OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
    1.26  
     2.1 --- a/sourcemm/sample_mm/SamplePlugin.cpp	Mon Aug 14 15:39:40 2006 +0000
     2.2 +++ b/sourcemm/sample_mm/SamplePlugin.cpp	Mon Aug 14 19:39:47 2006 +0000
     2.3 @@ -141,8 +141,6 @@
     2.4  {
     2.5  	PLUGIN_SAVEVARS();
     2.6  
     2.7 -	int num = 0;
     2.8 -
     2.9  	GET_V_IFACE(serverFactory, m_ServerDll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
    2.10  	GET_V_IFACE(engineFactory, m_Engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
    2.11  	GET_V_IFACE(serverFactory, m_ServerClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
     3.1 --- a/sourcemm/sample_mm/oslink.h	Mon Aug 14 15:39:40 2006 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,70 +0,0 @@
     3.4 -/* ======== SourceMM ========
     3.5 -* Copyright (C) 2004-2006 Metamod:Source Development Team
     3.6 -* No warranties of any kind
     3.7 -*
     3.8 -* License: zlib/libpng
     3.9 -*
    3.10 -* Author(s): David "BAILOPAN" Anderson
    3.11 -* ============================
    3.12 -*/
    3.13 -
    3.14 -#ifndef _INCLUDE_OSLINK_H
    3.15 -#define _INCLUDE_OSLINK_H
    3.16 -
    3.17 -/**
    3.18 - * @brief Defines OS-independent information
    3.19 - * @file oslink.h
    3.20 - */
    3.21 -
    3.22 -#if defined __WIN32__ || defined _WIN32 || defined WIN32
    3.23 -	#define WIN32_LEAN_AND_MEAN
    3.24 -	#define OS_WIN32
    3.25 -	#if defined _MSC_VER && _MSC_VER >= 1400
    3.26 -		#undef ARRAYSIZE
    3.27 -	#else
    3.28 -		#define mkdir(a) _mkdir(a)
    3.29 -	#endif
    3.30 -	#include <windows.h>
    3.31 -	#include <io.h>
    3.32 -	#include <direct.h>
    3.33 -	#define		dlmount(x)		LoadLibrary(x)
    3.34 -	#define		dlsym(x, s)		GetProcAddress(x, s)
    3.35 -	#define		dlclose(x)		FreeLibrary(x)
    3.36 -	const char*	dlerror();
    3.37 -#elif defined __linux__
    3.38 -	#define OS_LINUX
    3.39 -	#include <dlfcn.h>
    3.40 -	#include <unistd.h>
    3.41 -	#include <sys/types.h>
    3.42 -	#include <dirent.h>
    3.43 -	#define		dlmount(x)		dlopen(x,RTLD_NOW)
    3.44 -	typedef		void*			HINSTANCE;
    3.45 -#endif
    3.46 -
    3.47 -#if defined __linux__
    3.48 -	extern int errno;
    3.49 -	int GetLastError();
    3.50 -#endif
    3.51 -
    3.52 -#if defined __WIN32__ || defined _WIN32 || defined WIN32
    3.53 -	#define SMM_API extern "C" __declspec(dllexport)
    3.54 -#elif defined __GNUC__
    3.55 -	#define SMM_API	extern "C"
    3.56 -#endif
    3.57 -
    3.58 -#if defined __WIN32__ || defined _WIN32 || defined WIN32
    3.59 -	typedef __int64				int64_t;
    3.60 -	typedef unsigned __int64	uint64_t;
    3.61 -#elif defined __GNUC__
    3.62 -#if !__GLIBC_HAVE_LONG_LONG
    3.63 -	typedef long long			int64_t;
    3.64 -	typedef unsigned long long	uint64_t;
    3.65 -#endif
    3.66 -#endif
    3.67 -
    3.68 -#ifndef __linux__
    3.69 -	#define snprintf	_snprintf
    3.70 -	#define vsnprintf	_vsnprintf
    3.71 -#endif
    3.72 -
    3.73 -#endif //_INCLUDE_OSLINK_H
     4.1 --- a/sourcemm/stub_mm/Makefile	Mon Aug 14 15:39:40 2006 +0000
     4.2 +++ b/sourcemm/stub_mm/Makefile	Mon Aug 14 19:39:47 2006 +0000
     4.3 @@ -4,12 +4,13 @@
     4.4  HL2SDK = ../../hl2sdk
     4.5  SMM_ROOT = ../..
     4.6  SRCDS = ~/srcds
     4.7 +EXTRA_FLAGS = 
     4.8  
     4.9  ### EDIT BELOW FOR OTHER PROJECTS ###
    4.10  
    4.11  OPT_FLAGS = -O3 -funroll-loops -s -pipe
    4.12  DEBUG_FLAGS = -g -ggdb3
    4.13 -CPP = gcc-3.4
    4.14 +CPP = gcc-4.1
    4.15  BINARY = stub_mm_i486.so
    4.16  
    4.17  OBJECTS = stub_mm.cpp
    4.18 @@ -29,7 +30,7 @@
    4.19  	CFLAGS = $(OPT_FLAGS)
    4.20  endif
    4.21  
    4.22 -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
    4.23 +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)
    4.24  
    4.25  OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o)
    4.26