summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-05 11:46:54 -0800
committerPixel <pixel@nobis-crew.org>2009-11-05 11:46:54 -0800
commita874ea534e7cda1189634fe5f3ab28ae9b8e529e (patch)
tree691ef9806a848974fe5fd799ab1d0b9c5bc3f13e
parenteed3ccd0e2bffb427c4e9e7fae9d92bd153ca0da (diff)
parentd3829c2102e2c92596857fe207509e92884e7ece (diff)
Merge branch 'master' of ssh+git://pixel@git.grumpycoder.net/pub/repo.git/lua-modules
-rw-r--r--Makefile11
-rw-r--r--src/plugin-luaconfigfiles.cc4
-rw-r--r--src/plugin-luaftgl.cc4
-rw-r--r--src/plugin-luagl.cc4
-rw-r--r--src/plugin-luahandle.cc4
-rw-r--r--src/plugin-luahttp.cc4
-rw-r--r--src/plugin-lualibs.cc4
-rw-r--r--src/plugin-luaocci.cc4
-rw-r--r--src/plugin-luaosmesa.cc4
-rw-r--r--src/plugin-luarand.cc4
-rw-r--r--src/plugin-luaregex.cc4
-rw-r--r--src/plugin-luasmtp.cc4
-rw-r--r--src/plugin-luasql.cc4
-rw-r--r--src/plugin-luatask.cc4
-rw-r--r--src/plugin-luaxml.cc4
15 files changed, 62 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 5f93b74..5263756 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
SYSTEM=$(shell uname)
ifeq ($(SYSTEM),Darwin)
-ARCH_FLAGS=
+ARCH_FLAGS=-arch i386 -arch x86_64 -arch ppc
SHARED_FLAGS=-dynamiclib
SHARED_EXT=dylib
SQL_LIBS=/sw/lib/mysql/libmysqlclient.a -lz
@@ -41,7 +41,8 @@ INCLUDES = \
HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_FCNTL -DHAVE_MYSQL -DHAVE_UNISTD_H -DHAVE_FORK -DHAVE_PIPE -DHAVE_FSYNC -DHAVE_MALLOC_H -DHAVE_ASPRINTF -DHAVE_BYTESWAP_H
-CPPFLAGS += $(INCLUDES) -O4 -fexceptions -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -DWORDS_LITTLEENDIAN $(ARCH_FLAGS) $(HAVES) -DUSE_OSMESA
+CPPFLAGS_NO_ARCH += $(INCLUDES) -O4 -fexceptions -DSTDC_HEADERS -DREADLINE_STATIC -DHOOK_STDS -DWORDS_LITTLEENDIAN $(HAVES) -DUSE_OSMESA
+CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
LDFLAGS += $(ARCH_FLAGS) $(SHARED_FLAGS) -L/usr/lib/oracle/11.1.0.1/client/lib -L/usr/X11/lib -L/sw/lib -L/usr/local/instantclient ./lua-interface.$(SHARED_EXT)
@@ -224,13 +225,13 @@ clean:
rm -f *.o *.dep *.so *.dylib
%.dep : %.c
- $(CC) $(CPPFLAGS) -M -MF $@ $<
+ $(CC) $(CPPFLAGS_NO_ARCH) -M -MF $@ $<
%.dep : %.cpp
- $(CXX) $(CPPFLAGS) -M -MF $@ $<
+ $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $<
%.dep : %.cc
- $(CXX) $(CPPFLAGS) -M -MF $@ $<
+ $(CXX) $(CPPFLAGS_NO_ARCH) -M -MF $@ $<
%.c : %.clua
bin2c $< $@ $(basename $@)
diff --git a/src/plugin-luaconfigfiles.cc b/src/plugin-luaconfigfiles.cc
index 5b7ace8..5904a22 100644
--- a/src/plugin-luaconfigfiles.cc
+++ b/src/plugin-luaconfigfiles.cc
@@ -1,5 +1,9 @@
#include <LuaConfigFile.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luaftgl.cc b/src/plugin-luaftgl.cc
index 95f23f0..16799a3 100644
--- a/src/plugin-luaftgl.cc
+++ b/src/plugin-luaftgl.cc
@@ -1,5 +1,9 @@
#include <LuaFTGL.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luagl.cc b/src/plugin-luagl.cc
index fe7c525..b823afe 100644
--- a/src/plugin-luagl.cc
+++ b/src/plugin-luagl.cc
@@ -1,5 +1,9 @@
#include <LuaGL.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luahandle.cc b/src/plugin-luahandle.cc
index 9049311..096ad17 100644
--- a/src/plugin-luahandle.cc
+++ b/src/plugin-luahandle.cc
@@ -1,5 +1,9 @@
#include <LuaHandle.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luahttp.cc b/src/plugin-luahttp.cc
index 4304f24..68986b2 100644
--- a/src/plugin-luahttp.cc
+++ b/src/plugin-luahttp.cc
@@ -1,5 +1,9 @@
#include <LuaHttp.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-lualibs.cc b/src/plugin-lualibs.cc
index 5a5de03..8fa4b11 100644
--- a/src/plugin-lualibs.cc
+++ b/src/plugin-lualibs.cc
@@ -1,5 +1,9 @@
#include <loadlualibs.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luaocci.cc b/src/plugin-luaocci.cc
index 3d8a445..6c0127e 100644
--- a/src/plugin-luaocci.cc
+++ b/src/plugin-luaocci.cc
@@ -1,5 +1,9 @@
#include <LuaOCCI.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luaosmesa.cc b/src/plugin-luaosmesa.cc
index b5e24e2..2f4e787 100644
--- a/src/plugin-luaosmesa.cc
+++ b/src/plugin-luaosmesa.cc
@@ -14,6 +14,10 @@
#include <LuaHandle.h>
#include <BLua.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luarand.cc b/src/plugin-luarand.cc
index ea0ad30..5cb6db5 100644
--- a/src/plugin-luarand.cc
+++ b/src/plugin-luarand.cc
@@ -1,3 +1,7 @@
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luaregex.cc b/src/plugin-luaregex.cc
index 5bb9f41..5c2a2aa 100644
--- a/src/plugin-luaregex.cc
+++ b/src/plugin-luaregex.cc
@@ -1,5 +1,9 @@
#include <LuaRegex.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luasmtp.cc b/src/plugin-luasmtp.cc
index 4c62060..00a713b 100644
--- a/src/plugin-luasmtp.cc
+++ b/src/plugin-luasmtp.cc
@@ -1,5 +1,9 @@
#include <LuaSmtp.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luasql.cc b/src/plugin-luasql.cc
index 0f38fb6..eba3595 100644
--- a/src/plugin-luasql.cc
+++ b/src/plugin-luasql.cc
@@ -1,5 +1,9 @@
#include <LuaSQL.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luatask.cc b/src/plugin-luatask.cc
index b1b8e3d..ffd1814 100644
--- a/src/plugin-luatask.cc
+++ b/src/plugin-luatask.cc
@@ -1,5 +1,9 @@
#include <LuaTask.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else
diff --git a/src/plugin-luaxml.cc b/src/plugin-luaxml.cc
index e6e579d..f2ba1b6 100644
--- a/src/plugin-luaxml.cc
+++ b/src/plugin-luaxml.cc
@@ -1,5 +1,9 @@
#include <LuaXML.h>
+#ifdef FROM_LUAINTERFACE
+#define NO_DLL
+#endif
+
#ifndef WIN32
#define WEAK __attribute__ ((weak))
#else