summaryrefslogtreecommitdiff
path: root/Makefile.nt
blob: 54e5f67b66f3cc42a88ebac6282a2bc2cc9b34a8 (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
#**************************************************************************
#*                                                                        *
#*                                 OCaml                                  *
#*                                                                        *
#*            Xavier Leroy, projet Cristal, INRIA Rocquencourt            *
#*                                                                        *
#*   Copyright 1999 Institut National de Recherche en Informatique et     *
#*     en Automatique.                                                    *
#*                                                                        *
#*   All rights reserved.  This file is distributed under the terms of    *
#*   the GNU Lesser General Public License version 2.1, with the          *
#*   special exception on linking described in the file LICENSE.          *
#*                                                                        *
#**************************************************************************

# The main Makefile

include Makefile.shared

# The compilation of ocaml will fail if the runtime has changed.
# Never mind, just do make bootstrap to reach fixpoint again.

# Compile everything the first time
world: coldstart all

# Do a complete bootstrapping cycle
bootstrap:
	$(MAKEREC) coreboot
	$(MAKEREC) all
	$(MAKEREC) compare

# Compile the native-code compiler
opt-core:
	$(MAKEREC) runtimeopt
	$(MAKEREC) ocamlopt
	$(MAKEREC) libraryopt

opt:
	$(MAKEREC) opt-core
	$(MAKEREC) otherlibrariesopt ocamltoolsopt

# Native-code versions of the tools
# If the submodule is initialised, then opt.opt will build a native flexlink
opt.opt: core opt-core ocamlc.opt all ocamlopt.opt ocamllex.opt \
         ocamltoolsopt ocamltoolsopt.opt otherlibrariesopt $(OCAMLDOC_OPT) \
         $(if $(wildcard flexdll/Makefile),flexlink.opt)

# Complete build using fast compilers
world.opt: coldstart opt.opt

runtop:
	$(MAKEREC) core
	$(MAKEREC) ocaml
	@rlwrap --help 2>/dev/null && $(EXTRAPATH) rlwrap $(RUNTOP) || $(EXTRAPATH) $(RUNTOP)

natruntop:
	$(MAKEREC) runtime
	$(MAKEREC) coreall
	$(MAKEREC) opt.opt
	$(MAKEREC) ocamlnat
	@rlwrap --help 2>/dev/null && $(EXTRAPATH) rlwrap $(NATRUNTOP) || $(EXTRAPATH) $(NATRUNTOP)

.PHONY: bootstrap
.PHONY: opt-core opt opt.opt
.PHONY: world world.opt

include .depend