configure: check for recent enough libcurl multi API (closes #7)
[ocurl.git] / examples / Makefile.in
blob678ba11f9c884e72965655b6bdd5b075f00b0b56
1 ###
2 ### @configure_input@
3 ###
5 .PHONY: clean
6 .PRECIOUS: %.cmx %.cmo %.cmi
7 .SUFFIXES: .ml .mli .cmx .cmi .cmo
9 OCBYTE = @OCAMLC@ -thread
10 OCOPT = @OCAMLOPT@ -thread
11 FINDLIB = @OCAMLFIND@
13 FLAGS = -g -I ..
14 LFLAGS = -g -I .. -ccopt -L..
16 OCURLLIB = curl.cma unix.cma threads.cma
17 OCURLOPTLIB = curl.cmxa unix.cmxa threads.cmxa
19 TARGETS = ocurl oput ominimal ossl ocurl_test_threads opar test_cb_exn
20 ifneq (@OCAML_PKG_lwt@,no)
21 TARGETS += test_lwt test_lwt_unit
22 endif
24 ifeq (@OCAMLBEST@,opt)
25 TARGETS += ocurl.opt oput.opt ominimal.opt ossl.opt ocurl_test_threads.opt opar.opt test_cb_exn.opt
26 ifneq (@OCAML_PKG_lwt@,no)
27 TARGETS += test_lwt.opt test_lwt_unit.opt
28 endif
29 endif
31 all: $(TARGETS)
33 FINDLIB_LWT_FLAGS=-linkpkg -syntax camlp4o -package lwt.unix,lwt.syntax
35 test_lwt: ../curl.cma ../curl_lwt.cmo test_lwt.ml
36 $(FINDLIB) c -custom $(FINDLIB_LWT_FLAGS) $(LFLAGS) $^ -o $@
38 test_lwt.opt: ../curl.cmxa ../curl_lwt.cmx test_lwt.ml
39 $(FINDLIB) opt $(FINDLIB_LWT_FLAGS) $(LFLAGS) $^ -o $@
41 test_lwt_unit: ../curl.cma ../curl_lwt.cmo test_lwt_unit.ml
42 $(FINDLIB) c -custom $(FINDLIB_LWT_FLAGS) $(LFLAGS) $^ -o $@
44 test_lwt_unit.opt: ../curl.cmxa ../curl_lwt.cmx test_lwt_unit.ml
45 $(FINDLIB) opt $(FINDLIB_LWT_FLAGS) $(LFLAGS) $^ -o $@
47 %: %.cmo ../curl.cma
48 $(OCBYTE) -custom $(LFLAGS) $(OCURLLIB) $< -o $@
50 %.opt: %.cmx ../curl.cmxa
51 $(OCOPT) $(LFLAGS) $(OCURLOPTLIB) $< -o $@
53 .ml.cmx:
54 $(OCOPT) -c $(FLAGS) $< -o $@
56 .mli.cmi:
57 $(OCBYTE) -c $(FLAGS) $< -o $@
59 .ml.cmo:
60 $(OCBYTE) -c $(FLAGS) $< -o $@
62 clean:
63 @rm -f $(TARGETS) *.cm* *.o *.a