openbus.mak 4.38 KB
Newer Older
1 2 3
PROJNAME= luaopenbus
LIBNAME= $(PROJNAME)

4 5
SRC= \
  openbuslua.c \
6 7
  lecholib.c \
  lthreadlib.c \
8
  $(PRELOAD_DIR)/$(LIBNAME).c
9

10
OPENBUSSCSIDL= ${SCS_IDL1_2_HOME}/src
11
OPENBUSNEWIDL= ${OPENBUS_IDL2_1_HOME}/src
12
OPENBUSOLDIDL= ${OPENBUS_IDL2_0_HOME}/src
13
OPENBUSLIBIDL= ${SDK_IDL_SOURCE_HOME}/src
14

15
LUADIR= ../lua
16
LUASRC= \
17
  $(LUADIR)/openbus/assistant.lua \
18
  $(LUADIR)/openbus/assistant2.lua \
19 20 21 22
  $(LUADIR)/openbus/core/Access.lua \
  $(LUADIR)/openbus/core/idl/makeaux.lua \
  $(LUADIR)/openbus/core/idl/parsed.lua \
  $(LUADIR)/openbus/core/idl.lua \
23 24
  $(LUADIR)/openbus/core/legacy/idl.lua \
  $(LUADIR)/openbus/core/legacy/parsed.lua \
25
  $(LUADIR)/openbus/core/messages.lua \
26 27
  $(LUADIR)/openbus/idl/parsed.lua \
  $(LUADIR)/openbus/idl.lua \
28 29 30
  $(LUADIR)/openbus/util/argcheck.lua \
  $(LUADIR)/openbus/util/autotable.lua \
  $(LUADIR)/openbus/util/database.lua \
31 32
  $(LUADIR)/openbus/util/database_legacy.lua \
  $(LUADIR)/openbus/util/database_converter.lua \
33
  $(LUADIR)/openbus/util/except.lua \
34 35 36
  $(LUADIR)/openbus/util/logger.lua \
  $(LUADIR)/openbus/util/messages.lua \
  $(LUADIR)/openbus/util/oo.lua \
37
  $(LUADIR)/openbus/util/sandbox.lua \
38 39 40
  $(LUADIR)/openbus/util/server.lua \
  $(LUADIR)/openbus/util/sysex.lua \
  $(LUADIR)/openbus/util/tickets.lua \
41
  $(LUADIR)/openbus.lua \
42 43
  lecholib.c \
  lthreadlib.c \
44 45
  $(LUADIR)/openbus/console/costdin.lua \
  $(LUADIR)/openbus/console/utils.lua
46

47 48
LIBIDL= $(OPENBUSLIBIDL)/openbus.idl

49 50
LIBDEPENDENTIDL= $(OPENBUSLIBIDL)/corba.idl

51
NEWIDL= \
52 53 54
  $(OPENBUSNEWIDL)/openbus_access-2.1.idl \
  $(OPENBUSNEWIDL)/openbus_offers-2.1.idl \
  $(OPENBUSNEWIDL)/openbus_export-2.1.idl
55

56
NEWDEPENDENTIDL= \
57 58
  $(OPENBUSNEWIDL)/openbus_core-2.1.idl \
  $(OPENBUSNEWIDL)/openbus_creden-2.1.idl \
59
  $(OPENBUSSCSIDL)/scs.idl 
60
  
61
OLDIDL= \
62
  $(OPENBUSNEWIDL)/openbus_legacy-2.1.idl \
63 64 65 66 67
  $(OPENBUSOLDIDL)/access_control.idl \
  $(OPENBUSOLDIDL)/offer_registry.idl \
  $(OPENBUSOLDIDL)/data_export.idl

OLDDEPENDENTIDL= \
68 69 70
  $(OPENBUSNEWIDL)/openbus_access-2.1.idl \
  $(OPENBUSNEWIDL)/openbus_core-2.1.idl \
  $(OPENBUSNEWIDL)/openbus_creden-2.1.idl \
71 72 73 74
  $(OPENBUSOLDIDL)/core.idl \
  $(OPENBUSOLDIDL)/credential.idl \
  $(OPENBUSSCSIDL)/scs.idl

75 76
LUAPRELOADFLAGS= -s

77 78
include ${OIL_HOME}/openbus/base.mak

79 80 81 82 83 84 85 86 87 88 89 90 91
LIBS:= \
  luastruct \
  luasocket \
  luatuple \
  loop \
  luacothread \
  luaidl \
  oil \
  luavararg \
  lfs \
  luuid \
  lce \
  luasec \
92 93 94 95 96
  luascs \
  luasec \
  luascs \
  sqlite3 \
  lsqlite3
97 98 99 100 101 102 103 104 105 106 107 108 109 110

INCLUDES+= . \
  $(LUASTRUCT_HOME)/src \
  $(LUASOCKET_HOME)/include \
  $(LUATUPLE_HOME)/obj/$(TEC_UNAME) \
  $(LOOP_HOME)/obj/$(TEC_UNAME) \
  $(LUACOTHREAD_HOME)/obj/$(TEC_UNAME) \
  $(LUAIDL_HOME)/obj/$(TEC_UNAME) \
  $(OIL_HOME)/obj/$(TEC_UNAME) \
  $(LUAVARARG_HOME)/src \
  $(LUAFILESYSTEM_HOME)/include \
  $(LUUID_HOME)/include \
  $(LCE_HOME)/include \
  $(LUASEC_HOME)/include \
111 112 113
  $(SCS_LUA_HOME)/obj/$(TEC_UNAME) \
  $(SQLITE_HOME) \
  $(LSQLITE3_HOME)
114 115 116 117 118 119 120 121 122 123 124 125 126 127

LDIR+= \
  $(LUASTRUCT_HOME)/lib/$(TEC_UNAME) \
  $(LUASOCKET_HOME)/lib/$(TEC_UNAME) \
  $(LUATUPLE_HOME)/lib/$(TEC_UNAME) \
  $(LOOP_HOME)/lib/$(TEC_UNAME) \
  $(LUACOTHREAD_HOME)/lib/$(TEC_UNAME) \
  $(LUAIDL_HOME)/lib/$(TEC_UNAME) \
  $(OIL_HOME)/lib/$(TEC_UNAME) \
  $(LUAVARARG_HOME)/lib/$(TEC_UNAME) \
  $(LUAFILESYSTEM_HOME)/lib/$(TEC_UNAME) \
  $(LUUID_HOME)/lib/$(TEC_UNAME) \
  $(LCE_HOME)/lib/$(TEC_UNAME) \
  $(LUASEC_HOME)/lib/$(TEC_UNAME) \
128 129
  $(SCS_LUA_HOME)/lib/$(TEC_UNAME) \
  $(SQLITE_HOME)/.libs \
130
  $(LSQLITE3_HOME)/bbuild/install
131

132
$(LUADIR)/openbus/idl/parsed.lua: $(IDL2LUA) $(LIBIDL) $(NEWIDL) $(NEWDEPENDENTIDL) $(LIBDEPENDENTIDL)
133
	$(OILBIN) $(IDL2LUA) -I $(OPENBUSSCSIDL) -I $(OPENBUSNEWIDL) -I $(OPENBUSLIBIDL) -o $@ $(LIBIDL)
134

135
$(LUADIR)/openbus/core/idl/parsed.lua: $(IDL2LUA) $(NEWIDL) $(NEWDEPENDENTIDL)
136
	$(OILBIN) $(IDL2LUA) -I $(OPENBUSSCSIDL) -I $(OPENBUSNEWIDL) -o $@ $(NEWIDL)
137 138

$(LUADIR)/openbus/core/legacy/parsed.lua: $(IDL2LUA) $(OLDIDL) $(OLDDEPENDENTIDL)
139
	$(OILBIN) $(IDL2LUA) -I $(OPENBUSSCSIDL) -I $(OPENBUSOLDIDL) -I $(OPENBUSNEWIDL) -o $@ $(OLDIDL)
140 141

openbuslua.c: $(PRELOAD_DIR)/luaopenbus.c
142 143 144 145 146 147 148 149 150 151 152 153 154 155

INTEROPIDLSDIR=../interop/lua/openbus/interop/idl

IDL_INTEROPS="BASIC" "CHAINING" "DELEGATION" "PROTOCOL"

$(INTEROPIDLSDIR):
	mkdir -p $(INTEROPIDLSDIR)
	for interop in $(IDL_INTEROPS) ; do \
	    lc_interop=`echo $$interop | tr A-Z a-z` ; \
	    eval path='$$'{OPENBUS_SDK_IDL_INTEROP_$${interop}_HOME} ; \
	    $(OILBIN) $(IDL2LUA) -o $(INTEROPIDLSDIR)/$${lc_interop}.lua `ls $$path/*.*` ; \
	done

parse-interops-idls: $(INTEROPIDLSDIR)