6 .PRECIOUS
: %.cmx
%.cmo
%.cmi
7 .SUFFIXES
: .ml .mli .cmx .cmi .cmo
9 OCBYTE
= @OCAMLC@
-thread
10 OCOPT
= @OCAMLOPT@
-thread
14 LFLAGS
= -g
-I ..
-ccopt
-L..
16 OCURLLIB
= curl.cma unix.cma threads.cma
17 OCURLOPTLIB
= curl.cmxa unix.cmxa threads.cmxa
19 LWT_UNIX
=@OCAML_PKG_lwt_unix@
20 LWT_PPX
=@OCAML_PKG_lwt_ppx@
22 TARGETS
= ocurl ominimal ossl ocurl_test_threads opar test_cb_exn test_memory_leaks
23 ifneq (@OCAML_PKG_bytes@
,no
)
26 ifneq ($(LWT_UNIX
),no
)
27 TARGETS
+= test_lwt_unit
33 ifeq (@OCAMLBEST@
,opt
)
34 TARGETS
+= ocurl.opt ominimal.opt ossl.opt ocurl_test_threads.opt opar.opt test_cb_exn.opt test_memory_leaks.opt
35 ifneq (@OCAML_PKG_bytes@
,no
)
38 ifneq ($(LWT_UNIX
),no
)
39 TARGETS
+= test_lwt_unit.opt
41 TARGETS
+= test_lwt.opt
48 test_lwt
: ..
/curl.cma ..
/curl_lwt.cmo test_lwt.ml
49 $(FINDLIB
) c
-custom
-linkpkg
-package
$(LWT_UNIX
),$(LWT_PPX
) $(LFLAGS
) $^
-o
$@
51 test_lwt.opt
: ..
/curl.cmxa ..
/curl_lwt.cmx test_lwt.ml
52 $(FINDLIB
) opt
-linkpkg
-package
$(LWT_UNIX
),$(LWT_PPX
) $(LFLAGS
) $^
-o
$@
54 test_lwt_unit
: ..
/curl.cma ..
/curl_lwt.cmo test_lwt_unit.ml
55 $(FINDLIB
) c
-custom
-linkpkg
-package
$(LWT_UNIX
) $(LFLAGS
) $^
-o
$@
57 test_lwt_unit.opt
: ..
/curl.cmxa ..
/curl_lwt.cmx test_lwt_unit.ml
58 $(FINDLIB
) opt
-linkpkg
-package
$(LWT_UNIX
) $(LFLAGS
) $^
-o
$@
60 oput
: ..
/curl.cma oput.ml
61 $(FINDLIB
) c
-custom
-package bytes
,unix
-linkpkg
$(LFLAGS
) $^
-o
$@
63 oput.opt
: ..
/curl.cmxa oput.ml
64 $(FINDLIB
) opt
-package bytes
,unix
-linkpkg
$(LFLAGS
) $^
-o
$@
67 $(OCBYTE
) -custom
$(LFLAGS
) $(OCURLLIB
) $< -o
$@
69 %.opt
: %.cmx ..
/curl.cmxa
70 $(OCOPT
) $(LFLAGS
) $(OCURLOPTLIB
) $< -o
$@
73 $(OCOPT
) -c
$(FLAGS
) $< -o
$@
76 $(OCBYTE
) -c
$(FLAGS
) $< -o
$@
79 $(OCBYTE
) -c
$(FLAGS
) $< -o
$@
82 @
rm -f
$(TARGETS
) *.cm
* *.o
*.a