Makefile.types 1.65 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 15 16 17 18 19 20 21 22 23 24 25 26 27
 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 \
 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 \
28
 cduce/runtime/explain.ml \
29
 cduce/runtime/serial.ml
30

31 32
CMO_OBJECTS=$(ML_SRC:.ml=.cmo)
CMX_OBJECTS=$(ML_SRC:.ml=.cmx)
33

34 35
$(CMO_OBJECTS) $(CMX_OBJECTS): $(COMPILER)
$(CMX_OBJECTS): $(OPTCOMPILER)
36

37 38
cduce_types.cmo: $(CMO_OBJECTS)
	$(CAMLC) $(COMPFLAGS) -pack -o cduce_types.cmo $(CDUCE_INCLUDES) $(CMO_OBJECTS)
39

40 41
cduce_types.cmx: $(CMX_OBJECTS)
	$(CAMLOPT) $(OPTCOMPFLAGS) -pack -o cduce_types.cmx $(CDUCE_INCLUDES) $(CMX_OBJECTS)
42

43 44 45 46
cduce_types.p.cmx: cduce_types.cmx
	cp cduce_types.cmx cduce_types.p.cmx
	cp cduce_types.o cduce_types.p.o

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


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

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

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

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


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

include cduce/types_depend

68 69 70 71 72 73


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