logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

gen.lua (1350B)


  1. cflags{
  2. '-Wall', '-Wpedantic',
  3. '-D HAVE_ENDIAN_H',
  4. '-I $outdir/include',
  5. }
  6. build('sed', '$outdir/include/cbor/configuration.h', '$srcdir/src/cbor/configuration.h.in', {
  7. expr={
  8. [[-e 's,$${CBOR_VERSION_MAJOR},0,']],
  9. [[-e 's,$${CBOR_VERSION_MINOR},9,']],
  10. [[-e 's,$${CBOR_VERSION_PATCH},0,']],
  11. [[-e 's,$${CBOR_BUFFER_GROWTH},2,']],
  12. [[-e 's,$${CBOR_MAX_STACK_SIZE},2048,']],
  13. [[-e 's,$${CBOR_RESTRICT_SPECIFIER},restrict,']],
  14. [[-e 's,$${CBOR_INLINE_SPECIFIER},inline,']],
  15. '-e /CBOR_CUSTOM_ALLOC/d',
  16. '-e /CBOR_PRETTY_PRINTER/d',
  17. },
  18. })
  19. pkg.hdrs = {
  20. copy('$outdir/include', '$srcdir/src', {
  21. 'cbor.h',
  22. 'cbor/arrays.h',
  23. 'cbor/bytestrings.h',
  24. 'cbor/callbacks.h',
  25. 'cbor/common.h',
  26. 'cbor/data.h',
  27. 'cbor/encoding.h',
  28. 'cbor/floats_ctrls.h',
  29. 'cbor/ints.h',
  30. 'cbor/maps.h',
  31. 'cbor/serialization.h',
  32. 'cbor/streaming.h',
  33. 'cbor/strings.h',
  34. 'cbor/tags.h',
  35. }),
  36. copy('$outdir/include/cbor', '$dir', {'cbor_export.h'}),
  37. '$outdir/include/cbor/configuration.h',
  38. }
  39. pkg.deps = {'$gendir/headers'}
  40. lib('libcbor.a', [[
  41. src/cbor.c
  42. src/cbor/(
  43. streaming.c
  44. internal/(
  45. encoders.c
  46. builder_callbacks.c
  47. loaders.c
  48. memory_utils.c
  49. stack.c
  50. unicode.c
  51. )
  52. encoding.c
  53. serialization.c
  54. arrays.c
  55. common.c
  56. floats_ctrls.c
  57. bytestrings.c
  58. callbacks.c
  59. strings.c
  60. maps.c
  61. tags.c
  62. ints.c
  63. )
  64. ]])
  65. fetch 'git'