-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakedefs
32 lines (25 loc) · 832 Bytes
/
Makedefs
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
CC=gcc
CPP=g++
CFLAGS= -O0 -g -Wall
LDFLAGS=
ARCH := $(shell uname -m | tr -s " ")
KERNEL := $(shell uname -s | tr -s " ")
ifeq ($(ERL_ROOT),)
export ERL_ROOT=$(shell erl -noshell -eval 'io:format("~s~n", [code:root_dir()]), init:stop().')
endif
ifeq (,$(ERL_ROOT))
$(error "Unable to locate erlang root directory! Is erlang installed?")
endif
#Search ERL_ROOT for erl_interface
ERL_INTERFACE_ROOT = $(addprefix $(ERL_ROOT)/lib/, $(shell ls $(ERL_ROOT)/lib | grep erl_interface))
ERL_INTERFACE_INCLUDE = $(ERL_INTERFACE_ROOT)/include
ERL_INTERFACE_LIB = $(ERL_INTERFACE_ROOT)/lib
VERSION := 0.0.1
ifeq ($(PREFIX),)
export PREFIX=$(shell pwd)/build
endif
export INSTALL_DIR=$(PREFIX)
export SRC_DIR=$(INSTALL_DIR)/src
export LIB_DIR=$(INSTALL_DIR)/lib
export PRIV_DIR=$(INSTALL_DIR)/priv
export EBIN_DIR=$(INSTALL_DIR)/ebin