6 CURLDIR = c:/my/contrib/libcurl-7.19.3-win32-ssl-msvc
10 .PHONY: all targets examples install clean depend
12 .SUFFIXES: .ml .mli .cmx .cmi .cmo .cmxa .cma .c .obj
23 CURLINCDIR = -I $(CURLDIR)/include
25 CURLIMPORTLIB = $(CURLDIR)/libcurl_imp.lib
28 OCAMLMKLIB = ocamlmklib -v -ocamlc ocamlc -ocamlopt ocamlopt
30 CURLHELPEROBJS = curl-helper.obj
32 CURLBCOBJS = $(CURLOBJS:.cmx=.cmo)
35 CURLCLIBS = $(CURLIMPORTLIB) ws2_32.lib
37 TARGETS = curl.cma curl.cmxa
40 @$(MAKE) -f Makefile.msvc depend
41 @$(MAKE) -f Makefile.msvc targets
43 targets: $(TARGETS) examples
46 $(MAKE) -C examples -f Makefile.windows
48 curl.cma: curl.cmi $(CURLBCOBJS) dllcurl-helper.dll
49 $(OCAMLMKLIB) -o curl $(CURLBCOBJS) -oc curl-helper
51 curl.cmxa: curl.cmi $(CURLOBJS) libcurl-helper.lib
52 $(OCAMLMKLIB) -o curl $(CURLOBJS) -oc curl-helper
55 $(OCOPT) -c $(FLAGS) $< -o $@
58 $(OCBYTE) -c $(FLAGS) $< -o $@
61 $(OCBYTE) -c $(FLAGS) $< -o $@
63 libcurl-helper.lib dllcurl-helper.dll: $(CURLHELPEROBJS)
64 $(OCAMLMKLIB) -oc curl-helper $(CURLHELPEROBJS) $(CURLCLIBS)
67 $(OC) -c $(CFLAGS) -ccopt -DHAVE_CONFIG_H $(CURLINCDIR) $< -o $@
70 ocamlfind install -ldconf ignore curl META $(wildcard *.cmi *.lib *.cma *.cmxa *.cmx *.dll *.mli)
76 @del $(TARGETS) *~ *.cm* *.obj *.lib *.dll .depend core
77 @$(MAKE) -C examples -f Makefile.windows clean
80 @ocamldep *.mli *.ml > .depend