actually retrieve CURLINFO_FTP_ENTRY_PATH
[ocurl.git] / Makefile.in
blobd2d16309fc2889b22722967ddb10595cee6129bf
1 ###
2 ### @configure_input@
3 ###
5 .PHONY: all targets examples install clean depend
7 .SUFFIXES: .ml .mli .cmx .cmi .cmo .cmxa .cma .c .o
9 INSTALLDIR = @INSTALLDIR@
10 INSTALL = @INSTALL@
11 INSTALLDATA = @INSTALL_DATA@
13 FINDLIB = @OCAMLFIND@
14 OCBYTE = @OCAMLC@
15 OCOPT = @OCAMLOPT@
17 OC = @OCAMLC@
18 CC = @CC@
20 FLAGS =
21 LIBS =
23 CFLAGS = @CFLAGS@ @DEFS@ -Wall
24 CAMLINCDIR = -I@OCAMLLIB@
26 CURLHELPEROBJS = curl-helper.o
27 CURLOBJS = curl.cmx
28 CURLBCOBJS = $(CURLOBJS:.cmx=.cmo)
30 CURLFLAGS = -ccopt @CURLFLAGS@
31 CURLCLIBS = -cclib -lcurl-helper -cclib "@CURLLIBS@"
33 ifeq (@OCAMLBEST@,opt)
34 TARGETS = curl.cma curl.cmxa libcurl-helper.a dllcurl-helper.so
35 else
36 TARGETS = curl.cma libcurl-helper.a dllcurl-helper.so
37 endif
39 all:
40 @$(MAKE) depend
41 @$(MAKE) targets
43 targets: $(TARGETS) examples
45 examples:
46 (cd examples; $(MAKE))
48 curl.cma: $(CURLBCOBJS) dllcurl-helper.so
49 ocamlmklib -o curl $(CURLBCOBJS) -oc curl-helper @CURLLIBS@
51 curl.cmxa: $(CURLOBJS) dllcurl-helper.so
52 ocamlmklib -o curl $(CURLOBJS) -oc curl-helper @CURLLIBS@
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.a dllcurl-helper.so: $(CURLHELPEROBJS)
64 ocamlmklib -oc curl-helper $(CURLHELPEROBJS) \
65 @CURLLIBS@
67 .c.o:
68 $(OC) -c -ccopt "$(CFLAGS)" $<
70 install:
71 ifeq ($(FINDLIB),ocamlfind)
72 ocamlfind install -ldconf ignore \
73 curl META $(wildcard *.cmi) \
74 $(wildcard *.a) $(wildcard *.cma) \
75 $(wildcard *.cmxa) $(wildcard *.so) $(wildcard *.mli)
76 else
77 mkdir -p $(INSTALLDIR)
78 $(INSTALLDATA) curl.cma $(INSTALLDIR)
79 ifeq (@OCAMLBEST@,opt)
80 $(INSTALLDATA) curl.cmxa $(INSTALLDIR)
81 endif
82 $(INSTALLDATA) curl.mli curl.cmi $(INSTALLDIR)
83 $(INSTALLDATA) curl.a libcurl-helper.a $(INSTALLDIR)
84 endif
87 clean:
88 @rm -f $(TARGETS) *~ *.cm* *.o *.a *.so .depend core
89 @(cd examples; $(MAKE) clean)
91 depend:
92 @ocamldep *.mli *.ml > .depend
94 ifeq ($(wildcard .depend),.depend)
95 ifneq ($(MAKECMDGOALS),clean)
96 include .depend
97 endif
98 endif