diff --git a/Makefile b/Makefile index 8bab311..f945046 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,31 @@ SOURCES=higher.mli higher.ml RESULT=higher -LIBINSTALL_FILES := higher.mli higher.cmi \ - higher.cma \ - higher.cmx higher.cmxa higher.a +OCAMLFLAGS += $(shell ocamlc -bin-annot 2>/dev/null && echo -bin-annot) + +LIBINSTALL_FILES := higher.mli higher.cmi higher.cma +LIBINSTALL_OPTIONAL_FILES := higher.cmt higher.cmti +NATIVE_LIBINSTALL_FILES := higher.cmx higher.cmxa higher.a all: byte-code-library native-code-library +meta-install: + $(OCAMLFIND) install higher META + +byte-code-lib-install: byte-code-library + ocamlfind install -add higher $(LIBINSTALL_FILES) \ + -optional $(LIBINSTALL_OPTIONAL_FILES) + examples-install: ocamlfind install -add higher examples/* -install: libinstall examples-install -uninstall: libuninstall +native-lib-install: native-code-library + ocamlfind install -add higher $(NATIVE_LIBINSTALL_FILES) + +byte-code-install: meta-install byte-code-lib-install examples-install +native-install: byte-code-install native-lib-install +install: native-install +uninstall: + $(OCAMLFIND) remove higher include $(OCAMLMAKEFILE) diff --git a/opam b/opam index af8fc66..6261b2a 100644 --- a/opam +++ b/opam @@ -5,8 +5,14 @@ homepage: "https://github.com/ocamllabs/higher" bug-reports: "https://github.com/ocamllabs/higher/issues" dev-repo: "https://github.com/ocamllabs/higher.git" license: "MIT" -build: [[make]] -install: [[make "install"]] +build: [ + [make] {ocaml-native} + [make "bcl"] {!ocaml-native} +] +install: [ + [make "native-install"] {ocaml-native} + [make "byte-code-install"] {!ocaml-native} +] remove: [["ocamlfind" "remove" "higher"]] depends: [ "ocamlfind" ] tags: ["org:ocamllabs"]