Skip to content

Commit

Permalink
erlang: fix Makefile problem
Browse files Browse the repository at this point in the history
Read from Erlang shell include and library path.
  • Loading branch information
seudin committed May 25, 2015
1 parent d46f3f6 commit 01f4a23
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modules/erlang/Makefile
Expand Up @@ -5,12 +5,20 @@ include ../../Makefile.defs
auto_gen=
NAME=erlang.so

LIBS=-L$(LOCALBASE)/lib/erlang/usr/lib -lei -lpthread
ERLANG=$(shell which erl)

ifneq ($(ERLANG),)
ERLANG_LIBDIR=$(shell $(ERLANG) -noshell -eval 'io:format("~n~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1)
ERLANG_INCDIR=$(shell $(ERLANG) -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1)
else
$(error Not found Erlang)
endif
LIBS=-L$(ERLANG_LIBDIR) -lei -lpthread

SERLIBPATH=../../lib
SER_LIBS+=$(SERLIBPATH)/kcore/kcore

DEFS+=-I/usr/local/lib/erlang/usr/include
DEFS+=-I$(ERLANG_INCDIR)
DEFS+=-DKAMAILIO_MOD_INTERFACE -D_REENTRANT


Expand Down

0 comments on commit 01f4a23

Please sign in to comment.