-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fa5defb
Showing
12 changed files
with
1,403 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
erl_crash.dump | ||
ebin | ||
.eunit | ||
deps | ||
priv | ||
*.o | ||
*.beam | ||
*.plt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
REBAR = $(shell pwd)/rebar | ||
|
||
.PHONY: deps rel package | ||
|
||
all: deps compile | ||
|
||
compile: | ||
$(REBAR) compile | ||
|
||
deps: | ||
$(REBAR) get-deps | ||
|
||
clean: | ||
$(REBAR) clean | ||
|
||
distclean: clean | ||
$(REBAR) delete-deps | ||
|
||
test: all | ||
$(REBAR) skip_deps=true eunit | ||
|
||
### | ||
### Docs | ||
### | ||
docs: | ||
$(REBAR) skip_deps=true doc | ||
|
||
## | ||
## Developer targets | ||
## | ||
|
||
xref: | ||
$(REBAR) xref skip_deps=true | ||
|
||
console: all | ||
erl -pa ebin deps/*/ebin -s dhcp -config standalone.config | ||
|
||
|
||
## | ||
## Dialyzer | ||
## | ||
APPS = kernel stdlib sasl erts ssl tools os_mon runtime_tools crypto inets \ | ||
xmerl webtool snmp public_key mnesia eunit syntax_tools compiler | ||
COMBO_PLT = $(HOME)/.dhcp_combo_dialyzer_plt | ||
|
||
|
||
check_plt: deps compile | ||
dialyzer --check_plt --plt $(COMBO_PLT) --apps $(APPS) \ | ||
deps/*/ebin ebin | ||
|
||
build_plt: deps compile | ||
dialyzer --build_plt --output_plt $(COMBO_PLT) --apps $(APPS) \ | ||
deps/*/ebin ebin | ||
|
||
dialyzer: deps compile | ||
@echo | ||
@echo Use "'make check_plt'" to check PLT prior to using this target. | ||
@echo Use "'make build_plt'" to build PLT prior to using this target. | ||
@echo | ||
@sleep 1 | ||
dialyzer -Wno_return --plt $(COMBO_PLT) deps/*/ebin ebin | grep -v -f dialyzer.mittigate | ||
|
||
|
||
cleanplt: | ||
@echo | ||
@echo "Are you sure? It takes about 1/2 hour to re-build." | ||
@echo Deleting $(COMBO_PLT) in 5 seconds. | ||
@echo | ||
sleep 5 | ||
rm $(COMBO_PLT) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{lib_dirs, ["deps"]}. | ||
{erl_opts, [{parse_transform, lager_transform}, debug_info, warnings_as_errors]}. | ||
{deps, | ||
[ | ||
{lager, ".*", {git, "git://github.com/basho/lager.git", {tag, "1.2.2"}}} | ||
]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{application, dhcp, | ||
[ | ||
{description, ""}, | ||
{vsn, "0.1.0"}, | ||
{registered, []}, | ||
{applications, [ | ||
kernel, | ||
lager, | ||
stdlib | ||
]}, | ||
{mod, { dhcp_app, []}}, | ||
{env, []} | ||
]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-record(dhcp_package, | ||
{op = request, | ||
htype = unknown, | ||
hlen = 0, | ||
hops = 0, | ||
xid = 0, | ||
secs = 0, | ||
flags = [], | ||
ciaddr = 0, | ||
yiaddr = 0, | ||
siaddr = 0, | ||
giaddr = 0, | ||
chaddr = [], | ||
sname = <<>>, | ||
file = <<>>, | ||
options = [], | ||
message_type | ||
}). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-module(dhcp_app). | ||
|
||
-behaviour(application). | ||
|
||
%% Application callbacks | ||
-export([start/2, stop/1]). | ||
|
||
%% =================================================================== | ||
%% Application callbacks | ||
%% =================================================================== | ||
|
||
start(_StartType, _StartArgs) -> | ||
dhcp_sup:start_link(). | ||
|
||
stop(_State) -> | ||
ok. |
Oops, something went wrong.