blob: 8c8c1b4b0c3c0a47174972395deb9ef460777edd (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
#**************************************************************************
#* *
#* 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. *
#* *
#**************************************************************************
ROOTDIR = ..
include $(ROOTDIR)/Makefile.common
include $(ROOTDIR)/Makefile.best_binaries
DYNLINKDIR=$(ROOTDIR)/otherlibs/dynlink
UNIXDIR=$(ROOTDIR)/otherlibs/$(UNIXLIB)
OCAMLYACC ?= $(ROOTDIR)/yacc/ocamlyacc$(EXE)
OCAMLYACCFLAGS =
CAMLC=$(BEST_OCAMLC) -g -nostdlib -I $(ROOTDIR)/stdlib
COMPFLAGS=$(INCLUDES) -absname -w +a-4-9-41-42-44-45-48 -warn-error A \
-safe-string -strict-sequence -strict-formats
LINKFLAGS=-linkall -I $(UNIXDIR) -I $(DYNLINKDIR)
OCAMLLEX ?= $(BEST_OCAMLLEX)
CAMLDEP=$(BEST_OCAMLDEP)
DEPFLAGS=-slash
DEPINCLUDES=$(INCLUDES)
DIRECTORIES=$(UNIXDIR) $(DYNLINKDIR) $(addprefix $(ROOTDIR)/,\
utils parsing typing bytecomp toplevel driver file_formats lambda)
INCLUDES=$(addprefix -I ,$(DIRECTORIES))
compiler_modules := $(ROOTDIR)/toplevel/genprintval
debugger_modules := \
int64ops primitives unix_tools debugger_config parameters debugger_lexer \
input_handling question debugcom exec source pos checkpoints events \
program_loading symbols breakpoints trap_barrier history printval \
show_source time_travel program_management frames eval \
show_information loadprinter debugger_parser command_line main
all_modules := $(compiler_modules) $(debugger_modules)
all_objects := $(addsuffix .cmo,$(all_modules))
libraries = $(ROOTDIR)/compilerlibs/ocamlcommon.cma \
$(UNIXDIR)/unix.cma $(DYNLINKDIR)/dynlink.cma
all: ocamldebug$(EXE)
ocamldebug$(EXE): $(libraries) $(all_objects)
$(CAMLC) $(LINKFLAGS) -o $@ -linkall $^
install:
$(INSTALL_PROG) ocamldebug$(EXE) "$(INSTALL_BINDIR)"
clean::
rm -f ocamldebug ocamldebug.exe
rm -f *.cmo *.cmi
.SUFFIXES:
.SUFFIXES: .ml .cmo .mli .cmi
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
depend: beforedepend
$(CAMLDEP) $(DEPFLAGS) $(DEPINCLUDES) *.mli *.ml \
| sed -e 's,$(UNIXDIR)/,$$(UNIXDIR)/,' > .depend
%.ml: %.mll
$(OCAMLLEX) $(OCAMLLEXFLAGS) $<
clean::
rm -f debugger_lexer.ml
beforedepend:: debugger_lexer.ml
%.ml %.mli: %.mly
$(OCAMLYACC) $(OCAMLYACCFLAGS) $<
clean::
rm -f debugger_parser.ml debugger_parser.mli
beforedepend:: debugger_parser.ml debugger_parser.mli
include .depend
|