Makefile.config.in 6.91 KB
Newer Older
1
2
3
4
##########################################################################
#                                                                        #
#  This file is part of Frama-C.                                         #
#                                                                        #
Andre Maroneze's avatar
Andre Maroneze committed
5
#  Copyright (C) 2007-2020                                               #
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
#    CEA (Commissariat à l'énergie atomique et aux énergies              #
#         alternatives)                                                  #
#                                                                        #
#  you can redistribute it and/or modify it under the terms of the GNU   #
#  Lesser General Public License as published by the Free Software       #
#  Foundation, version 2.1.                                              #
#                                                                        #
#  It is distributed in the hope that it will be useful,                 #
#  but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
#  GNU Lesser General Public License for more details.                   #
#                                                                        #
#  See the GNU Lesser General Public License version 2.1                 #
#  for more details (enclosed in the file licenses/LGPLv2.1).            #
#                                                                        #
##########################################################################

##########################################################################
#                                                                        #
# Define variables from configure.                                       #
# These variables may be redefined later.                                #
#                                                                        #
##########################################################################

######################
# Installation paths #
######################

CYGPATH         ?=@CYGPATH@

DESTDIR 	?=
prefix		?=@prefix@
exec_prefix	?=@exec_prefix@
datarootdir     ?=@datarootdir@
datadir         ?=@datadir@
François Bobot's avatar
François Bobot committed
41
42
43
44
BINDIR		?=$(DESTDIR)@bindir@
LIBDIR		?=$(DESTDIR)@libdir@
DATADIR		?=$(DESTDIR)@datarootdir@
MANDIR		?=$(DESTDIR)@mandir@
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

FRAMAC_LIBDIR	?=$(LIBDIR)/frama-c
FRAMAC_PLUGINDIR ?=$(FRAMAC_LIBDIR)/plugins
FRAMAC_DATADIR 	?=$(DATADIR)/frama-c
EMACS_DATADIR	?=$(DATADIR)/emacs/site-lisp
FRAMAC_DEFAULT_CPP ?=@FRAMAC_DEFAULT_CPP@
FRAMAC_DEFAULT_CPP_ARGS ?= @FRAMAC_DEFAULT_CPP_ARGS@
FRAMAC_GNU_CPP ?=@FRAMAC_GNU_CPP@
DEFAULT_CPP_KEEP_COMMENTS?=@DEFAULT_CPP_KEEP_COMMENTS@
DEFAULT_CPP_SUPPORTED_ARCH_OPTS?=@DEFAULT_CPP_SUPPORTED_ARCH_OPTS@
CC =@CC@

###############
# Ocaml stuff #
###############

# compilers and others executables
OCAMLC  	?=@OCAMLC@
OCAMLOPT	?=@OCAMLOPT@
OCAMLDEP	?=@OCAMLDEP@ -slash
OCAMLLEX	?=@OCAMLLEX@
OCAMLYACC	?=@OCAMLYACC@
OCAMLMKTOP	?=@OCAMLMKTOP@
François Bobot's avatar
François Bobot committed
68
69
OCAMLMKLIB	?=@OCAMLFIND@ ocamlmklib
OCAMLFIND	?=@OCAMLFIND@
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
OCAMLDOC	?=@OCAMLDOC@
OCAMLCP		?=@OCAMLCP@

# others ocaml stuffs

# either -annot or -dtypes
OCAML_ANNOT_OPTION ?=@OCAML_ANNOT_OPTION@
# ocaml stdlib path
OCAMLLIB	?=@OCAMLLIB@
# either opt or byte
OCAMLBEST	?=@OCAMLBEST@

OCAMLVERSION 	?=@OCAMLVERSION@

OCAMLMAJORNB    ?=@OCAMLMAJORNB@
OCAMLMINORNB    ?=@OCAMLMINORNB@
OCAMLPATCHNB    ?=@OCAMLPATCHNB@

88
89
HAS_OCAML409    ?=@HAS_OCAML409@
HAS_OCAML410    ?=@HAS_OCAML410@
90

91
PLATFORM	?=@PLATFORM@
92
OCAMLWIN32	?=@OCAMLWIN32@
93
DLLEXT          ?=@DLLEXT@
94
95
96
97
98
99
100
101
102
103
104

DEVELOPMENT	?=@DEVELOPMENT@

#############
# Libraries #
#############

# lablgtk
HAS_LABLGTK	?=@HAS_LABLGTK@
HAS_LABLGTK_CUSTOM_MODEL ?=@HAS_LABLGTK@
LABLGTK_PATH ?=@LABLGTK_PATH@
105
LABLGTK ?= lablgtk@LABLGTK_VERSION@
106
107
108
# lablgtksourceview
HAS_GTKSOURCEVIEW ?=@HAS_GTKSOURCEVIEW@

109
110
111
LABLGTK_VERSION ?=@LABLGTK_VERSION@
ifeq ("$(LABLGTK_VERSION)","3")
  GTKSOURCEVIEW:=lablgtk3-sourceview3
112
  THREAD:=-thread
113
114
115
else
  GTKSOURCEVIEW:=\
    $(patsubst lablgtk%,$(LABLGTK).%,$(basename $(notdir @GTKSOURCEVIEW@)))
116
  THREAD:=
117
endif
118

119
120
121
122
123
124
125
126
127
128
129
130
# lablgnomecanvas
HAS_GNOMECANVAS	?=@HAS_GNOMECANVAS@

# apron
HAS_APRON	?=@HAS_APRON@

# mpfr
HAS_MPFR ?=@HAS_MPFR@

# landmarks
HAS_LANDMARKS	?=@HAS_LANDMARKS@

131
132
133
# python 3.6
HAS_PYTHON36 ?=@HAS_PYTHON36@

134
135
136
137
138
139
140
141
142
143
##########################
# Miscellaneous commands #
##########################

OTAGS		?=@OTAGS@
DOT		?=@DOT@
HAS_DOT		?=@HAS_DOT@

HEADACHE 	?= headache -c $(FRAMAC_SRC)/headers/headache_config.txt

144
145
146
UNIX2DOS        ?= @UNIX2DOS@
HAS_UNIX2DOS    ?= @HAS_UNIX2DOS@

147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
###########################
# Miscellaneous variables #
###########################

VERBOSEMAKE	?=@VERBOSEMAKE@
LOCAL_MACHDEP	?=@LOCAL_MACHDEP@
EXE		?=@EXE@

# Required by Cil
UNDERSCORE_NAME ?=@UNDERSCORE_NAME@
HAVE_BUILTIN_VA_LIST ?=@HAVE_BUILTIN_VA_LIST@

# test directories for ptests configuration
# Non-plugin test directories containing some ML files to compile
TEST_DIRS_AS_PLUGIN:=\
162
  dynamic journal saveload spec misc syntax cil \
163
164
165
166
167
168
  pretty_printing builtins libc value

ifeq ($(HAS_PYTHON36),yes)
TEST_DIRS_AS_PLUGIN+= fc_script jcdb
endif

169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
PLUGIN_TESTS_LIST+=$(TEST_DIRS_AS_PLUGIN)

##########################
# Variables for plug-ins #
##########################

EXTERNAL_PLUGINS ?=@EXTERNAL_PLUGINS@

# Integrated plugins
ENABLE_CALLGRAPH                  ?=@ENABLE_CALLGRAPH@
ENABLE_CONSTANT_PROPAGATION       ?=@ENABLE_SEMANTIC_CONSTANT_FOLDING@
ENABLE_FROM_ANALYSIS              ?=@ENABLE_FROM_ANALYSIS@
ENABLE_GUI	                  ?=@ENABLE_GUI@
ENABLE_IMPACT	                  ?=@ENABLE_IMPACT@
ENABLE_INOUT	                  ?=@ENABLE_INOUT@
ENABLE_METRICS	                  ?=@ENABLE_METRICS@
ENABLE_OCCURRENCE                 ?=@ENABLE_OCCURRENCE@
ENABLE_PDG	                  ?=@ENABLE_PDG@
ENABLE_POSTDOMINATORS             ?=@ENABLE_POSTDOMINATORS@
ENABLE_RTEGEN                     ?=@ENABLE_RTEGEN@
ENABLE_SCOPE	                  ?=@ENABLE_SCOPE@
ENABLE_SLICING	                  ?=@ENABLE_SLICING@
ENABLE_SPARECODE                  ?=@ENABLE_SPARECODE@
ENABLE_USERS	                  ?=@ENABLE_USERS@
ENABLE_EVA                      ?=@ENABLE_EVA@

#bytes is part of the stdlib, but is used as a transitional package.
196
197
LIBRARY_NAMES := \
  findlib ocamlgraph unix str dynlink bytes zarith yojson bigarray
198
199
200
201
202
203

ifeq ($(HAS_LANDMARKS),yes)
LIBRARY_NAMES += landmarks landmarks.ppx
endif

ifneq ($(ENABLE_GUI),no)
204
  LIBRARY_NAMES_GUI = $(LABLGTK) $(GTKSOURCEVIEW)
205
206
207
  ifeq ($(HAS_GNOMECANVAS),yes)
    LIBRARY_NAMES_GUI+=lablgtk2.gnomecanvas
  endif
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
else
LIBRARY_NAMES_GUI =
endif

#######################
# Working directories #
#######################

ifeq ($(OCAMLWIN32),yes)
ifneq ($(CYGPATH),no)
# Note: using quotes in the line below leads to weird garbled characters
# in some versions of Cygwin.
winpath=$(shell $(CYGPATH) -m $(1))
else
winpath=$(1)
endif #CYGPATH
else
winpath=$(1)
endif #OCAMLWIN32

FRAMAC_ROOT_SRCDIR 	?= $(call winpath,@abs_top_srcdir@)

##########################################################################
# Local Variables:
# mode: makefile
# End: