/[svn]/Makefile.types
ViewVC logotype

Contents of /Makefile.types

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1447 - (show annotations)
Tue Jul 10 18:50:35 2007 UTC (5 years, 10 months ago) by abate
File size: 1969 byte(s)
[r2005-02-02 16:33:31 by afrisch] Empty log message

Original author: afrisch
Date: 2005-02-02 16:33:32+00:00
1 DIRS= misc types
2
3 SRC= \
4 misc/serialize.mli \
5 misc/serialize.ml \
6 misc/custom.ml \
7 misc/custom.ml \
8 misc/encodings.mli \
9 misc/encodings.ml \
10 misc/imap.mli \
11 misc/imap.ml \
12 misc/state.mli \
13 misc/state.ml \
14 misc/pool.mli \
15 misc/pool.ml \
16 misc/ns.mli \
17 misc/ns.ml \
18 types/sortedList.mli \
19 types/sortedList.ml \
20 types/atoms.mli \
21 types/atoms.ml \
22 misc/bool.mli \
23 misc/bool.ml \
24 types/chars.mli \
25 types/chars.ml \
26 types/ident.ml \
27 types/intervals.mli \
28 types/intervals.ml \
29 misc/inttbl.mli \
30 misc/inttbl.ml \
31 types/normal.mli \
32 types/normal.ml \
33 misc/pretty.mli \
34 misc/pretty.ml \
35 misc/stats.mli \
36 misc/stats.ml \
37 types/ident.ml \
38 types/types.mli \
39 types/types.ml \
40 types/sequence.mli \
41 types/sequence.ml
42
43 ML_SRC=$(filter %.ml,$(SRC))
44 OBJECTS=$(ML_SRC:.ml=.$(EXT))
45
46
47 CAMLC=ocamlc
48 CAMLOPT=ocamlopt
49 ifeq ($(NATIVE),true)
50 EXT=cmx
51 EXTA=cmxa
52 CAML=$(CAMLOPT)
53 else
54 EXT=cmo
55 EXTA=cma
56 CAML=$(CAMLC)
57 endif
58
59 cduce_types.cmo: $(OBJECTS)
60 $(CAML) -pack -o cduce_types.$(EXT) $(INCLUDES) $^
61 $(CAML) -a -o cduce_types.$(EXTA) $(INCLUDES) cduce_types.$(EXT)
62
63 HIDE=@
64 INCLUDES = $(DIRS:%=-I %)
65
66
67 types/intervals.$(EXT): types/intervals.ml cat1 types/intervals_int.ml
68 $(CAML) -c $(INCLUDES) -pp './cat1 types/intervals_int.ml' $<
69
70 types/intervals.cmi: types/intervals.mli cat1 types/intervals_int.mli
71 $(CAML) -c $(INCLUDES) -pp './cat1 types/intervals_int.mli' $<
72
73 misc/stats.$(EXT): misc/stats.ml
74 $(CAML) -c $(INCLUDES) -pp 'sed s/Unix\\.gettimeofday\(\)/0./' $<
75
76 cat1:
77 echo "cat \$$1" > cat1
78 chmod +x cat1
79
80 .SUFFIXES: .ml .mli .cmo .cmi .cmx
81
82 .ml.cmo:
83 @echo "Build $@"
84 $(HIDE)$(CAMLC) -c $(INCLUDES) $<
85
86 .ml.cmx:
87 @echo "Build $@"
88 $(HIDE)$(CAMLOPT) -c $(INCLUDES) $<
89
90 .mli.cmi:
91 @echo "Build $@"
92 $(HIDE)$(CAMLC) -c $(INCLUDES) $<
93
94
95 .PHONY: compute_depend
96 compute_depend:
97 ocamldep $(INCLUDES) $(SRC) > types_depend
98
99 include types_depend
100
101 clean:
102 for i in $(DIRS); do \
103 (cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa *~); \
104 done

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5