From 470f76fb882156d88d2a8cc0555e078ba43b50c7 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 26 Jan 2013 17:04:42 +0000 Subject: [PATCH] add experimental obuild file, from vincenthz/obuild-files --- .gitignore | 1 + CHANGES | 1 + cstruct.obuild | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 cstruct.obuild diff --git a/.gitignore b/.gitignore index 3072415b..3fe45376 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ setup.data setup.log *.swp _build/ +dist/ diff --git a/CHANGES b/CHANGES index 3f7a95ad..aa526a4c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ 0.6.2 (trunk): +* Add experimental `cstruct.obuild` for the `obuild` build tool. * Use bounds checked version of all functions in the external interface. * Expose the `Cstruct.debug` to dump internal state of a buffer to a string. * Add `set_len` and `add_len` to manipulate the total-length field directly. diff --git a/cstruct.obuild b/cstruct.obuild new file mode 100644 index 00000000..b97f0b63 --- /dev/null +++ b/cstruct.obuild @@ -0,0 +1,37 @@ +name: cstruct +version: 0.6.2 +synopsis: manipulate external buffers as C-like structs +authors: Anil Madhavapeddy, Richard Mortier, Thomas Gazagnaire, Pierre Chambart +license: isc +obuild-ver: 1 + +library cstruct + path: lib/ + modules: cstruct + builddepends: bigarray, ocplib-endian, ocplib-endian.bigstring + cdir: lib/ + csources: cstruct_stubs.c + ccopt: -o3 + + sub lwt + path: lwt/ + builddepends: cstruct,lwt.unix + modules: lwt_cstruct + + sub unix + path: unix/ + builddepends: cstruct,unix + modules: unix_cstruct + + sub syntax + path: syntax + builddepends: camlp4.lib, camlp4.quotations.r, camlp4.extend + modules: pa_cstruct + syntax: true + pp: camlp4o + +example pcap + path: lib_test/ + main-is: pcap.ml + builddepends: cstruct.unix,cstruct.syntax + pp: camlp4o