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 oput ominimal ossl ocurl_test_threads opar test_cb_exn
20 ifneq (@OCAML_PKG_lwt@
,no
)
21 TARGETS
+= test_lwt test_lwt_unit
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
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
$@
48 $(OCBYTE
) -custom
$(LFLAGS
) $(OCURLLIB
) $< -o
$@
50 %.opt
: %.cmx ..
/curl.cmxa
51 $(OCOPT
) $(LFLAGS
) $(OCURLOPTLIB
) $< -o
$@
54 $(OCOPT
) -c
$(FLAGS
) $< -o
$@
57 $(OCBYTE
) -c
$(FLAGS
) $< -o
$@
60 $(OCBYTE
) -c
$(FLAGS
) $< -o
$@
63 @
rm -f
$(TARGETS
) *.cm
* *.o
*.a