/[svn]/Makefile.types
ViewVC logotype

Contents of /Makefile.types

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1448 - (show annotations)
Tue Jul 10 18:50:42 2007 UTC (5 years, 10 months ago) by abate
File size: 2051 byte(s)
[r2005-02-04 20:41:47 by afrisch] Empty log message

Original author: afrisch
Date: 2005-02-04 20:41:47+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 types/sample.mli \
43 types/sample.ml \
44 types/patterns.mli \
45 types/patterns.ml
46
47
48 ML_SRC=$(filter %.ml,$(SRC))
49 OBJECTS=$(ML_SRC:.ml=.$(EXT))
50
51
52 CAMLC=ocamlc
53 CAMLOPT=ocamlopt
54 ifeq ($(NATIVE),true)
55 EXT=cmx
56 EXTA=cmxa
57 CAML=$(CAMLOPT)
58 else
59 EXT=cmo
60 EXTA=cma
61 CAML=$(CAMLC)
62 endif
63
64 cduce_types.cmo: $(OBJECTS)
65 $(CAML) -pack -o cduce_types.$(EXT) $(INCLUDES) $^
66 $(CAML) -a -o cduce_types.$(EXTA) $(INCLUDES) cduce_types.$(EXT)
67
68 HIDE=@
69 INCLUDES = $(DIRS:%=-I %)
70
71
72 types/intervals.$(EXT): types/intervals.ml cat1 types/intervals_int.ml
73 $(CAML) -c $(INCLUDES) -pp './cat1 types/intervals_int.ml' $<
74
75 types/intervals.cmi: types/intervals.mli cat1 types/intervals_int.mli
76 $(CAML) -c $(INCLUDES) -pp './cat1 types/intervals_int.mli' $<
77
78 misc/stats.$(EXT): misc/stats.ml
79 $(CAML) -c $(INCLUDES) -pp 'sed s/Unix\\.gettimeofday\(\)/0./' $<
80
81 cat1:
82 echo "cat \$$1" > cat1
83 chmod +x cat1
84
85 .SUFFIXES: .ml .mli .cmo .cmi .cmx
86
87 .ml.cmo:
88 @echo "Build $@"
89 $(HIDE)$(CAMLC) -c $(INCLUDES) $<
90
91 .ml.cmx:
92 @echo "Build $@"
93 $(HIDE)$(CAMLOPT) -c $(INCLUDES) $<
94
95 .mli.cmi:
96 @echo "Build $@"
97 $(HIDE)$(CAMLC) -c $(INCLUDES) $<
98
99
100 .PHONY: compute_depend
101 compute_depend:
102 ocamldep $(INCLUDES) $(SRC) > types_depend
103
104 include types_depend
105
106 clean:
107 for i in $(DIRS); do \
108 (cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa *~); \
109 done

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