1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
# $Id$
#
#
# WARNING: do not run this directly, it should be run by the master Makefile
include ../../Makefile.defs
auto_gen=
NAME=app_lua.so
ifeq ($(CROSS_COMPILE),)
BUILDER = $(shell which lua-config)
endif
ifeq ($(BUILDER),)
ifeq ($(CROSS_COMPILE),)
BUILDER = $(shell which pkg-config)
endif
ifeq ($(BUILDER),)
LUA51 = $(shell ls $(LOCALBASE)/lib/liblua* | grep liblua5.1)
DEFS+=-I$(LOCALBASE)/include
LIBS+=-L$(LOCALBASE)/lib -lm
ifeq ($(LUA51),)
DEFS+=-I$(LOCALBASE)/include/lua
LIBS+=-llua
else
DEFS+=-I$(LOCALBASE)/include/lua5.1
LIBS+=-llua5.1
endif
else
LUAVER=XX
LUALIBS = $(shell pkg-config --silence-errors --libs lua-5.1)
ifeq ($(LUALIBS),)
LUALIBS = $(shell pkg-config --silence-errors --libs lua5.1)
ifeq ($(LUALIBS),)
LUALIBS = $(shell pkg-config --silence-errors --libs lua)
ifneq ($(LUALIBS),)
LUAVER=5X
endif
else
LUAVER=51
endif
else
LUAVER=51X
endif
ifeq ($(LUAVER),XX)
LUA51 = $(shell ls /usr/lib/liblua* | grep liblua5.1)
ifeq ($(LUA51),)
DEFS+=-I/usr/include/lua
LIBS= -llua -lm
else
DEFS+=-I/usr/include/lua5.1
LIBS= -llua5.1 -lm
endif
else
ifeq ($(LUAVER),51)
DEFS+= $(shell pkg-config --cflags lua5.1 | sed -e "s/\\\\/'/" -e "s/\\\\\"/\"'/")
LIBS = $(shell pkg-config --libs lua5.1)
else
ifeq ($(LUAVER),51X)
DEFS+= $(shell pkg-config --cflags lua-5.1)
LIBS = $(shell pkg-config --libs lua-5.1)
else
DEFS+= $(shell pkg-config --cflags lua)
LIBS = $(shell pkg-config --libs lua)
endif
endif
endif
endif
else
DEFS+= $(shell lua-config --include)
LIBS = $(shell lua-config --libs)
endif
DEFS+=-DKAMAILIO_MOD_INTERFACE
SERLIBPATH=../../lib
SER_LIBS+=$(SERLIBPATH)/kcore/kcore
include ../../Makefile.modules
|