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 TARGETS
= ocurl ominimal ossl ocurl_test_threads opar test_cb_exn test_memory_leaks
20 ifneq (@OCAML_PKG_bytes@
,no
)
23 ifneq (@OCAML_PKG_lwt_unix@
,no
)
24 TARGETS
+= test_lwt_unit
25 ifneq (@OCAML_PKG_lwt_ppx@
,no
)
30 ifeq (@OCAMLBEST@
,opt
)
31 TARGETS
+= ocurl.opt ominimal.opt ossl.opt ocurl_test_threads.opt opar.opt test_cb_exn.opt test_memory_leaks.opt
32 ifneq (@OCAML_PKG_bytes@
,no
)
35 ifneq (@OCAML_PKG_lwt_unix@
,no
)
36 TARGETS
+= test_lwt_unit.opt
37 ifneq (@OCAML_PKG_lwt_ppx@
,no
)
38 TARGETS
+= test_lwt.opt
45 FINDLIB_LWT_FLAGS
=-linkpkg
-package lwt.unix
,lwt.ppx
47 test_lwt
: ..
/curl.cma ..
/curl_lwt.cmo test_lwt.ml
48 $(FINDLIB
) c
-custom
$(FINDLIB_LWT_FLAGS
) $(LFLAGS
) $^
-o
$@
50 test_lwt.opt
: ..
/curl.cmxa ..
/curl_lwt.cmx test_lwt.ml
51 $(FINDLIB
) opt
$(FINDLIB_LWT_FLAGS
) $(LFLAGS
) $^
-o
$@
53 test_lwt_unit
: ..
/curl.cma ..
/curl_lwt.cmo test_lwt_unit.ml
54 $(FINDLIB
) c
-custom
$(FINDLIB_LWT_FLAGS
) $(LFLAGS
) $^
-o
$@
56 test_lwt_unit.opt
: ..
/curl.cmxa ..
/curl_lwt.cmx test_lwt_unit.ml
57 $(FINDLIB
) opt
$(FINDLIB_LWT_FLAGS
) $(LFLAGS
) $^
-o
$@
59 oput
: ..
/curl.cma oput.ml
60 $(FINDLIB
) c
-custom
-package bytes
,unix
-linkpkg
$(LFLAGS
) $^
-o
$@
62 oput.opt
: ..
/curl.cmxa oput.ml
63 $(FINDLIB
) opt
-package bytes
,unix
-linkpkg
$(LFLAGS
) $^
-o
$@
66 $(OCBYTE
) -custom
$(LFLAGS
) $(OCURLLIB
) $< -o
$@
68 %.opt
: %.cmx ..
/curl.cmxa
69 $(OCOPT
) $(LFLAGS
) $(OCURLOPTLIB
) $< -o
$@
72 $(OCOPT
) -c
$(FLAGS
) $< -o
$@
75 $(OCBYTE
) -c
$(FLAGS
) $< -o
$@
78 $(OCBYTE
) -c
$(FLAGS
) $< -o
$@
81 @
rm -f
$(TARGETS
) *.cm
* *.o
*.a