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

« back to all changes in this revision

Viewing changes to examples/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:
2
2
 
3
3
FILES=$(wildcard *.ml)
4
4
 
5
 
ifeq "$(DEBUG)" "YES"
6
 
DBG = -dtypes -g
7
 
else
8
 
DBG =
9
 
endif
10
5
 
11
6
ifeq "$(OCAMLDUCE)" "YES"
12
7
DUCEMODBYTE=exampleduce.cmo
13
 
DUCEMODOPT=exampleduce.cmxs
 
8
DUCEMODOPT=$(CMXSDUCE)
14
9
else
15
10
DUCEMODBYTE=
16
11
DUCEMODOPT=
17
12
endif
18
13
 
 
14
ifeq "$(NATDYNLINK)" "YES"
 
15
CMXS= $(FILES:.ml=.cmxs)
 
16
CMXSDUCE=exampleduce.cmxs
 
17
else
 
18
CMXS=
 
19
endif
 
20
 
19
21
 
20
22
LIB = $(LIBDIRS) -package lwt,netstring,camlp4
21
23
CAMLC = $(OCAMLFIND) $(CAMLCNAME) $(DBG) $(LIB)
22
 
CAMLOPT = $(OCAMLFIND) $(CAMLOPTNAME) -dlcode $(DBG) $(LIB)
 
24
CAMLOPT = $(OCAMLFIND) $(CAMLOPTNAME) $(DBG) $(LIB)
23
25
CAMLDEP = $(OCAMLFIND) ocamldep $(LIB)
24
26
PP = -syntax camlp4o -ppopt "../xmlp4/xhtmlsyntax.cma" -ppopt "-loc loc"
25
27
 
26
28
OBJS = $(FILES:.ml=.cmo)
27
 
OBJSOPT = $(FILES:.ml=.cmxs)
 
29
OBJSOPT = $(CMXS)
28
30
 
29
31
byte: $(OBJS) $(DUCEMODBYTE) miniwiki.byte
30
32
 
37
39
exampleduce.cmx: ocamlduce/exampleduce.ml
38
40
#       -rm -f ../extensions/ocsipersist.cmx
39
41
        $(OCAMLDUCEFIND) ocamlopt $(DBG) $(LIB) -c ocamlduce/exampleduce.ml
40
 
        cp ocamlduce/exampleduce.cmx .
 
42
        cp ocamlduce/exampleduce.cmx ocamlduce/exampleduce.o .
41
43
#       touch ../extensions/ocsipersist.cmx
42
44
 
 
45
exampleduce.cmxs: exampleduce.cmx
 
46
        $(OCAMLDUCEFIND) ocamlopt $(DBG) $(LIB) -linkall -shared \
 
47
          -o ocamlduce/$*.cmxs $<
 
48
        cp ocamlduce/exampleduce.cmxs .
 
49
 
43
50
miniwiki.byte:
44
51
        $(MAKE) -C miniwiki byte
45
52