Packages
exboost
0.3.5
0.3.9
0.3.8
0.3.7
retired
0.3.6
retired
0.3.5
retired
0.3.4
retired
0.3.3
retired
0.3.2
retired
0.3.1
retired
0.3.0
retired
0.2.9
retired
0.2.8
retired
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1-alpha.6
0.2.1-alpha.5
0.2.1-alpha.4
0.2.1-alpha.3
0.2.1-alpha.2
0.2.1-alpha
0.2.0
0.2.0-alpha
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.0
Provides an elixir wrapper for the C++ Boost library.
Retired package: Release invalid - Does not build properly on recent platforms
Current section
Files
Jump to
Current section
Files
Makefile
#
PRIV_DIR ?= priv
ifneq ($(MIX_APP_PATH),)
PRIV_DIR := $(MIX_APP_PATH)/priv
endif
NIF = $(PRIV_DIR)/libboostnif.so
ifeq ($(BOOSTINCLUDE),)
BOOSTINCLUDE := /usr/local/include
endif
ifeq ($(BOOSTLIB),)
ifneq ($(LD_LIBRARY_PATH),)
BOOSTLIB := $(dir $(foreach dir,$(subst :, ,$(LD_LIBRARY_PATH)),$(wildcard $(dir)/libboost_math_c99$(MT).a)))
else
BOOSTLIB := /usr/local/lib
endif
endif
ifeq ($(CC),)
CC := c++
endif
ERLANG_PATH = $(shell erl -eval 'io:format("~s", [lists:concat([code:root_dir(), "/erts-", erlang:system_info(version), "/include"])])' -s init stop -noshell)
CFLAGS = -I$(ERLANG_PATH) -I$(BOOSTINCLUDE) -fPIC -g -O3 -flto -mtune=generic -Wno-write-strings
LDFLAGS = -shared $(BOOSTLIB)/libboost_math_c99$(MT).a $(BOOSTLIB)/libboost_random$(MT).a
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
LDFLAGS += -undefined dynamic_lookup
endif
SRCS = priv/boostnif.c
OBJS = $(SRCS:.c=.o)
$(NIF): $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
.PHONY: clean
clean:
rm -f priv/*.o $(NIF)