-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.config.in
96 lines (76 loc) · 2.39 KB
/
Makefile.config.in
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
# -*- mode: makefile -*-
######################################################################
# HAS Flags
######################################################################
# If defined to non-empty value, generates dynamic libraries.
# Do not forget to add -fPIC to CFLAGS and CFLAGS_DEBUG
HAS_SHARED=1
# If defined to non-empty value, generates native-code code
HAS_OCAMLOPT = 1
# If defined to non-empty value, uses ocamlfind(findlib) to install everything,
# instead of installing in $(MLGMPIDL_PREFIX)/... (see below)
# Comment if you do not want to use ocamlfind
OCAMLFIND = ocamlfind
######################################################################
# Directories
######################################################################
MLGMPIDL_PREFIX = /tmp
GMP_PREFIX = /usr
MPFR_PREFIX = /usr
CAML_DIR = $(shell ocamlc -where)
CAMLIDL_DIR = $(shell $(OCAMLFIND) query camlidl)
######################################################################
# Tools and Flags
######################################################################
###################################################
# Ocaml
OCAMLC = ocamlc.opt
OCAMLOPT = ocamlopt.opt
# ocamlc compilation flags
OCAMLFLAGS = -annot -g
# ocamlopt compilation flags
OCAMLOPTFLAGS = -annot -inline 20
OCAMLDEP = ocamldep
OCAMLLEX = ocamllex.opt
OCAMLYACC = ocamlyacc
OCAMLDOC = ocamldoc.opt
OCAMLMKTOP = ocamlmktop
OCAMLMKLIB = ocamlmklib
CAMLIDL = camlidl
###################################################
# C compiler
#CC = gcc
# C compilation flags
CFLAGS = \
-Wcast-qual -Wswitch -Werror-implicit-function-declaration \
-Wall -Wextra -Wundef -Wbad-function-cast -Wcast-align -Wstrict-prototypes \
-Wno-unused \
-fPIC \
-std=c99 \
-O3 -DNDEBUG
# For Mac x86_64, add -m64 -flat_namespace -undefined suppress
# C compilation flags in debug (or profile) mode
CFLAGS_DEBUG = \
-Wcast-qual -Wswitch -Werror-implicit-function-declaration \
-Wall -Wextra -Wundef -Wbad-function-cast -Wcast-align -Wstrict-prototypes \
-Wno-unused \
-fPIC \
-std=c99 \
-g -O0 -UNDEBUG
# C compilation flags in profiling mode
CFLAGS_PROF = \
-Wcast-qual -Wswitch -Werror-implicit-function-declaration \
-Wall -Wextra -Wundef -Wbad-function-cast -Wcast-align -Wstrict-prototypes \
-Wno-unused \
-std=c99 \
-fPIC -O3 -DNDEBUG -g -pg
AR = ar
RANLIB = ranlib
SED = sed
M4 = m4
INSTALL = install
INSTALLd = install -d
LATEX=latex
DVIPDF=dvipdf
MAKEINDEX=makeindex
RM ?= rm -f