busconsole.mak 2.45 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
LIBS:= \
  luastruct \
  luasocket \
  luatuple \
  loop \
  luacothread \
  luaidl \
  oil \
  luavararg \
  lfs \
  luuid \
  lce \
22
  luasec \
23 24
  luascs \
  luaopenbus
25

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

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

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

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

90
ifneq ($(findstring $(TEC_SYSNAME), Win32 Win64), )
91
  APPTYPE= console
92 93 94 95 96 97 98 99
  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
100
  else
101 102 103 104 105 106
    ifdef DBG
      LIBS+= libeay32MTd ssleay32MTd
    else
      LIBS+= libeay32MT ssleay32MT
    endif
    LDIR+= $(OPENSSL_HOME)/lib/VC/static
107
  endif
108 109 110
else
  LIBS+= dl
endif