git-svn-id: svn://svn.icculus.org/netradiant/trunk@54 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
4d37af3c00
commit
f57bd8b3da
29
Makefile
29
Makefile
|
|
@ -36,6 +36,8 @@ ifneq ($(MINGW),)
|
||||||
LIBS_GL = -lopengl32
|
LIBS_GL = -lopengl32
|
||||||
CPPFLAGS_DL =
|
CPPFLAGS_DL =
|
||||||
LIBS_DL =
|
LIBS_DL =
|
||||||
|
CPPFLAGS_ZLIB =
|
||||||
|
LIBS_ZLIB = -lz
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BUILD),debug)
|
ifeq ($(BUILD),debug)
|
||||||
|
|
@ -58,33 +60,38 @@ ifeq ($(OS),Linux)
|
||||||
DLL = so
|
DLL = so
|
||||||
MWINDOWS =
|
MWINDOWS =
|
||||||
else ifeq ($(OS),Win32)
|
else ifeq ($(OS),Win32)
|
||||||
CPPFLAGS += -DWIN32 -D_WIN32
|
CPPFLAGS += -DWIN32 -D_WIN32 -D_inline=inline
|
||||||
CFLAGS += -mms-bitfields
|
CFLAGS += -mms-bitfields
|
||||||
LDFLAGS_DLL =
|
LDFLAGS_DLL = --dll
|
||||||
LIBS = -lws2_32 -luser32 -lgdi32
|
LIBS = -lws2_32 -luser32 -lgdi32
|
||||||
EXE = exe
|
EXE = exe
|
||||||
A = a
|
A = a
|
||||||
DLL = dll
|
DLL = dll
|
||||||
MWINDOWS = -mwindows
|
MWINDOWS = -mwindows
|
||||||
|
LDD =
|
||||||
|
LIBS_GL ?= -lopengl32
|
||||||
|
LIBS_DL ?=
|
||||||
#else ifeq ($(OS),Darwin)
|
#else ifeq ($(OS),Darwin)
|
||||||
else
|
else
|
||||||
$(error Unsupported build OS: $(OS))
|
$(error Unsupported build OS: $(OS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CPPFLAGS_GLIB ?= `pkg-config glib-2.0 --cflags`
|
CPPFLAGS_GLIB ?= `pkg-config glib-2.0 --cflags`
|
||||||
LIBS_GLIB ?= `pkg-config glib-2.0 --libs-only-l --libs-only-L`
|
LIBS_GLIB ?= `pkg-config glib-2.0 --libs-only-L` `pkg-config glib-2.0 --libs-only-l`
|
||||||
CPPFLAGS_XML ?= `xml2-config --cflags`
|
CPPFLAGS_XML ?= `pkg-config libxml-2.0 --cflags`
|
||||||
LIBS_XML ?= `xml2-config --libs`
|
LIBS_XML ?= `pkg-config libxml-2.0 --libs-only-L` `pkg-config libxml-2.0 --libs-only-l`
|
||||||
CPPFLAGS_PNG ?= `libpng-config --cflags`
|
CPPFLAGS_PNG ?= `pkg-config libpng --cflags`
|
||||||
LIBS_PNG ?= `libpng-config --libs`
|
LIBS_PNG ?= `pkg-config libpng --libs-only-L` `pkg-config libpng --libs-only-l`
|
||||||
CPPFLAGS_GTK ?= `pkg-config gtk+-2.0 --cflags`
|
CPPFLAGS_GTK ?= `pkg-config gtk+-2.0 --cflags`
|
||||||
LIBS_GTK ?= `pkg-config gtk+-2.0 --libs-only-l --libs-only-L`
|
LIBS_GTK ?= `pkg-config gtk+-2.0 --libs-only-L` `pkg-config gtk+-2.0 --libs-only-l`
|
||||||
CPPFLAGS_GTKGLEXT ?= `pkg-config gtkglext-1.0 --cflags`
|
CPPFLAGS_GTKGLEXT ?= `pkg-config gtkglext-1.0 --cflags`
|
||||||
LIBS_GTKGLEXT ?= `pkg-config gtkglext-1.0 --libs-only-l --libs-only-L`
|
LIBS_GTKGLEXT ?= `pkg-config gtkglext-1.0 --libs-only-L` `pkg-config gtkglext-1.0 --libs-only-l`
|
||||||
CPPFLAGS_GL ?=
|
CPPFLAGS_GL ?=
|
||||||
LIBS_GL ?= -lGL
|
LIBS_GL ?= -lGL
|
||||||
CPPFLAGS_DL ?=
|
CPPFLAGS_DL ?=
|
||||||
LIBS_DL ?= -ldl
|
LIBS_DL ?= -ldl
|
||||||
|
CPPFLAGS_ZLIB =
|
||||||
|
LIBS_ZLIB = -lz
|
||||||
|
|
||||||
RADIANT_ABOUTMSG = Custom build
|
RADIANT_ABOUTMSG = Custom build
|
||||||
|
|
||||||
|
|
@ -451,8 +458,8 @@ libxmllib.$(A): \
|
||||||
libs/xml/xmltextags.o \
|
libs/xml/xmltextags.o \
|
||||||
libs/xml/xmlwriter.o \
|
libs/xml/xmlwriter.o \
|
||||||
|
|
||||||
install/modules/archivezip.$(DLL): LIBS_EXTRA := -lz
|
install/modules/archivezip.$(DLL): LIBS_EXTRA := $(LIBS_ZLIB)
|
||||||
install/modules/archivezip.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude
|
install/modules/archivezip.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_ZLIB) -Ilibs -Iinclude
|
||||||
install/modules/archivezip.$(DLL): \
|
install/modules/archivezip.$(DLL): \
|
||||||
plugins/archivezip/archive.o \
|
plugins/archivezip/archive.o \
|
||||||
plugins/archivezip/pkzip.o \
|
plugins/archivezip/pkzip.o \
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#include "debugging/debugging.h"
|
#include "debugging/debugging.h"
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
|
#ifdef MINGW32
|
||||||
|
#define RADIANT_DLLEXPORT __declspec(dllexport)
|
||||||
|
#define RADIANT_DLLIMPORT __declspec(dllimport)
|
||||||
|
#else
|
||||||
#define RADIANT_DLLEXPORT __stdcall
|
#define RADIANT_DLLEXPORT __stdcall
|
||||||
|
#define RADIANT_DLLIMPORT __stdcall
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define RADIANT_DLLEXPORT
|
#define RADIANT_DLLEXPORT
|
||||||
|
#define RADIANT_DLLIMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ public:
|
||||||
|
|
||||||
class DynamicLibraryModule
|
class DynamicLibraryModule
|
||||||
{
|
{
|
||||||
typedef void (RADIANT_DLLEXPORT* RegisterModulesFunc)(ModuleServer& server);
|
typedef void (RADIANT_DLLIMPORT* RegisterModulesFunc)(ModuleServer& server);
|
||||||
DynamicLibrary m_library;
|
DynamicLibrary m_library;
|
||||||
RegisterModulesFunc m_registerModule;
|
RegisterModulesFunc m_registerModule;
|
||||||
public:
|
public:
|
||||||
|
|
@ -214,6 +214,10 @@ public:
|
||||||
if(!m_library.failed())
|
if(!m_library.failed())
|
||||||
{
|
{
|
||||||
m_registerModule = reinterpret_cast<RegisterModulesFunc>(m_library.findSymbol("Radiant_RegisterModules"));
|
m_registerModule = reinterpret_cast<RegisterModulesFunc>(m_library.findSymbol("Radiant_RegisterModules"));
|
||||||
|
#if 0
|
||||||
|
if(!m_registerModule)
|
||||||
|
m_registerModule = reinterpret_cast<RegisterModulesFunc>(m_library.findSymbol("Radiant_RegisterModules@4"));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool failed()
|
bool failed()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user