blob: 34ee1df97b263cbcc717954e5b3b02c6568f141b (
plain)
1
2
3
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
include ../Makefile.config
RUNTIME=../boot/camlrun
COMPILER=../camlc
CAMLC=$(RUNTIME) $(COMPILER)
OPTCOMPILER=../camlopt
CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
CAMLDEP=../tools/camldep
OBJS=pervasives.cmo list.cmo string.cmo char.cmo array.cmo sys.cmo \
hashtbl.cmo sort.cmo filename.cmo obj.cmo lexing.cmo parsing.cmo \
set.cmo map.cmo stack.cmo queue.cmo \
printf.cmo format.cmo arg.cmo printexc.cmo gc.cmo
all: stdlib.cma cslheader
install:
cp stdlib.cma *.cmi *.mli cslheader $(LIBDIR)
stdlib.cma: $(OBJS)
$(CAMLC) -a -o stdlib.cma $(OBJS)
# stdlib.cmxa: $(OBJS:.cmo=.cmx)
# $(CAMLOPT) -a -o stdlib.cmxa $(OBJS:.cmo=.cmx)
optlib: $(OBJS:.cmo=.cmx)
cslheader: header.c ../Makefile.config
if $(SHARPBANGSCRIPTS); \
then echo "#!$(BINDIR)/cslrun" > cslheader; \
else $(CC) $(CCCOMPOPTS) $(CCLINKOPTS) header.c -o cslheader; \
strip cslheader; fi
pervasives.cmi: pervasives.mli
$(CAMLC) -nopervasives -c pervasives.mli
pervasives.cmo: pervasives.ml
$(CAMLC) -nopervasives -c pervasives.ml
pervasives.cmx: pervasives.ml
$(CAMLOPT) -nopervasives -c pervasives.ml
.SUFFIXES: .mli .ml .cmi .cmo .cmx
.mli.cmi:
$(CAMLC) $(COMPFLAGS) -c $<
.ml.cmo:
$(CAMLC) $(COMPFLAGS) -c $<
.ml.cmx:
$(CAMLOPT) $(COMPFLAGS) -c $<
$(OBJS): pervasives.cmi
$(OBJS): $(COMPILER)
$(OBJS:.cmo=.cmi): $(COMPILER)
$(OBJS:.cmo=.cmx): $(OPTCOMPILER)
clean:
rm -f *.cm*
rm -f cslheader
rm -f *~
include .depend
depend:
$(CAMLDEP) *.mli *.ml > .depend
|