generate error mappings (fix typos)
[ocurl.git] / Makefile.msvc
blob30a7ac8abc2bbfdbdb3b66fe50a19247cee3f5d9
1 ###     -*- Makefile -*-
2 ###     Makefile.msvc
3 ###
5 # libcurl directory
6 CURLDIR = c:/my/contrib/libcurl-7.19.3-win32-ssl-msvc
8 #####################
10 .PHONY:         all targets examples install clean depend
12 .SUFFIXES:      .ml .mli .cmx .cmi .cmo .cmxa .cma .c .obj
14 OCBYTE          = ocamlc
15 OCOPT           = ocamlopt
17 OC              = ocamlc
18 CC              = cl
20 FLAGS           =
22 CFLAGS          =
23 CURLINCDIR      = -I $(CURLDIR)/include
25 CURLIMPORTLIB   = $(CURLDIR)/libcurl_imp.lib
27 # PR#4783
28 OCAMLMKLIB = ocamlmklib -v -ocamlc ocamlc -ocamlopt ocamlopt
30 CURLHELPEROBJS  = curl-helper.obj
31 CURLOBJS        = curl.cmx
32 CURLBCOBJS      = $(CURLOBJS:.cmx=.cmo)
34 CURLFLAGS       = 
35 CURLCLIBS       = $(CURLIMPORTLIB) ws2_32.lib
37 TARGETS         = curl.cma curl.cmxa
39 all:
40                 @$(MAKE) -f Makefile.msvc depend
41                 @$(MAKE) -f Makefile.msvc targets
43 targets:        $(TARGETS) examples
45 examples: $(TARGETS)
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
54 .ml.cmx:
55                 $(OCOPT) -c $(FLAGS) $< -o $@
57 .mli.cmi:
58                 $(OCBYTE) -c $(FLAGS) $< -o $@
60 .ml.cmo:
61                 $(OCBYTE) -c $(FLAGS) $< -o $@
63 libcurl-helper.lib dllcurl-helper.dll:  $(CURLHELPEROBJS)
64                 $(OCAMLMKLIB) -oc curl-helper $(CURLHELPEROBJS) $(CURLCLIBS)
66 .c.obj:
67                 $(OC) -c $(CFLAGS) -ccopt -DHAVE_CONFIG_H $(CURLINCDIR) $< -o $@
69 install:
70                 ocamlfind install -ldconf ignore curl META $(wildcard *.cmi *.lib *.cma *.cmxa *.cmx *.dll *.mli)
72 uninstall:
73                 ocamlfind remove curl
75 clean:
76                 @del $(TARGETS) *~ *.cm* *.obj *.lib *.dll .depend core
77                 @$(MAKE) -C examples -f Makefile.windows clean
79 depend:
80                 @ocamldep *.mli *.ml > .depend
82 -include .depend