-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit is mostly dedicated to build pains
- Loading branch information
1 parent
5a6ccd2
commit b429ac8
Showing
6 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,33 @@ | ||
ROOT := $(shell pwd) | ||
PACKAGES := ctypes.foreign,uri | ||
CCLIB := libgit2.0.22.0.dylib | ||
SRC := git.ml | ||
|
||
.PHONY:clean git_test build_libgit | ||
.PHONY: clean | ||
|
||
git_test: | ||
ocamlfind ocamlopt -package $(PACKAGES) -cclib $(CCLIB) \ | ||
-linkpkg $(SRC) -o $@ | ||
./$@ | ||
native:libgit set_meta | ||
ocamlfind ocamlopt -package $(PACKAGES) \ | ||
-cclib `ocamlfind query ocaml-libgit2`/$(CCLIB) -linkpkg $(SRC) -o Git_test | ||
|
||
build_libgit: | ||
libgit: | ||
@echo "Updating libgit2 itself" | ||
git submodule update --remote | ||
mkdir libgit2/build | ||
cmake libgit2 | ||
cmake --build libgit2/build/ | ||
ocamlfind install ocaml-libgit2 META | ||
# The trick is the ; since cd is done in a separate shell | ||
cd `ocamlfind query ocaml-libgit2`; \ | ||
cmake $(ROOT)/libgit2 -DBUILD_CLAR=OFF; \ | ||
cmake --build .; \ | ||
find . -not -name "*.dylib" -not -name "META" -delete | ||
|
||
set_meta: | ||
#Need something better | ||
echo "linkopts = \"-cclib" `ocamlfind query ocaml-libgit2`/$(CCLIB)"\"" >> \ | ||
`ocamlfind query ocaml-libgit2`/META | ||
|
||
install: | ||
ocamlfind install ocaml-libgit2 -add git.cmo git.cmi git.cmt git.o git.cmx | ||
|
||
uninstall: | ||
ocamlfind remove ocaml-libgit2 | ||
clean: | ||
rm -rf *.cmi *.cmt *.cmx *.cmo *.o git_test libgit_gen_* | ||
rm -rf *.cmi *.cmt *.cmx *.cmo *.o git_test libgit_gen_* a.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
open Ctypes | ||
open Foreign | ||
|
||
|
||
module Common = struct | ||
|
||
let git_feature_t = typedef int64_t "git_feature_t" | ||
|
Submodule libgit2
updated
39 files
Binary file not shown.