From: rpolzer Date: Tue, 16 Sep 2008 07:40:46 +0000 (+0000) Subject: git-svn-id: svn://svn.icculus.org/netradiant/trunk@54 61c419a2-8eb2-4b30-bcec-8cead03... X-Git-Tag: svn-r421~366 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f57bd8b3da2293e1dc58d96d906cdd3ccf78d019;p=xonotic%2Fnetradiant.git git-svn-id: svn://svn.icculus.org/netradiant/trunk@54 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/Makefile b/Makefile index 226fd620..c1f2c168 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,8 @@ ifneq ($(MINGW),) LIBS_GL = -lopengl32 CPPFLAGS_DL = LIBS_DL = + CPPFLAGS_ZLIB = + LIBS_ZLIB = -lz endif ifeq ($(BUILD),debug) @@ -58,33 +60,38 @@ ifeq ($(OS),Linux) DLL = so MWINDOWS = else ifeq ($(OS),Win32) - CPPFLAGS += -DWIN32 -D_WIN32 + CPPFLAGS += -DWIN32 -D_WIN32 -D_inline=inline CFLAGS += -mms-bitfields - LDFLAGS_DLL = + LDFLAGS_DLL = --dll LIBS = -lws2_32 -luser32 -lgdi32 EXE = exe A = a DLL = dll MWINDOWS = -mwindows + LDD = + LIBS_GL ?= -lopengl32 + LIBS_DL ?= #else ifeq ($(OS),Darwin) else $(error Unsupported build OS: $(OS)) endif CPPFLAGS_GLIB ?= `pkg-config glib-2.0 --cflags` -LIBS_GLIB ?= `pkg-config glib-2.0 --libs-only-l --libs-only-L` -CPPFLAGS_XML ?= `xml2-config --cflags` -LIBS_XML ?= `xml2-config --libs` -CPPFLAGS_PNG ?= `libpng-config --cflags` -LIBS_PNG ?= `libpng-config --libs` +LIBS_GLIB ?= `pkg-config glib-2.0 --libs-only-L` `pkg-config glib-2.0 --libs-only-l` +CPPFLAGS_XML ?= `pkg-config libxml-2.0 --cflags` +LIBS_XML ?= `pkg-config libxml-2.0 --libs-only-L` `pkg-config libxml-2.0 --libs-only-l` +CPPFLAGS_PNG ?= `pkg-config libpng --cflags` +LIBS_PNG ?= `pkg-config libpng --libs-only-L` `pkg-config libpng --libs-only-l` 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` -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 ?= LIBS_GL ?= -lGL CPPFLAGS_DL ?= LIBS_DL ?= -ldl +CPPFLAGS_ZLIB = +LIBS_ZLIB = -lz RADIANT_ABOUTMSG = Custom build @@ -451,8 +458,8 @@ libxmllib.$(A): \ libs/xml/xmltextags.o \ libs/xml/xmlwriter.o \ -install/modules/archivezip.$(DLL): LIBS_EXTRA := -lz -install/modules/archivezip.$(DLL): CPPFLAGS_EXTRA := -Ilibs -Iinclude +install/modules/archivezip.$(DLL): LIBS_EXTRA := $(LIBS_ZLIB) +install/modules/archivezip.$(DLL): CPPFLAGS_EXTRA := $(CPPFLAGS_ZLIB) -Ilibs -Iinclude install/modules/archivezip.$(DLL): \ plugins/archivezip/archive.o \ plugins/archivezip/pkzip.o \ diff --git a/include/modulesystem.h b/include/modulesystem.h index dd7c59ad..0378cc1d 100644 --- a/include/modulesystem.h +++ b/include/modulesystem.h @@ -26,9 +26,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include "debugging/debugging.h" #if defined(WIN32) +#ifdef MINGW32 +#define RADIANT_DLLEXPORT __declspec(dllexport) +#define RADIANT_DLLIMPORT __declspec(dllimport) +#else #define RADIANT_DLLEXPORT __stdcall +#define RADIANT_DLLIMPORT __stdcall +#endif #else #define RADIANT_DLLEXPORT +#define RADIANT_DLLIMPORT #endif diff --git a/radiant/server.cpp b/radiant/server.cpp index a4c7b83a..e6b4dbb1 100644 --- a/radiant/server.cpp +++ b/radiant/server.cpp @@ -204,7 +204,7 @@ public: class DynamicLibraryModule { - typedef void (RADIANT_DLLEXPORT* RegisterModulesFunc)(ModuleServer& server); + typedef void (RADIANT_DLLIMPORT* RegisterModulesFunc)(ModuleServer& server); DynamicLibrary m_library; RegisterModulesFunc m_registerModule; public: @@ -214,6 +214,10 @@ public: if(!m_library.failed()) { m_registerModule = reinterpret_cast(m_library.findSymbol("Radiant_RegisterModules")); +#if 0 + if(!m_registerModule) + m_registerModule = reinterpret_cast(m_library.findSymbol("Radiant_RegisterModules@4")); +#endif } } bool failed()