diff options
-rw-r--r-- | p2pvr/Jamfile.jam | 18 | ||||
-rw-r--r-- | p2pvr/embedSql.m4 | 19 |
2 files changed, 22 insertions, 15 deletions
diff --git a/p2pvr/Jamfile.jam b/p2pvr/Jamfile.jam index 6851a3c..07e533a 100644 --- a/p2pvr/Jamfile.jam +++ b/p2pvr/Jamfile.jam @@ -45,23 +45,11 @@ type.register SQL : sql ; generators.register-standard sql.embed.asm : SQL : ASM ; +path-constant root : . ; + actions sql.embed.asm { - echo ".section .rodata - .global sql_$(2:B)_start - .type sql_$(2:B)_start, @object -sql_$(2:B)_start: - .incbin \"$(2)\" - - .global sql_$(2:B)_end - .type sql_$(2:B)_end, @object -sql_$(2:B)_end: - .byte 0 - - .global sql_$(2:B)_len - .type sql_$(2:B)_len, @object -sql_$(2:B)_len: - .int sql_$(2:B)_end - sql_$(2:B)_start" > $(1) + m4 -DNAME="sql_$(2:B)" -DPATH="$(2)" "$(root)/embedSql.m4" > "$(1)" } IMPORT $(__name__) : sql.embed.asm : : sql.embed.asm ; diff --git a/p2pvr/embedSql.m4 b/p2pvr/embedSql.m4 new file mode 100644 index 0000000..d94ee7c --- /dev/null +++ b/p2pvr/embedSql.m4 @@ -0,0 +1,19 @@ +define(`start', NAME`_start') +define(`end', NAME`_end') +define(`len', NAME`_len') +.section .rodata + .global start + .type start, @object +start: + .incbin "PATH" + + .global end + .type end, @object +end: + .byte 0 + + .global len + .type len, @object +len: + .int end - start + |