| 1 |
# |
| 2 |
# WARNING: do not run this directly, it should be run by the main Makefile |
| 3 |
|
| 4 |
include ../../Makefile.defs |
| 5 |
auto_gen= |
| 6 |
NAME=erlang.so |
| 7 |
|
| 8 |
ERLANG=$(shell which erl) |
| 9 |
|
| 10 |
ifneq ($(ERLANG),) |
| 11 |
ERLANG_LIBDIR=$(shell $(ERLANG) -noshell -eval 'io:format("~n~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1) |
| 12 |
ERLANG_INCDIR=$(shell $(ERLANG) -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1) |
| 13 |
endif |
| 14 |
|
| 15 |
ifeq ($(ERLANG_LIBDIR)$(ERLANG_INCDIR),) |
| 16 |
$(error Not found Erlang) |
| 17 |
endif |
| 18 |
|
| 19 |
LIBS=-L$(ERLANG_LIBDIR) -lei -lpthread |
| 20 |
|
| 21 |
DEFS+=-I$(ERLANG_INCDIR) |
| 22 |
DEFS+=-D_REENTRANT |
| 23 |
|
| 24 |
|
| 25 |
include ../../Makefile.modules |
| 26 |
|