git.annexia.org
/
whenjobs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable native code compilation when ocamlopt is available.
[whenjobs.git]
/
tools
/
Makefile.am
diff --git
a/tools/Makefile.am
b/tools/Makefile.am
index
bbb5fa8
..
e7e4676
100644
(file)
--- a/
tools/Makefile.am
+++ b/
tools/Makefile.am
@@
-39,6
+39,8
@@
OBJECTS = \
whenproto_clnt.cmo \
whenjobs.cmo
whenproto_clnt.cmo \
whenjobs.cmo
+XOBJECTS = $(OBJECTS:.cmo=.cmx)
+
libdir.ml: Makefile
rm -f $@ $@-t
echo 'let libdir = "$(libdir)/$(PACKAGE_NAME)"' > $@-t
libdir.ml: Makefile
rm -f $@ $@-t
echo 'let libdir = "$(libdir)/$(PACKAGE_NAME)"' > $@-t
@@
-50,9
+52,15
@@
whenproto_clnt.ml whenproto_clnt.mli: whenproto.x
whenproto.x: ../lib/whenproto.x
ln -f $< $@
whenproto.x: ../lib/whenproto.x
ln -f $< $@
+if HAVE_OCAMLOPT
+whenjobs: ../lib/whenlib.cmxa $(XOBJECTS)
+ $(OCAMLFIND) opt $(OCAMLCFLAGS) -ccopt -L../lib \
+ -linkpkg whenlib.cmxa $(XOBJECTS) -o $@
+else
whenjobs: ../lib/whenlib.cma $(OBJECTS)
whenjobs: ../lib/whenlib.cma $(OBJECTS)
- $(OCAMLFIND)
ocaml
c -custom $(OCAMLCFLAGS) -ccopt -L../lib \
+ $(OCAMLFIND) c -custom $(OCAMLCFLAGS) -ccopt -L../lib \
-linkpkg whenlib.cma $(OBJECTS) -o $@
-linkpkg whenlib.cma $(OBJECTS) -o $@
+endif
# Rules for all OCaml files.
%.cmi: %.mli ../lib/whenlib.cma
# Rules for all OCaml files.
%.cmi: %.mli ../lib/whenlib.cma