File: Makefile.windows

package info (click to toggle)
ocurl 0.2.1-13
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 768 kB
  • ctags: 1,276
  • sloc: ansic: 3,595; ml: 1,329; sh: 244; makefile: 131
file content (79 lines) | stat: -rw-r--r-- 1,628 bytes parent folder | download | duplicates (2)
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
###	-*- Makefile -*-
###	Makefile.windows
###

.SUFFIXES:	.ml .mli .cmx .cmi .cmo .cmxa .cma .c .obj

OCAMLLIBPATH  = c:\ocaml\lib

OCBYTE		= ocamlc
OCOPT		= ocamlopt

OC		= ocamlc
CC		= cl

FLAGS		=
LIBS		=

CFLAGS		= #/Ic:/devtools/ocaml/lib/caml /Ic:/devtools/curl/include
CAMLINCDIR	= -I c:/devtools/ocaml/lib/caml -I c:/devtools/curl/include

CURLHELPEROBJS	= curl-helper.obj
CURLOBJS	= curl.cmx
CURLBCOBJS	= $(CURLOBJS:.cmx=.cmo)

CURLFLAGS	= 
CURLCLIBS	= -cclib -lcurl-helper

TARGETS		= curl.cma curl.cmxa libcurl-helper.lib

all:
		@$(MAKE) -f Makefile.windows depend
		@$(MAKE) -f Makefile.windows targets

targets:	$(TARGETS) examples-dir

examples-dir:
		cd examples
		nmake -f Makefile.windows
		cd ..

curl.cma:	$(CURLBCOBJS) libcurl-helper.lib
		$(OCBYTE) -custom -a $(FLAGS) $(CURLFLAGS) -o $@ $(CURLBCOBJS) $(CURLCLIBS)

curl.cmxa:	$(CURLOBJS) libcurl-helper.lib
		$(OCOPT) -a $(FLAGS) $(CURLFLAGS) $(LIBS) $(CURLOBJS) -o $@ $(CURLCLIBS)

.ml.cmx:
		$(OCOPT) -c $(FLAGS) $< -o $@

.mli.cmi:
		$(OCBYTE) -c $(FLAGS) $< -o $@

.ml.cmo:
		$(OCBYTE) -c $(FLAGS) $< -o $@

libcurl-helper.lib:	$(CURLHELPEROBJS)
		lib /OUT:libcurl-helper.lib $(CURLHELPEROBJS)

.c.obj:
		$(OC) -c $(CFLAGS) $(CAMLINCDIR) $< -o $@

install:  all
	-mkdir $(OCAMLLIBPATH)\curl
	copy curl.cmi $(OCAMLLIBPATH)\curl
	copy curl.cma $(OCAMLLIBPATH)\curl
	copy curl.cmxa $(OCAMLLIBPATH)\curl
	copy libcurl-helper.lib $(OCAMLLIBPATH)\curl
    
clean:
		@del /f $(TARGETS) *~ *.cm* *.obj *.lib .depend core
		@cd examples
		@$(MAKE) -f Makefile.windows clean

depend:
		@ocamldep *.mli *.ml > .depend

!IF EXIST(.depend)
!INCLUDE .depend
!ENDIF