diff options
-rw-r--r-- | Makefile.mingw32 | 7 | ||||
-rw-r--r-- | src/lua-interface.cpp | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/Makefile.mingw32 b/Makefile.mingw32 index 9071aa5..0174c3b 100644 --- a/Makefile.mingw32 +++ b/Makefile.mingw32 @@ -5,11 +5,18 @@ CXX = i386-mingw32-g++ LD = i386-mingw32-g++ STRIP = i386-mingw32-strip else +ifeq ($(SYSTEM),MINGW32_NT-5.1) +CC = gcc +CXX = g++ +LD = g++ +STRIP = strip +else CC = i586-mingw32msvc-gcc CXX = i586-mingw32msvc-g++ LD = i586-mingw32msvc-g++ STRIP = i586-mingw32msvc-strip endif +endif INCLUDES = \ -I../mogltk/include \ diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index 4dc7129..6a7a9fc 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -51,11 +51,16 @@ #ifndef _MSVC // this seems ignored under apple's gcc... dammit. +// Gah. msys doesn't support that properly either. #define WEAK __attribute__ ((weak)) #else #define WEAK #endif +#if defined(__APPLE__) || defined(__MINGW32__) +#define NO_SMART_MODULES +#endif + extern "C" { extern void luaconfigfiles_init(Lua * L) WEAK; @@ -312,7 +317,7 @@ int sLua_baselua_interface::baselua_interface_proceed_statics(Lua * L, int n, in case BASELUA_INTERFACE_LOADMODULE: filename = L->tostring(); if (0) { -#if !(defined(__APPLE__) || defined(MODULES_BUILT_IN)) +#if !(defined(NO_SMART_MODULES) || defined(MODULES_BUILT_IN)) } else if ((filename == "luaconfigfiles") && (luaconfigfiles_init != NULL)) { luaconfigfiles_init(L); #ifndef _MSVC @@ -689,7 +694,7 @@ static void * interactive_prompt(void * __L) { } void autoload_exports(Lua * L) { -#if not defined(__APPLE__) or defined(MODULES_BUILT_IN) +#if not defined(NO_SMART_MODULES) or defined(MODULES_BUILT_IN) if (lualibs_init) lualibs_init(L); if (luahandle_init) |