########################################################################
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this file, to deal in the File without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the File, and to permit persons to whom the
# File is furnished to do so, subject to the following condition:
#
# THE FILE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE FILE OR
# THE USE OR OTHER DEALINGS IN THE FILE.

########################################################################
# The standard OMakefile.
# You will usually need to modify this file for your project.

########################################################################
# Phony targets are scoped, so you probably want to declare them first.
#

.PHONY: all clean test edoc dialyzer #install

########################################################################
# Subdirectories.
# You may want to include some subdirectories in this project.
# If so, define the subdirectory targets and uncomment this section.
#

.DEFAULT: msgpack.beam

msgpack.beam: msgpack.erl
	erlc -Wall +debug_info $<

msgpack.html: msgpack.erl
	erl -noshell -run edoc_run file $<

test: msgpack.beam
	erl -noshell -s msgpack test -s init stop

edoc: msgpack.erl
	erl -noshell -eval 'ok=edoc:files(["msgpack.erl"], [{dir, "edoc"}]).' -s init stop

dialyzer: msgpack.erl
	dialyzer --src $<

clean:
	-rm -f *.beam *.html
