2011-07-18 06:59:48 +00:00
|
|
|
BDB_VERSION=5.1.25
|
|
|
|
BDB_DIST=db-$(BDB_VERSION).tar.gz
|
|
|
|
BDB_LOCAL_DIST=c_src/$(BDB_DIST)
|
|
|
|
BDB_LOCAL_LIB=c_src/system/lib/libdb.a
|
|
|
|
BDB_DIST_URL=http://download.oracle.com/berkeley-db/$(BDB_DIST)
|
2011-07-17 19:50:40 +00:00
|
|
|
|
2011-07-18 07:18:29 +00:00
|
|
|
ERL=erl
|
|
|
|
ERL_FLAGS=+A10
|
|
|
|
REBAR=./rebar
|
2011-07-18 06:59:48 +00:00
|
|
|
REBAR_FLAGS=
|
|
|
|
|
|
|
|
all: $(BDB_LOCAL_LIB)
|
2011-07-18 07:18:29 +00:00
|
|
|
ERL_FLAGS=$(ERL_FLAGS) $(REBAR) $(REBAR_FLAGS) compile eunit ct
|
2011-07-18 06:59:48 +00:00
|
|
|
|
|
|
|
$(BDB_LOCAL_DIST):
|
2011-07-18 07:18:29 +00:00
|
|
|
ERL_FLAGS=$(ERL_FLAGS) $(ERL) -noshell -s inets -eval 'httpc:request(get, {"$(BDB_DIST_URL)", []}, [], [{stream, "$(BDB_LOCAL_DIST)"}])' -s init stop
|
2011-07-18 06:59:48 +00:00
|
|
|
|
|
|
|
$(BDB_LOCAL_LIB): $(BDB_LOCAL_DIST)
|
2011-07-17 19:50:40 +00:00
|
|
|
c_src/buildlib.sh
|
|
|
|
clean:
|
2011-07-18 06:59:48 +00:00
|
|
|
$(REBAR) $(REBAR_FLAGS) clean
|
2011-07-18 11:47:57 +00:00
|
|
|
-rm test/*.beam
|
2011-07-17 19:50:40 +00:00
|
|
|
|
2011-07-18 06:59:48 +00:00
|
|
|
distclean: clean
|
|
|
|
-rm -rf $(BDB_LOCAL_DIST)
|
|
|
|
-rm -rf c_src/sources
|
|
|
|
-rm -rf priv
|
2011-07-18 07:28:38 +00:00
|
|
|
-rm -rf logs
|