X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=APIs%2FMakefile.am;h=ce6d4b305fc2a04b89c0d3728f2ebff971cfd9f1;hb=e253e10f2d1c35bd685de8c4de993653f6a8330d;hp=0edf67d61058881c001080b65d6f083422af9028;hpb=dd0daf1a3b75447fe5d1317e2e65e027d10e7697;p=wrappi.git diff --git a/APIs/Makefile.am b/APIs/Makefile.am index 0edf67d..ce6d4b3 100644 --- a/APIs/Makefile.am +++ b/APIs/Makefile.am @@ -15,21 +15,35 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX +OCAMLCFLAGS = -g -warn-error CDEFLMPSUVYZX -I +camlp4 -I ../generator-lib OCAMLOPTFLAGS = $(OCAMLCFLAGS) PP = -pp '$(CAMLP4O) ../generator-macros/pa_wrap.cmo -impl' -#API_FILES = $(wildcard *.api) -API_FILES = mkdir.api mknod.api +API_FILES = $(wildcard *.api) -OBJ_FILES = $(patsubst %.api,%.cmo,$(API_FILES)) +OBJECTS = $(patsubst %.api,%.cmo,$(API_FILES)) -noinst_SCRIPTS = $(OBJ_FILES) +noinst_SCRIPTS = apis.cma -%.cmo: %.api +apis.cma: $(OBJECTS) ../generator-lib/generator_lib.cma + $(OCAMLFIND) ocamlc -linkall -a $(OBJECTS) -o apis.cma + +%.cmo: %.api ../generator-lib/generator_lib.cma ../generator-macros/pa_wrap.cmo $(OCAMLFIND) ocamlc $(OCAMLOPTFLAGS) $(PP) -impl $< -c -o $@ -CLEANFILES = *.cmi *.cmo *.cmx *~ +CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *~ + +depend: .depend + +.depend: $(API_FILES) + rm -f $@ $@-t + $(OCAMLFIND) ocamldep $(PP) -impl $^ | \ + $(SED) -e 's/ *$$//' | \ + $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ + LANG=C sort > $@-t + mv $@-t $@ + +include .depend SUFFIXES = .cmo .cmi .cmx .ml .mli .mll .mly .api