summaryrefslogtreecommitdiff
path: root/stdlib/Makefile.nt
blob: 7015a642d3aee1b5eed68f0c1e47e691b77e905a (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
68
69
70
71
72
73
74
75
76
77
78
79
!include ..\config\Makefile.nt

RUNTIME=..\boot\ocamlrun
COMPILER=..\ocamlc
CAMLC=$(RUNTIME) $(COMPILER)
OPTCOMPILER=..\ocamlopt
CAMLOPT=$(RUNTIME) $(OPTCOMPILER)
CAMLDEP=..\boot\ocamlrun ..\tools\ocamldep

OBJS=pervasives.cmo list.cmo char.cmo string.cmo array.cmo sys.cmo \
  hashtbl.cmo sort.cmo filename.cmo marshal.cmo obj.cmo \
  lexing.cmo parsing.cmo \
  set.cmo map.cmo stack.cmo queue.cmo stream.cmo \
  buffer.cmo printf.cmo format.cmo arg.cmo printexc.cmo gc.cmo \
  digest.cmo random.cmo oo.cmo genlex.cmo callback.cmo weak.cmo \
  lazy.cmo

all: stdlib.cma std_exit.cmo camlheader camlheader_ur

allopt: stdlib.cmxa std_exit.cmx

install:
	cp stdlib.cma std_exit.cmo *.cmi *.mli camlheader camlheader_ur $(LIBDIR)

installopt:
	cp stdlib.cmxa stdlib.lib std_exit.obj *.cmx $(LIBDIR)

stdlib.cma: $(OBJS)
	$(CAMLC) -a -o stdlib.cma $(OBJS)

stdlib.cmxa: $(OBJS:.cmo=.cmx)
	$(CAMLOPT) -a -o stdlib.cmxa $(OBJS:.cmo=.cmx)

camlheader camlheader_ur: headernt.c ..\config\Makefile.nt
	$(BYTECC) $(BYTECCCOMPOPTS) $(BYTECCLINKOPTS) -o camlheader. headernt.c
	cp camlheader camlheader_ur

clean::
	rm -f camlheader camlheader_ur

pervasives.cmi: pervasives.mli
	$(CAMLC) $(COMPFLAGS) -nopervasives -c pervasives.mli

pervasives.cmo: pervasives.ml
	$(CAMLC) $(COMPFLAGS) -nopervasives -c pervasives.ml

pervasives.cmx: pervasives.ml
	$(CAMLOPT) $(COMPFLAGS) -nopervasives -c pervasives.ml

# oo.cmi must be compiled with -nopervasives for applets
oo.cmi: oo.mli
	$(CAMLC) $(COMPFLAGS) -nopervasives -c oo.mli

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

.mli.cmi:
	$(CAMLC) $(COMPFLAGS) -c $<

.ml.cmo:
	$(CAMLC) $(COMPFLAGS) -c $<

.ml.cmx:
	$(CAMLOPT) $(COMPFLAGS) -c $<

$(OBJS) std_exit.cmo: pervasives.cmi
$(OBJS:.cmo=.cmx) std_exit.cmx: pervasives.cmi

$(OBJS) std_exit.cmo: $(COMPILER)
$(OBJS:.cmo=.cmi) std_exit.cmi: $(COMPILER)
$(OBJS:.cmo=.cmx) std_exit.cmx: $(OPTCOMPILER)

clean::
	rm -f *.cm* *.obj *.lib
	rm -f *~

!include .depend

depend: beforedepend
	$(CAMLDEP) *.mli *.ml > .depend