Makefile.types 1.67 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
CDUCE_OBJECTS=$(ML_SRC:.ml=.cmo)
32

33
$(CDUCE_OBJECTS) $(CDUCE_OBJECTS:.cmo=.cmi): $(COMPILER)
34
$(CDUCE_OBJECTS:.cmo=.cmx): $(OPTCOMPILER)
35

36
cduce_types.cmo: $(CDUCE_OBJECTS)
37
	$(CAMLC) $(COMPFLAGS) -pack -o cduce_types.cmo $(CDUCE_INCLUDES) $(CDUCE_OBJECTS)
38

39
cduce_types.cmx: $(CDUCE_OBJECTS:.cmo=.cmx)
40 41
	$(CAMLOPT) $(OPTCOMPFLAGS) -pack -o cduce_types.cmx $(CDUCE_INCLUDES) $(CDUCE_OBJECTS)

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

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


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

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

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

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


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

include cduce/types_depend

67 68 69 70 71 72


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