Skip to content

Commit

Permalink
Use ocamlbuild ocamlfind support
Browse files Browse the repository at this point in the history
  • Loading branch information
glondu committed Aug 20, 2020
1 parent 650526a commit d84a1cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
LIB := -package threads,netstring,calendar,extlib,postgresql,eliom.server,lwt_ppx
CAMLC := ocamlfind ocamlc -thread -g $(LIB)
CAMLOPT := ocamlfind ocamlopt -thread $(LIB)
CAMLDOC := ocamlfind ocamldoc $(LIB)
CAMLDEP := ocamlfind ocamldep $(LIB)
CAMLBUILDOPTS := -ocamlc '$(CAMLC)' -ocamlopt '$(CAMLOPT)' -ocamldep '$(CAMLDEP)'
CAMLBUILD := ocamlbuild $(CAMLBUILDOPTS)
CAMLBUILD := ocamlbuild -use-ocamlfind -classic-display

CMA := src/nurpawiki.cma
CMXA := src/nurpawiki.cmxa
Expand All @@ -23,13 +17,13 @@ endif
all: $(TARGETS) META

$(CMA): src/version.ml
$(CAMLBUILD) -classic-display -ocamlc '$(CAMLC)' $@
$(CAMLBUILD) $@

$(CMXA): src/version.ml
$(CAMLBUILD) -classic-display -ocamlopt '$(CAMLOPT)' $@
$(CAMLBUILD) $@

%.cmxs: %.cmxa
$(CAMLOPT) -shared -linkall -o _build/$@ _build/$<
$(CMXS): src/version.ml
$(CAMLBUILD) $@

NWIKI_VER=$(shell cat VERSION)

Expand Down
1 change: 1 addition & 0 deletions _tags
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"src": include
<src/*>: thread, package(threads), package(netstring), package(calendar), package(extlib), package(postgresql), package(eliom.server), package(lwt_ppx)
<src/*.cmx>: for-pack(Nurpawiki)
<src/nurpawiki.cmx>: -for-pack(Nurpawiki)

0 comments on commit d84a1cf

Please sign in to comment.