forked from ygrek/ocurl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.msvc
80 lines (53 loc) · 1.57 KB
/
Makefile.msvc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
### -*- Makefile -*-
### Makefile.msvc
###
# libcurl directory
CURLDIR = C:/cygwin/home/me/curl-7.54.1
#####################
.PHONY: all targets examples install clean depend
.SUFFIXES: .ml .mli .cmx .cmi .cmo .cmxa .cma .c .obj
OCBYTE = ocamlc
OCOPT = ocamlopt
OC = ocamlc
CC = cl
FLAGS =
CFLAGS =
CURLINCDIR = -I $(CURLDIR)/include
# PR#4783
OCAMLMKLIB = ocamlmklib -v -ocamlc ocamlc -ocamlopt ocamlopt
CURLHELPEROBJS = curl-helper.obj
CURLOBJS = curl.cmx
CURLBCOBJS = $(CURLOBJS:.cmx=.cmo)
CURLFLAGS =
CURLCLIBS = ws2_32.lib
TARGETS = curl.cma curl.cmxa
all:
@$(MAKE) -f Makefile.msvc depend
@$(MAKE) -f Makefile.msvc targets
targets: $(TARGETS)
examples: $(TARGETS)
$(MAKE) -C examples -f Makefile.windows
curl.cma: curl.cmi $(CURLBCOBJS) dllcurl-helper.dll
$(OCAMLMKLIB) -o curl $(CURLBCOBJS) -oc curl-helper
curl.cmxa: curl.cmi $(CURLOBJS) libcurl-helper.lib
$(OCAMLMKLIB) -o curl $(CURLOBJS) -oc curl-helper
.ml.cmx:
$(OCOPT) -c $(FLAGS) $< -o $@
.mli.cmi:
$(OCBYTE) -c $(FLAGS) $< -o $@
.ml.cmo:
$(OCBYTE) -c $(FLAGS) $< -o $@
libcurl-helper.lib dllcurl-helper.dll: $(CURLHELPEROBJS)
$(OCAMLMKLIB) -oc curl-helper $(CURLHELPEROBJS) $(CURLCLIBS)
.c.obj:
$(OC) -c $(CFLAGS) -ccopt -DHAVE_CONFIG_H $(CURLINCDIR) -ccopt /Tp $< -o $@
install:
ocamlfind install -ldconf ignore curl META $(wildcard *.cmi *.lib *.cma *.cmxa *.cmx *.dll *.mli)
uninstall:
ocamlfind remove curl
clean:
@rm -f $(TARGETS) *~ *.cm* *.obj *.lib *.dll .depend core
@$(MAKE) -C examples -f Makefile.windows clean
depend:
@ocamldep *.mli *.ml > .depend
-include .depend