]> matita.cs.unibo.it Git - helm.git/commitdiff
added Makefiles
authorStefano Zacchiroli <zack@upsilon.cc>
Wed, 25 Dec 2002 20:51:38 +0000 (20:51 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Wed, 25 Dec 2002 20:51:38 +0000 (20:51 +0000)
helm/http_getter/.cvsignore
helm/http_getter/Makefile [new file with mode: 0644]
helm/http_getter/Makefile.overrides [new file with mode: 0644]

index 060f87336122af44562ecc7422fbac98ce69443e..f40ca5e6087e75960ea359864d126bb04b427f93 100644 (file)
@@ -1,4 +1,4 @@
-Makefile configure config.log config.cache config.status http_getter.pl helm_http_getter.spec
+configure config.log config.cache config.status http_getter.pl helm_http_getter.spec
 *.cmi
 *.cmo
 *.cma
diff --git a/helm/http_getter/Makefile b/helm/http_getter/Makefile
new file mode 100644 (file)
index 0000000..c824727
--- /dev/null
@@ -0,0 +1,58 @@
+VERSION = 0.2.0
+NAME = http_getter
+DISTDIR = http-getter-$(VERSION)
+REQUIRES = http dbm pcre netclient pxp shell threads zip
+COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
+OCAMLC = ocamlfind ocamlc $(COMMONOPTS)
+OCAMLOPT = ocamlfind ocamlopt $(COMMONOPTS)
+OCAMLDEP = ocamlfind ocamldep $(COMMONOPTS)
+MODULES =      \
+       threadSafe      \
+       http_getter_types http_getter_misc http_getter_env              \
+       http_getter_const http_getter_common http_getter_map    \
+       http_getter_cache
+
+OBJS = $(patsubst %,%.cmo,$(MODULES))
+OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
+
+all: byte
+byte: $(NAME)
+opt: $(NAME).opt
+world: byte opt
+
+include .depend
+depend:
+       $(OCAMLDEP) *.ml *.mli > .depend
+
+%.cmi: %.mli
+       $(OCAMLC) -c $<
+%.cmo: %.ml %.cmi
+       $(OCAMLC) -c $<
+%.cmx: %.ml %.cmi
+       $(OCAMLOPT) -c $<
+include Makefile.overrides
+$(NAME).cmo: $(NAME).ml
+       $(OCAMLC) -c $<
+$(NAME).cmx: $(NAME).ml
+       $(OCAMLOPT) -c $<
+$(NAME): $(OBJS) $(NAME).ml
+       $(OCAMLC) -linkpkg -thread -o $@ $^
+$(NAME).opt: $(OBJSOPT) $(NAME).ml
+       $(OCAMLOPT) -linkpkg -thread -o $@ $^
+
+distclean: clean
+clean:
+       rm -f *.cm[aiox] *.o $(NAME){,.opt}
+dist: distclean depend
+       mkdir $(DISTDIR)/
+       cp      \
+               $(patsubst %, %.ml, $(MODULES)) \
+               $(patsubst %, %.mli, $(MODULES))        \
+               $(NAME).ml      \
+               Makefile .depend        \
+               $(DISTDIR)/
+       tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
+       rm -rf $(DISTDIR)/
+
+.PHONY: all byte opt world depend clean
+
diff --git a/helm/http_getter/Makefile.overrides b/helm/http_getter/Makefile.overrides
new file mode 100644 (file)
index 0000000..4b669eb
--- /dev/null
@@ -0,0 +1,2 @@
+http_getter_types.cmi http_getter_types.cmo: http_getter_types.ml
+       $(OCAMLC) -c $<