~ubuntu-branches/ubuntu/oneiric/ocsigen/oneiric

« back to all changes in this revision

Viewing changes to examples/miniforum/v0/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Glondu
  • Date: 2009-07-02 10:02:08 UTC
  • mfrom: (1.1.9 upstream) (4.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090702100208-n158b1sqwzn0asil
Tags: 1.2.0-2
Fix build on non-native architectures

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Write here all the findlib packages you need, for example:
 
2
# PACKAGES= ,extlib,netstring
 
3
 
 
4
# Write here all your .ml files, in dependency order (default: all)
 
5
FILES=services.ml mylib.ml forum0.ml forum1.ml forum2.ml
 
6
 
 
7
CAMLC = ocamlfind ocamlc -g -thread $(LIB)
 
8
CAMLOPT = ocamlfind ocamlopt -thread $(LIB)
 
9
CAMLDOC = ocamlfind ocamldoc $(LIB)
 
10
CAMLDEP = ocamlfind ocamldep
 
11
OCSIGENREP = `ocamlfind query ocsigen`
 
12
#OCSIGENREP = ../ocsigen/lib
 
13
LIB = -package lwt,ocsigen$(PACKAGES) -I $(OCSIGENREP)
 
14
# If you use the syntax extension:
 
15
PP = -pp "camlp4o $(OCSIGENREP)/xhtmlsyntax.cma"
 
16
# otherwise
 
17
#PP = 
 
18
 
 
19
OBJS = $(FILES:.ml=.cmo)
 
20
 
 
21
CMA = site0.cma site1.cma site2.cma
 
22
 
 
23
all: depend $(CMA) install
 
24
 
 
25
#$(CMA): $(OBJS)
 
26
#       $(CAMLC) -a -o $(CMA) $(OBJS)
 
27
 
 
28
site0.cma: mylib.cmo forum.cmo 
 
29
        $(CAMLC) -a -o $@ $^
 
30
 
 
31
site1.cma: mylib.cmo forum.cmo 
 
32
        $(CAMLC) -a -o $@ $^
 
33
 
 
34
site2.cma: services.cmo mylib.cmo forum.cmo 
 
35
        $(CAMLC) -a -o $@ $^
 
36
 
 
37
 
 
38
install:
 
39
        chmod a+r $(CMA)
 
40
 
 
41
.SUFFIXES:
 
42
.SUFFIXES: .ml .mli .cmo .cmi .cmx
 
43
 
 
44
.PHONY: doc
 
45
 
 
46
.ml.cmo:
 
47
        $(CAMLC) $(PP) -c $<
 
48
 
 
49
.mli.cmi:
 
50
        $(CAMLC) -c $<
 
51
.ml.cmx:
 
52
        $(CAMLOPT) $(PP) -c $<
 
53
 
 
54
doc:
 
55
#       $(CAMLDOC) -d doc -html db.mli
 
56
 
 
57
clean:
 
58
        -rm -f *.cm[ioxa] *~ $(NAME)
 
59
 
 
60
depend:
 
61
        $(CAMLDEP) $(PP) $(LIB) $(FILES:.ml=.mli) $(FILES) > .depend
 
62
 
 
63
FORCE:
 
64
 
 
65
-include .depend
 
66
 
 
67