-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOMakefile
106 lines (82 loc) · 4.03 KB
/
OMakefile
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
94
95
96
97
98
99
100
101
102
103
104
105
106
################################################################################
# The Frenetic Project #
################################################################################
# Licensed to the Frenetic Project by one or more contributors. See the #
# NOTICE file distributed with this work for additional information #
# regarding copyright and ownership. The Frenetic Project licenses this #
# file to you under the following license. #
# #
# Redistribution and use in source and binary forms, with or without #
# modification, are permitted provided the following conditions are met: #
# - Redistributions of source code must retain the above copyright #
# notice, this list of conditions and the following disclaimer. #
# - Redistributions in binary form must reproduce the above copyright #
# notice, this list of conditions and the following disclaimer in #
# the documentation or other materials provided with the distribution. #
# - The names of the copyright holds and contributors may not be used to #
# endorse or promote products derived from this work without specific #
# prior written permission. #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
# LICENSE file distributed with this work for specific language governing #
# permissions and limitations under the License. #
################################################################################
# /src/compiler/OMakefile #
# Top-level OMakefile #
# $Id$ #
################################################################################
RESULT = frenetic
.DEFAULT: $(RESULT)$(EXE)
##############################################################################
# Basic configuration
NATIVE_ENABLED = true
USE_OCAMLFIND = true
OCAMLFLAGS = -dtypes -rectypes
OCAMLPACKS += num str unix batteries
OCAMLYACC = ocamlyacc -v
MAKE = make
if $(equal $(OSTYPE), Linux)
OCAMLOPTFLAGS += -ccopt static
if $(not $(OCAMLFIND_EXISTS))
eprintln(This project requires ocamlfind\, but it was not found.)
eprintln(You need to install ocamlfind and run "omake --configure".)
exit 1
##############################################################################
# Library configuration
FBASEDIR = $(dir fbase)
OCAML_LIBS += $(FBASEDIR)/fbase
OCAMLINCLUDES += $(FBASEDIR)
##############################################################################
# Sources
FRENETIC_BASE_SOURCES[] = \
checker.mli checker.ml \
conversion.mli conversion.ml \
id.mli id.ml \
overload.mli overload.ml \
parser.mly lexer.mll \
prefs.mli prefs.ml \
pretty.mli pretty.ml \
py.mli py.ml\
syntax.mli syntax.ml \
toplevel.ml
FRENETIC_SOURCES = $(file $(FRENETIC_BASE_SOURCES)) frenetic.ml
OCamlProgram($(RESULT), $(rootname $(FRENETIC_SOURCES)))
GENERATED_FILES = parser.ml parser.mli lexer.ml
OCamlGeneratedFiles($(GENERATED_FILES))
##############################################################################
# Clean up
.PHONY: clean distclean
CLEAN = rm -rf *.tmp *.cmx *.cmi *.cmo *.o *.annot *.opt *.a *.cma *.cmxa \
*.output $(GENERATED_FILES) $(RESULT)
DISTCLEAN = $(CLEAN) *.omc
clean:
$(CLEAN)
distclean:
$(DISTCLEAN)
##############################################################################
# Sub-directories
SUBDIRS = fbase
.SUBDIRS: $(SUBDIRS)