]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
[json] Add omakefile for standalone builds
authorPrashanth Mundkur <prashanth.mundkur@citrix.com>
Fri, 3 Apr 2009 05:26:56 +0000 (22:26 -0700)
committerPrashanth Mundkur <prashanth.mundkur@citrix.com>
Fri, 3 Apr 2009 05:26:56 +0000 (22:26 -0700)
libs/json/OMakefile [new file with mode: 0644]
libs/json/OMakeroot [new file with mode: 0644]

diff --git a/libs/json/OMakefile b/libs/json/OMakefile
new file mode 100644 (file)
index 0000000..a629b5c
--- /dev/null
@@ -0,0 +1,36 @@
+.PHONY: clean
+
+OCAMLFLAGS += -dtypes
+
+JSON_FILES[] =
+       json
+       json_parse
+       base_conv
+
+LIB = json
+JSON_LIB = $(OCamlLibrary $(LIB), $(JSON_FILES))
+
+section
+       TEST_PARSER_PROG = test_parser
+       OCAML_LIBS += json
+       TEST_PARSER = $(OCamlProgram $(TEST_PARSER_PROG), test_parser $(JSON_FILES))
+       export TEST_PARSER
+
+section
+       GEN_FILES = parser.mli parser.ml lexer.ml
+       OCamlGeneratedFiles($(GEN_FILES))
+       CONV_FILES[] =
+               lexer
+               parser
+               syntax
+               codegen
+               jsonc
+
+       JSON_CONV_PROG = jsonc
+       JSON_CONV = $(OCamlProgram $(JSON_CONV_PROG), $(CONV_FILES))
+       export JSON_CONV
+
+.DEFAULT: $(JSON_LIB) $(TEST_PARSER) $(JSON_CONV)
+
+clean:
+    rm -f $(filter-proper-targets $(ls R, .)) *.annot *.cmo
diff --git a/libs/json/OMakeroot b/libs/json/OMakeroot
new file mode 100644 (file)
index 0000000..78ebe81
--- /dev/null
@@ -0,0 +1,12 @@
+open build/OCaml
+
+#
+# The command-line variables are defined *after* the
+# standard configuration has been loaded.
+#
+DefineCommandVars()
+
+#
+# Include the OMakefile in this directory.
+#
+.SUBDIRS: .