-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile.config.model
109 lines (85 loc) · 2.83 KB
/
Makefile.config.model
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
107
108
109
# -*- 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
######################################################################
# Where to *INSTALL* the package ($MLGMPIDL_PREFIX)/lib)
# (if not using ocamlfind)
MLGMPIDL_PREFIX = /tmp
# Where to find GMP ($(GMP_PREFIX)/include, ($GMP_PREFIX)/lib)
#
GMP_PREFIX = /usr
# Where to find MPFR ($(MPFR_PREFIX)/include, ($MPFR_PREFIX)/lib
# (needed if HAS_MPFR=1)
MPFR_PREFIX = /usr
# Where to find OCAML library
#
CAML_DIR = $(shell ocamlc -where)
# Where to find CAMLIDL's library (usually the same as $(CAML_DIR), or
# the result of `ocamlfind query camlidl`).
CAMLIDL_DIR = $(CAML_DIR)
# 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 = $(CAML_PREFIX)/bin/ocamldep
OCAMLDOC = $(CAML_PREFIX)/bin/ocamldoc.opt
OCAMLMKTOP = $(CAML_PREFIX)/bin/ocamlmktop
OCAMLMKLIB = $(CAML_PREFIX)/bin/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
PERL = perl
INSTALL = install
INSTALLd = install -d
LATEX=latex
DVIPDF=dvipdf
MAKEINDEX=makeindex
RM ?= rm -f