This repository has been archived by the owner on Jun 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 204
/
Makefile
82 lines (61 loc) · 2.18 KB
/
Makefile
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
TOP=../..
##############################################################################
# Variables
##############################################################################
TARGET=lib
-include $(TOP)/Makefile.config
SRC= flag_parsing_js.ml \
ast_js.ml \
meta_ast_js.ml \
export_ast_js.ml \
visitor_js.ml lib_parsing_js.ml \
map_js.ml \
parser_js.ml lexer_js.ml \
token_helpers_js.ml \
parse_js.ml \
unparse_js.ml \
test_parsing_js.ml unit_parsing_js.ml
SYSLIBS= str.cma unix.cma
# globals.cma is used only for Config.patch in test_parse_js
LIBS=$(TOP)/commons/commons.cma \
$(TOP)/globals/globals.cma \
$(TOP)/h_program-lang/lib.cma \
INCLUDEDIRS= $(TOP)/commons $(TOP)/commons/ocamlextra \
$(TOP)/commons/lib-sexp $(TOP)/commons/lib-json \
$(TOP)/globals \
$(TOP)/h_program-lang \
##############################################################################
# Generic variables
##############################################################################
-include $(TOP)/Makefile.common
##############################################################################
# Top rules
##############################################################################
all:: $(TARGET).cma
all.opt:: $(TARGET).cmxa
$(TARGET).cma: $(OBJS)
$(OCAMLC) -a -o $(TARGET).cma $(OBJS)
$(TARGET).cmxa: $(OPTOBJS) $(LIBS:.cma=.cmxa)
$(OCAMLOPT) -a -o $(TARGET).cmxa $(OPTOBJS)
$(TARGET).top: $(OBJS) $(LIBS)
$(OCAMLMKTOP) -o $(TARGET).top $(SYSLIBS) $(LIBS) $(OBJS)
clean::
rm -f $(TARGET).top
lexer_js.ml: lexer_js.mll
$(OCAMLLEX) $<
clean::
rm -f lexer_js.ml
beforedepend:: lexer_js.ml
parser_js.ml parser_js.mli: parser_js.mly
$(OCAMLYACC) $<
clean::
rm -f parser_js.ml parser_js.mli parser_js.output
beforedepend:: parser_js.ml parser_js.mli
visitor_js.cmo: visitor_js.ml
$(OCAMLC) -w y -c $<
##############################################################################
# Generic rules
##############################################################################
##############################################################################
# Literate Programming rules
##############################################################################