File: Makefile

package info (click to toggle)
camlrpc 0.4.1-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,080 kB
  • ctags: 1,474
  • sloc: ml: 11,901; makefile: 592; sh: 345; ansic: 331
file content (73 lines) | stat: -rw-r--r-- 1,611 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
# make all: 		make bytecode executables
# make clean: 		remove intermediate files
# make distclean: 	remove any superflous files

#----------------------------------------------------------------------
# specific rules for this package:

CLNTOBJECTS  = sample_aux.cmo sample_clnt.cmo client.cmo 
SRVOBJECTS   = sample_aux.cmo sample_clnt.cmo sample_srv.cmo  server.cmo 

all: 
	$(MAKE) rpcgen
	rm -f depend; $(MAKE) depend
	$(MAKE) server
	$(MAKE) client
	$(MAKE) cgifwd.cgi

server: $(SRVOBJECTS)
	$(OCAMLC) -custom -o server -linkpkg \
		$(SRVOBJECTS)

client: $(CLNTOBJECTS)
	$(OCAMLMKTOP) -custom -o client -linkpkg \
		$(CLNTOBJECTS)

.PHONY: rpcgen
rpcgen:
	$(OCAMLRPCGEN) -aux -clnt -srv sample.xdr

cgifwd.cgi: cgifwd.ml
	$(OCAMLC) -custom -o cgifwd.cgi -linkpkg cgifwd.ml


#----------------------------------------------------------------------
# general rules:

OPTIONS   =
PKGOPTIONS = -package rpc,rpc-over-http
OCAMLC    = $(OCAMLFIND) ocamlc $(OPTIONS) $(PKGOPTIONS)
OCAMLMKTOP= $(OCAMLFIND) ocamlmktop $(OPTIONS) $(PKGOPTIONS)
OCAMLOPT  = $(OCAMLFIND) ocamlopt $(OPTIONS) $(PKGOPTIONS)
OCAMLDEP  = ocamldep $(OPTIONS)
OCAMLFIND = ocamlfind
OCAMLRPCGEN = ocamlrpcgen

depend: *.ml
	$(OCAMLDEP) *.ml *.mli >depend

.PHONY: clean
clean:
	rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa
	rm -f *_aux.ml *_srv.ml *_clnt.ml
	rm -f *_aux.mli *_srv.mli *_clnt.mli

.PHONY: distclean
distclean: clean
	rm -f *~ client server depend cgifwd.cgi

.PHONY: CLEAN
CLEAN: clean

.SUFFIXES: .cmo .cmi .cmx .ml .mli

.ml.cmx:
	$(OCAMLOPT) -c $<

.ml.cmo:
	$(OCAMLC) -c $<

.mli.cmi:
	$(OCAMLC) -c $<

include depend