diff --git a/aebytecode.app b/aebytecode.app new file mode 100644 index 0000000..ed2c764 --- /dev/null +++ b/aebytecode.app @@ -0,0 +1,15 @@ +{application,aebytecode, + [{description,"A library and stand alone assembler for aeternity bytecode. This version supports AEVM bytecode and FATE bytecode."}, + {registered,[]}, + {included_applications,[]}, + {applications,[stdlib,kernel]}, + {vsn,"3.2.0"}, + {modules,[aeb_fate_code_tests,aeb_fate_data_tests, + aeb_fate_encoding_tests,aefate_code_eqc,aefate_eqc, + aefate_type_eqc,aeb_aevm_abi,aeb_aevm_data,aeb_asm, + aeb_disassemble,aeb_fate_abi,aeb_fate_asm, + aeb_fate_code,aeb_fate_data,aeb_fate_encoding, + aeb_fate_generate_docs,aeb_fate_generate_ops, + aeb_fate_maps,aeb_heap,aeb_memory,aeb_opcodes, + aeb_primops,aefateasm,aeb_data_test,aeb_fate_asm_test, + aeb_serialize_test,aebytecode_SUITE]}]}. diff --git a/src/aeb_asm.erl b/src/aeb_asm.erl index d463835..d176028 100644 --- a/src/aeb_asm.erl +++ b/src/aeb_asm.erl @@ -35,7 +35,7 @@ , to_hexstring/1 ]). --include_lib("aebytecode/include/aeb_opcodes.hrl"). +-include("aeb_opcodes.hrl"). pp(Asm) -> diff --git a/src/aeb_disassemble.erl b/src/aeb_disassemble.erl index 621fa7d..ea7e2d0 100644 --- a/src/aeb_disassemble.erl +++ b/src/aeb_disassemble.erl @@ -13,7 +13,7 @@ format_address/1 ]). --include_lib("aebytecode/include/aeb_opcodes.hrl"). +-include("aeb_opcodes.hrl"). pp(Binary) -> diff --git a/src/aeb_fate_abi.erl b/src/aeb_fate_abi.erl index 6bbc7ad..42b794b 100644 --- a/src/aeb_fate_abi.erl +++ b/src/aeb_fate_abi.erl @@ -16,7 +16,7 @@ , get_function_type_from_function_hash/2 , abi_version/0 ]). --include("../include/aeb_fate_data.hrl"). +-include("aeb_fate_data.hrl"). %%%=================================================================== %%% API diff --git a/src/aeb_fate_asm.erl b/src/aeb_fate_asm.erl index e53b225..e9eafce 100644 --- a/src/aeb_fate_asm.erl +++ b/src/aeb_fate_asm.erl @@ -94,8 +94,8 @@ , to_asm/1 ]). --include_lib("aebytecode/include/aeb_fate_opcodes.hrl"). --include_lib("aebytecode/include/aeb_fate_data.hrl"). +-include("aeb_fate_opcodes.hrl"). +-include("aeb_fate_data.hrl"). -define(HASH_BYTES, 32). assemble_file(InFile, OutFile, Options) -> diff --git a/src/aeb_fate_code.erl b/src/aeb_fate_code.erl index c3c2003..164537b 100644 --- a/src/aeb_fate_code.erl +++ b/src/aeb_fate_code.erl @@ -24,8 +24,8 @@ , symbols/1 ]). --include("../include/aeb_fate_opcodes.hrl"). --include("../include/aeb_fate_data.hrl"). +-include("aeb_fate_opcodes.hrl"). +-include("aeb_fate_data.hrl"). -export([ update_annotations/2 , update_functions/2 diff --git a/src/aeb_heap.erl b/src/aeb_heap.erl index 92024ab..d2815a3 100644 --- a/src/aeb_heap.erl +++ b/src/aeb_heap.erl @@ -22,8 +22,8 @@ -export_type([binary_value/0, heap_value/0, offset/0, heap_fragment/0]). --include_lib("aebytecode/include/aeb_typerep_def.hrl"). --include_lib("aebytecode/include/aeb_heap.hrl"). +-include("aeb_typerep_def.hrl"). +-include("aeb_heap.hrl"). -type word() :: non_neg_integer(). -type pointer() :: word(). diff --git a/src/aeb_opcodes.erl b/src/aeb_opcodes.erl index 4422bae..63999fe 100644 --- a/src/aeb_opcodes.erl +++ b/src/aeb_opcodes.erl @@ -17,7 +17,7 @@ , swap/1 ]). --include_lib("aebytecode/include/aeb_opcodes.hrl"). +-include("aeb_opcodes.hrl"). %%==================================================================== diff --git a/zomp_prep b/zomp_prep new file mode 100755 index 0000000..b8c411b --- /dev/null +++ b/zomp_prep @@ -0,0 +1,18 @@ +#! /bin/bash + +# This is a small pre-packaging source generation and include correction script that should be +# run before packaging this project for use with ZX/Zomp. + +rm -rf _build +rm -f src/aeb_fate_opcodes.erl src/aeb_fate_ops.erl include/aeb_fate_opcodes.hrl src/aeb_fate_asm_scan.xrl src/aeb_fate_pp.erl +make sources +cd src +for f in $(ls --ignore=aeb_fate_generate_ops.erl | grep erl) +do + echo "Updating includes in: $f" + sed -i 's/aebytecode\/include\///g' "$f" + sed -i 's/\.\.\/include\///g' "$f" + sed -i 's/include_lib/include/g' "$f" +done +rm -f ebin/*.beam +cp aebytecode.app ebin/