gmbytecode/Makefile
Erik Stenman 8fc929b1ee
Pt 164259596 generate fate ops (#9)
* Generate code for fate ops from spec.

* Generate the code from the makefile. Remove generated files.

* Test targets and cleanup.

* Spell eunit the right way.

* Use test target for ci.

* Renumber opcodes. Add primops.

* Generate tokens in scanner from definitions.

* Rename NUMBER op to GENERATION and add MICROBLOCK instruction.
2019-02-28 11:24:13 +01:00

42 lines
817 B
Makefile

REBAR ?= rebar3
all: local
local: src/aeb_fate_opcodes.erl src/aeb_fate_code.erl include/aeb_fate_opcodes.hrl src/aeb_fate_asm_scan.xrl
@$(REBAR) as local release
console: local
@$(REBAR) as local shell
clean:
@$(REBAR) clean
rm -f src/aeb_fate_opcodes.erl
rm -f src/aeb_fate_code.erl
rm -f include/aeb_fate_opcodes.hrl
dialyzer: local
@$(REBAR) as local dialyzer
distclean: clean
@rm -rf _build/
eunit: local
@$(REBAR) as local eunit
test: local
@$(REBAR) as local eunit
ebin/aeb_fate_generate_ops.beam: src/aeb_fate_generate_ops.erl ebin
erlc -o $(dir $@) $<
src/aeb_fate_opcodes.erl src/aeb_fate_code.erl include/aeb_fate_opcodes.hrl src/aeb_fate_asm_scan.xrl: ebin/aeb_fate_generate_ops.beam
erl -pa ebin/ -noshell -s aeb_fate_generate_ops gen_and_halt src/ include/
ebin:
mkdir ebin