X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=lib%2FMakefile.am;fp=lib%2FMakefile.am;h=747f074ad1770145674a28f08ea384fe2ea67720;hp=2a42d1eb422ddd134d75258ba95004a636d45c2a;hb=8582d10e7b131ffbfe1d92352e7df39230ce1124;hpb=cb8bbd5621366d5adc82e59bff62bd8cc50d8e85 diff --git a/lib/Makefile.am b/lib/Makefile.am index 2a42d1e..747f074 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -20,6 +20,10 @@ EXTRA_DIST = whenproto.x pa_when.ml $(SOURCES) libwhenjobsdir = $(libdir)/$(PACKAGE_NAME) libwhenjobs_SCRIPTS = whenlib.cma pa_when.cmo $(CMI_FILES) +if HAVE_OCAMLOPT +libwhenjobs_SCRIPTS += whenlib.cmxa +endif + OCAMLPACKAGES = -package unix,num,camlp4.lib,calendar,rpc OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX $(OCAMLPACKAGES) @@ -66,6 +70,8 @@ OBJECTS = \ whentools.cmo \ whenlock.cmo +XOBJECTS = $(OBJECTS:.cmo=.cmx) + # Library. noinst_LIBRARIES = liblibrary.a liblibrary_a_SOURCES = flock.c @@ -74,6 +80,9 @@ liblibrary_a_CFLAGS = -I$(shell $(OCAMLC) -where) whenlib.cma: $(OBJECTS) liblibrary.a $(OCAMLFIND) c -a $(OCAMLCFLAGS) $(OBJECTS) -cclib -llibrary -o $@ +whenlib.cmxa: $(XOBJECTS) liblibrary.a + $(OCAMLFIND) opt -a $(OCAMLOPTFLAGS) $(XOBJECTS) -cclib -llibrary -o $@ + whenproto_aux.ml whenproto_aux.mli: whenproto.x $(OCAMLRPCGEN) -int int32 -hyper int64 -aux $<