From 3622e91a1d50508cf527b40bde1ee5e3b3742d31 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 24 May 2009 18:31:07 -0700 Subject: Enabling libucl depending on the environment. --- Makefile | 6 +++++- Makefile.mingw32 | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index da2bf4c..eb398a9 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,10 @@ ifeq ($(MACHINE),x86_64) ifeq ($(DISTRIB),Debian) #LDFLAGS_READLINE=/usr/lib32/libreadline.a /usr/lib32/libncurses.a endif +ifeq ($(DISTRIB),Debian) +HAVES = -DHAVE_UCL +LDFLAGS = -lucl +else endif SHARED_FLAGS=-shared SHARED_EXT=so @@ -47,7 +51,7 @@ INCLUDES = \ -I /usr/include/oracle/11.1.0.1/client/ \ -I ../PSX-Bundle/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 +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 LIBS += -lz -ldl -lpthread diff --git a/Makefile.mingw32 b/Makefile.mingw32 index 9071aa5..7777bf2 100644 --- a/Makefile.mingw32 +++ b/Makefile.mingw32 @@ -21,12 +21,12 @@ INCLUDES = \ -I../pthreads-w32-2-8-0-release/ \ -I../gnuwin32/include -HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_MALLOC_H -DHAVE_BYTESWAP_H +HAVES = -DHAVE_VSSCANF -DHAVE_LIBJPEG -DHAVE_MALLOC_H -DHAVE_BYTESWAP_H -DHAVE_UCL CPPFLAGS += $(INCLUDES) -g -fexceptions -DLUATASK_OMIT_COMMAND -DSTDC_HEADERS -DLIBICONV_PLUG -DREADLINE_STATIC -fexceptions -DWORDS_LITTLEENDIAN -march=i686 $(HAVES) -DUSE_MPQLIB LDFLAGS += -L../gnuwin32/lib -g -fexceptions -Wl,--enable-auto-image-base -Wl,--export-dynamic --export-all-symbols -Wl,--enable-auto-import -fexceptions \ - ../libreadline-static.a -lz.dll -lwsock32 -lws2_32 ../pthreads-w32-2-8-0-release/libpthreadGC2.a --enable-stdcall-fixup + ../libreadline-static.a -lz.dll -lucl.dll -lwsock32 -lws2_32 ../pthreads-w32-2-8-0-release/libpthreadGC2.a --enable-stdcall-fixup vpath %.c ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src:../Baltisot/MSVC/iconv:../Baltisot/MSVC/regex vpath %.cc ../Baltisot/lib:../Baltisot/src:../Baltisot/lib/zlib/src:../Baltisot/lib/lua/src:../Baltisot/lib/lua/src/LuaLib:src:../paperIdol/src:../mogltk/lib:../tinyxml:../lua-modules/src:../Baltisot/MSVC/iconv:../Baltisot/MSVC/regex -- cgit v1.2.3 From cd79005b76be4ff35a27a003ccba6d4350d968a8 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 25 May 2009 01:32:37 +0000 Subject: Typo. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index eb398a9..1faffa7 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ endif ifeq ($(DISTRIB),Debian) HAVES = -DHAVE_UCL LDFLAGS = -lucl -else +endif endif SHARED_FLAGS=-shared SHARED_EXT=so -- cgit v1.2.3 From e0656f4abdc417e798e519894dde4a5bc3d8a096 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 25 May 2009 01:35:52 +0000 Subject: Adding dist target. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 1faffa7..6988d20 100644 --- a/Makefile +++ b/Makefile @@ -227,6 +227,10 @@ ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(WHOLE_SOURCES) $(DEBUG_SOURCE all: dep luac lua-interface +dist: luac lua-interface lua-interface-gl.$(SHARED_EXT) + mkdir -p ../lua-interface-dist + cp luac lua-interface lua-interface-*.$(SHARED_EXT) ../lua-interface-dist + dep: $(ALL_DEPS) luac: $(LUAC_OBJECTS) @@ -273,3 +277,5 @@ gl-glue.s: src/generate-gl-glue.sh > gl-glue.s -include $(ALL_DEPS) + +.PHONY: dist -- cgit v1.2.3 From 213191f4e068d76e102b16774a20ae73133cc6a8 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 25 May 2009 03:26:59 +0000 Subject: libucl isn't that much common, let's compile it statically. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6988d20..543de5b 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ ifeq ($(DISTRIB),Debian) endif ifeq ($(DISTRIB),Debian) HAVES = -DHAVE_UCL -LDFLAGS = -lucl +LDFLAGS = /usr/lib/libucl.a endif endif SHARED_FLAGS=-shared -- cgit v1.2.3 From 8560e5ec8034c5e4a92623a4c75cf70ef56ec5a0 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 25 May 2009 03:29:04 +0000 Subject: luac needs libucl too... --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 543de5b..8f714e8 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ ifeq ($(DISTRIB),Debian) endif ifeq ($(DISTRIB),Debian) HAVES = -DHAVE_UCL -LDFLAGS = /usr/lib/libucl.a +BASIC_LDFLAGS = /usr/lib/libucl.a endif endif SHARED_FLAGS=-shared @@ -57,7 +57,7 @@ LIBS += -lz -ldl -lpthread CPPFLAGS += $(INCLUDES) -g -DSTDC_HEADERS $(CPPFLAGS_READLINE) -DHOOK_STDS -fexceptions -DWORDS_LITTLEENDIAN -fexceptions $(ARCH_FLAGS) $(HAVES) -DUSE_MPQLIB -BASIC_LDFLAGS = $(ARCH_FLAGS) $(LIBS) +BASIC_LDFLAGS += $(ARCH_FLAGS) $(LIBS) LDFLAGS += $(BASIC_LDFLAGS) $(LDFLAGS_READLINE) -L/usr/lib/oracle/11.1.0.1/client/lib -- cgit v1.2.3 From ea43e96e71a95da9e9fe3583f7b16d1d44b94f6b Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 25 May 2009 03:36:32 +0000 Subject: Fixing dist target. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8f714e8..b6f8a42 100644 --- a/Makefile +++ b/Makefile @@ -229,7 +229,8 @@ all: dep luac lua-interface dist: luac lua-interface lua-interface-gl.$(SHARED_EXT) mkdir -p ../lua-interface-dist - cp luac lua-interface lua-interface-*.$(SHARED_EXT) ../lua-interface-dist + ln -sf lua-interface-mesa.$(SHARED_EXT) lua-interface.$(SHARED_EXT) + cp luac lua-interface lua-interface*.$(SHARED_EXT) ../lua-interface-dist dep: $(ALL_DEPS) -- cgit v1.2.3 From bad0cd00ee93488f9b9182117f74446441b6fb09 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 28 May 2009 19:58:23 -0700 Subject: Uniformizing the usage of luarecast. --- src/lua-interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index 4dc7129..267a615 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -291,7 +291,7 @@ int sLua_baselua_interface::baselua_interface_proceed_statics(Lua * L, int n, in if (L->isstring(1)) { L->load(&Input(L->tostring(1))); } else { - Handle * t = (Handle *) LuaObject::getme(L, 1); + Handle * t = L->recast(1); L->load(t); } } @@ -304,7 +304,7 @@ int sLua_baselua_interface::baselua_interface_proceed_statics(Lua * L, int n, in if (L->isstring(1)) { L->load(&Input(L->tostring(1)), false); } else { - Handle * t = (Handle *) LuaObject::getme(L, 1); + Handle * t = L->recast(1); L->load(t, false); } } -- cgit v1.2.3