Makefile.types 2.54 KB
Newer Older
1
DIRS= cduce/misc cduce/types cduce/compile cduce/runtime
2 3

SRC= \
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
 cduce/misc/serialize.mli \
 cduce/misc/serialize.ml \
 cduce/misc/custom.ml \
 cduce/misc/custom.ml \
 cduce/misc/encodings.mli \
 cduce/misc/encodings.ml \
 cduce/misc/imap.mli \
 cduce/misc/imap.ml \
 cduce/misc/state.mli \
 cduce/misc/state.ml \
 cduce/misc/pool.mli \
 cduce/misc/pool.ml \
 cduce/misc/ns.mli \
 cduce/misc/ns.ml \
 cduce/types/sortedList.mli \
 cduce/types/sortedList.ml \
 cduce/types/atoms.mli \
 cduce/types/atoms.ml \
 cduce/misc/bool.mli \
 cduce/misc/bool.ml \
 cduce/types/chars.mli \
 cduce/types/chars.ml \
 cduce/types/ident.ml \
 cduce/types/intervals.mli \
 cduce/types/intervals.ml \
 cduce/misc/inttbl.mli \
 cduce/misc/inttbl.ml \
 cduce/types/normal.mli \
 cduce/types/normal.ml \
 cduce/misc/pretty.mli \
 cduce/misc/pretty.ml \
 cduce/misc/stats.mli \
 cduce/misc/stats.ml \
 cduce/types/ident.ml \
 cduce/types/types.mli \
 cduce/types/types.ml \
 cduce/types/sequence.mli \
 cduce/types/sequence.ml \
 cduce/types/sample.mli \
 cduce/types/sample.ml \
 cduce/types/patterns.mli \
 cduce/types/patterns.ml \
 cduce/compile/lambda.mli \
 cduce/compile/lambda.ml \
 cduce/runtime/value.mli \
 cduce/runtime/value.ml \
 cduce/runtime/run_dispatch.mli \
 cduce/runtime/run_dispatch.ml \
 cduce/runtime/serial.mli \
 cduce/runtime/serial.ml
54

55 56

ML_SRC=$(filter %.ml,$(SRC))
57
CDUCE_OBJECTS=$(ML_SRC:.ml=.cmo)
58

59
$(CDUCE_OBJECTS) $(CDUCE_OBJECTS:.cmo=.cmi): $(COMPILER)
60 61


62 63
cduce_types.cmo: $(CDUCE_OBJECTS)
	$(CAMLC) $(COMPFLAGS) -pack -o cduce_types.cmo $(CDUCE_INCLUDES) $^
64

65
CDUCE_INCLUDES = $(DIRS:%=-I %)
66 67


68 69
cduce/types/intervals.cmo: cduce/types/intervals.ml cduce/cat1 cduce/types/intervals_int.ml
	$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'cduce/cat1 cduce/types/intervals_int.ml' $<
70

71 72
cduce/types/intervals.cmi: cduce/types/intervals.mli cduce/cat1 cduce/types/intervals_int.mli
	$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'cduce/cat1 cduce/types/intervals_int.mli' $<
73

74 75
cduce/misc/stats.cmo: cduce/misc/stats.ml
	$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) -pp 'sed s/Unix\\.gettimeofday\(\)/0./' $<
76

77 78
cduce/cat1:
	echo "cat \$$1" > cduce/cat1
79
	chmod +x cduce/cat1
80 81 82 83

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

.ml.cmo:
84
	$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) $<
85 86

.ml.cmx:
87
	$(CAMLOPT) -c $(CDUCE_INCLUDES) $<
88 89

.mli.cmi:
90
	$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) $<
91 92 93


.PHONY: compute_depend
94 95 96 97 98
cduce/compute_depend:
	ocamldep $(INCLUDES) $(SRC) > cduce/types_depend

include cduce/types_depend

99 100 101 102 103 104


clean:
	for i in $(DIRS); do \
	(cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa *~); \
	done