Commit 7aa0fe9a authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

[OPENBUS-2184] Adaptação do código para ser compatível também com Lua 5.2

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/02_00_00@147337 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 58b1f780
PROJNAME= busconsole
APPNAME= $(PROJNAME)
OPENBUSINC= ${OPENBUS_HOME}/include
OPENBUSLIB= ${OPENBUS_HOME}/lib
ifdef USE_LUA52
SRC= console.c
else
SRC= consoleLua51.c
endif
LIBS:= lce luuid lfs luavararg luastruct luasocket loop luatuple \
LIBS:= lce luuid lfs luavararg luastruct luasocket loop luatuple \
luacoroutine luacothread luainspector luaidl oil luascs luaopenbus
INCLUDES+= . $(SRCLUADIR) \
$(OPENBUSINC)/luuid \
$(OPENBUSINC)/lce \
$(OPENBUSINC)/luafilesystem \
$(OPENBUSINC)/luavararg \
$(OPENBUSINC)/luastruct \
$(OPENBUSINC)/luasocket2 \
$(OPENBUSINC)/loop \
$(OPENBUSINC)/oil \
$(OPENBUSINC)/scs/lua \
$(OPENBUSINC)/openbus/lua
LDIR+= $(OPENBUSLIB)
$(LCE_HOME)/include \
$(LUUID_HOME)/include \
$(LUAFILESYSTEM_HOME)/include \
$(LUASOCKET_HOME)/include \
$(LUASTRUCT_HOME)/src \
$(LUAVARARG_HOME)/src \
$(LUAINSPECTOR_HOME)/obj/$(TEC_UNAME) \
$(LUATUPLE_HOME)/obj/$(TEC_UNAME) \
$(LUACOROUTINE_HOME)/obj/$(TEC_UNAME) \
$(LUACOTHREAD_HOME)/obj/$(TEC_UNAME) \
$(LOOP_HOME)/obj/$(TEC_UNAME) \
$(LUAIDL_HOME)/obj/$(TEC_UNAME) \
$(OIL_HOME)/obj/$(TEC_UNAME) \
$(SCS_LUA_HOME)/obj/$(TEC_UNAME) \
$(OPENBUS_LUA_HOME)/obj/$(TEC_UNAME)
LDIR+= \
$(LCE_HOME)/lib/$(TEC_UNAME) \
$(LUUID_HOME)/lib/$(TEC_UNAME) \
$(LUAFILESYSTEM_HOME)/lib/$(TEC_UNAME) \
$(LUASOCKET_HOME)/lib/$(TEC_UNAME) \
$(LUASTRUCT_HOME)/lib/$(TEC_UNAME) \
$(LUAVARARG_HOME)/lib/$(TEC_UNAME) \
$(LUAINSPECTOR_HOME)/lib/$(TEC_UNAME) \
$(LUATUPLE_HOME)/lib/$(TEC_UNAME) \
$(LUACOROUTINE_HOME)/lib/$(TEC_UNAME) \
$(LUACOTHREAD_HOME)/lib/$(TEC_UNAME) \
$(LUAIDL_HOME)/lib/$(TEC_UNAME) \
$(LOOP_HOME)/lib/$(TEC_UNAME) \
$(OIL_HOME)/lib/$(TEC_UNAME) \
$(SCS_LUA_HOME)/lib/$(TEC_UNAME) \
$(OPENBUS_LUA_HOME)/lib/$(TEC_UNAME)
ifeq "$(TEC_SYSNAME)" "Linux"
LFLAGS = -Wl,-E
......@@ -39,16 +56,22 @@ ifeq "$(TEC_SYSNAME)" "SunOS"
endif
ifdef USE_STATIC
SLIB:= $(foreach libname, $(LIBS) uuid crypto, $(OPENBUSLIB)/lib$(libname).a)
SLIB:= $(foreach libname, $(LIBS) uuid crypto, ${OPENBUS_HOME}/lib/lib$(libname).a)
ifeq "$(TEC_SYSNAME)" "SunOS"
LIBS:= rt nsl socket resolv
else
LIBS:=
endif
else
ifneq "$(TEC_SYSNAME)" "Darwin"
LIBS+= uuid
ifneq "$(TEC_SYSNAME)" "Win32"
ifneq "$(TEC_SYSNAME)" "Darwin"
LIBS+= uuid
endif
endif
endif
LIBS+= dl
ifeq "$(TEC_SYSNAME)" "Win32"
APPTYPE= console
else
LIBS+= dl
endif
......@@ -18,8 +18,8 @@
#include "lualib.h"
#include "luuid.h"
#include "lce.h"
#include "lfs.h"
#include "lce.h"
#include "luavararg.h"
#include "luastruct.h"
#include "luasocket.h"
......
......@@ -3,9 +3,10 @@ LIBNAME= $(PROJNAME)
SRC= $(PRELOAD_DIR)/$(LIBNAME).c
OPENBUSOLDIDL= ${OPENBUS_HOME}/idl/v1_05
OPENBUSNEWIDL= ${OPENBUS_HOME}/idl/v2_0
OPENBUSLIBIDL= ${OPENBUS_HOME}/idl/lib
OPENBUSSCSIDL= ${SCS_IDL1_2_HOME}/src
OPENBUSOLDIDL= ${OPENBUS_IDL1_5_HOME}/src
OPENBUSNEWIDL= ${OPENBUS_IDL2_0_HOME}/src
OPENBUSLIBIDL= ${SDK_IDL_SOURCE_HOME}/src
LUADIR= ../lua
LUASRC= \
......@@ -42,7 +43,7 @@ NEWIDL= \
NEWDEPENDENTIDL= \
$(OPENBUSNEWIDL)/core.idl \
$(OPENBUSNEWIDL)/credential.idl \
$(OPENBUSNEWIDL)/scs.idl
$(OPENBUSSCSIDL)/scs.idl
OLDIDL= \
$(OPENBUSOLDIDL)/access_control_service.idl \
......@@ -51,7 +52,7 @@ OLDIDL= \
OLDDEPENDENTIDL= \
$(OPENBUSOLDIDL)/core.idl \
$(OPENBUSOLDIDL)/scs.idl
$(OPENBUSSCSIDL)/scs.idl
include ${OIL_HOME}/openbus/base.mak
......@@ -64,10 +65,7 @@ $(LUADIR)/openbus/core/idl/parsed.lua: $(IDL2LUA) $(NEWIDL) $(NEWDEPENDENTIDL)
$(LUADIR)/openbus/core/legacy/parsed.lua: $(IDL2LUA) $(OLDIDL) $(OLDDEPENDENTIDL)
$(OILBIN) $(IDL2LUA) -o $@ $(OLDIDL)
$(PRELOAD_DIR)/$(LIBNAME).c: $(LUAPRELOADER) $(LUASRC)
$(LOOPBIN) $(LUAPRELOADER) -m \
-l "$(LUADIR)/?.lua" \
-d $(PRELOAD_DIR) \
-h $(LIBNAME).h \
-o $(LIBNAME).c \
$(LUASRC)
debug:
echo $(LIBIDL)
echo $(OPENBUSLIBIDL)
echo ${SDK_IDL_SOURCE_HOME}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment