busconsole.mak 2.38 KB
Newer Older
1 2 3
PROJNAME= busconsole
APPNAME= $(PROJNAME)

4 5 6 7 8
ifdef USE_LUA52
	SRC= console.c
else
	SRC= consoleLua51.c
endif
9

10 11 12 13 14 15 16 17 18 19 20 21 22 23
LIBS:= \
  luastruct \
  luasocket \
  luatuple \
  loop \
  luacothread \
  luaidl \
  oil \
  luavararg \
  lfs \
  luuid \
  lce \
  luascs \
  luaopenbus
24

25
INCLUDES+= . $(SRCLUADIR) \
26
  $(LUASTRUCT_HOME)/src \
27
  $(LUASOCKET_HOME)/include \
28 29
  $(LUATUPLE_HOME)/obj/$(TEC_UNAME) \
  $(LOOP_HOME)/obj/$(TEC_UNAME) \
30
  $(LUACOTHREAD_HOME)/obj/$(TEC_UNAME) \
31 32
  $(LUAIDL_HOME)/obj/$(TEC_UNAME) \
  $(OIL_HOME)/obj/$(TEC_UNAME) \
33 34 35 36
  $(LUAVARARG_HOME)/src \
  $(LUAFILESYSTEM_HOME)/include \
  $(LUUID_HOME)/include \
  $(LCE_HOME)/include \
37 38 39 40
  $(SCS_LUA_HOME)/obj/$(TEC_UNAME) \
  $(OPENBUS_LUA_HOME)/obj/$(TEC_UNAME)
LDIR+= \
  $(LUASTRUCT_HOME)/lib/$(TEC_UNAME) \
41
  $(LUASOCKET_HOME)/lib/$(TEC_UNAME) \
42
  $(LUATUPLE_HOME)/lib/$(TEC_UNAME) \
43
  $(LOOP_HOME)/lib/$(TEC_UNAME) \
44 45 46
  $(LUACOTHREAD_HOME)/lib/$(TEC_UNAME) \
  $(LUAIDL_HOME)/lib/$(TEC_UNAME) \
  $(OIL_HOME)/lib/$(TEC_UNAME) \
47 48 49 50
  $(LUAVARARG_HOME)/lib/$(TEC_UNAME) \
  $(LUAFILESYSTEM_HOME)/lib/$(TEC_UNAME) \
  $(LUUID_HOME)/lib/$(TEC_UNAME) \
  $(LCE_HOME)/lib/$(TEC_UNAME) \
51 52
  $(SCS_LUA_HOME)/lib/$(TEC_UNAME) \
  $(OPENBUS_LUA_HOME)/lib/$(TEC_UNAME)
53

54 55 56 57 58 59
ifdef USE_LUA51
  INCLUDES+= $(LUACOMPAT52_HOME)/c-api $(LUACOMPAT52_HOME)/obj/$(TEC_UNAME)
  LDIR+= $(LUACOMPAT52_HOME)/lib/$(TEC_UNAME)
  LIBS+= luacompat52 luabit32 luacompat52c
endif

60
ifeq "$(TEC_SYSNAME)" "Linux"
61
  LFLAGS = -Wl,-E
62 63
endif
ifeq "$(TEC_SYSNAME)" "SunOS"
64 65 66 67 68 69
  USE_CC=Yes
  CFLAGS= -g -KPIC -mt -D_REENTRANT
  ifeq ($(TEC_WORDSIZE), TEC_64)
    CFLAGS+= -m64
  endif
  LFLAGS= $(CFLAGS) -xildoff
70
endif
71 72

ifdef USE_STATIC
73
  SLIB:= $(foreach libname, $(LIBS) uuid crypto, ${OPENBUS_HOME}/lib/lib$(libname).a)
74 75 76 77 78
  ifeq "$(TEC_SYSNAME)" "SunOS"
    LIBS:= rt nsl socket resolv
  else
    LIBS:= 
  endif
79
else
80
  ifeq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
81 82 83
    ifneq "$(TEC_SYSNAME)" "Darwin"
      LIBS+= uuid
    endif
84
  endif
85 86
endif

87
ifneq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
88
  APPTYPE= console
89 90 91 92 93 94 95 96
  LIBS+= wsock32 rpcrt4
  ifneq ($(findstring dll, $(TEC_UNAME)), ) # USE_DLL
    ifdef DBG
      LIBS+= libeay32MDd ssleay32MDd
    else
      LIBS+= libeay32MD ssleay32MD
    endif
    LDIR+= $(OPENSSL_HOME)/lib/VC
97
  else
98 99 100 101 102 103
    ifdef DBG
      LIBS+= libeay32MTd ssleay32MTd
    else
      LIBS+= libeay32MT ssleay32MT
    endif
    LDIR+= $(OPENSSL_HOME)/lib/VC/static
104
  endif
105 106 107
else
  LIBS+= dl
endif