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

3
ML_SRC= \
4 5 6 7 8 9 10 11 12 13 14
 cduce/misc/serialize.ml \
 cduce/misc/custom.ml \
 cduce/misc/encodings.ml \
 cduce/misc/imap.ml \
 cduce/misc/state.ml \
 cduce/misc/pool.ml \
 cduce/misc/ns.ml \
 cduce/types/sortedList.ml \
 cduce/types/atoms.ml \
 cduce/misc/bool.ml \
 cduce/types/chars.ml \
15 16
 cduce/types/var.ml \
 cduce/types/boolVar.ml \
17 18 19 20 21 22 23 24 25 26 27 28 29
 cduce/types/ident.ml \
 cduce/types/intervals.ml \
 cduce/misc/inttbl.ml \
 cduce/types/normal.ml \
 cduce/misc/pretty.ml \
 cduce/misc/stats.ml \
 cduce/types/types.ml \
 cduce/types/sequence.ml \
 cduce/types/sample.ml \
 cduce/types/patterns.ml \
 cduce/compile/lambda.ml \
 cduce/runtime/value.ml \
 cduce/runtime/run_dispatch.ml \
30
 cduce/runtime/explain.ml \
31
 cduce/runtime/serial.ml
32

33 34
CMO_OBJECTS=$(ML_SRC:.ml=.cmo)
CMX_OBJECTS=$(ML_SRC:.ml=.cmx)
35

36 37
$(CMO_OBJECTS) $(CMX_OBJECTS): $(COMPILER)
$(CMX_OBJECTS): $(OPTCOMPILER)
38

39 40
cduce_types.cmo: $(CMO_OBJECTS)
	$(CAMLC) $(COMPFLAGS) -pack -o cduce_types.cmo $(CDUCE_INCLUDES) $(CMO_OBJECTS)
41

42 43
cduce_types.cmx: $(CMX_OBJECTS)
	$(CAMLOPT) $(OPTCOMPFLAGS) -pack -o cduce_types.cmx $(CDUCE_INCLUDES) $(CMX_OBJECTS)
44

45 46 47 48
cduce_types.p.cmx: cduce_types.cmx
	cp cduce_types.cmx cduce_types.p.cmx
	cp cduce_types.o cduce_types.p.o

49
CDUCE_INCLUDES = $(DIRS:%=-I %)
50 51 52 53

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

.ml.cmo:
54
	$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) $<
55 56

.ml.cmx:
57
	$(CAMLOPT) $(OPTCOMPFLAGS) -c $(CDUCE_INCLUDES) $<
58 59

.mli.cmi:
60
	$(CAMLC) $(COMPFLAGS) -c $(CDUCE_INCLUDES) $<
61 62 63


.PHONY: compute_depend
64
compute_depend:
65
	ocamldep $(CDUCE_INCLUDES) $(SRC) $(SRC:.ml=.mli) > cduce/types_depend
66 67 68

include cduce/types_depend

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