Current section

Files

Jump to
exboost Makefile
Raw

Makefile

#
VPATH = ./priv
ifeq ($(BOOSTINCLUDE),)
BOOSTINCLUDE := /usr/local/include
endif
ifeq ($(BOOSTLIB),)
BOOSTLIB := /usr/local/lib
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 -undefined dynamic_lookup $(BOOSTLIB)/libboost_math_c99.a $(BOOSTLIB)/libboost_random.a
CC = g++
SRCS = boostnif.c
OBJS = $(SRCS:.c=.o)
priv/libboostnif.so: $(OBJS)
ls -la /app/.*
dpkg -l
dpkg -l boost
$(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
.PHONY: clean
clean:
rm -f priv/libboostnif.so