Skip to content

Commit

Permalink
Merge pull request #4 from ocamllabs/byte-code-builds
Browse files Browse the repository at this point in the history
Support for byte-code-only builds
  • Loading branch information
yallop committed Dec 7, 2015
2 parents 6da68ee + c77617d commit 07739ee
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
25 changes: 20 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 8 additions & 2 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 07739ee

Please sign in to comment.