1 #########################################################################
5 # Xavier Leroy, projet Cristal, INRIA Rocquencourt #
7 # Copyright 1999 Institut National de Recherche en Informatique et #
8 # en Automatique. All rights reserved. This file is distributed #
9 # under the terms of the GNU Library General Public License, with #
10 # the special exception on linking described in file ../LICENSE. #
12 #########################################################################
14 # $Id: Makefile-templ 9313 2009-07-15 12:13:31Z xleroy $
16 ### Compile-time configuration
18 ########## General configuration
20 ### Where to install the binaries
23 ### Where to install the standard library
24 LIBDIR=/usr/local/lib/ocaml
25 STUBLIBDIR=$(LIBDIR)/stublibs
27 ### Where to install the man pages
28 # Man pages for commands go in $(MANDIR)/man$(MANEXT)
29 # Man pages for the library go in $(MANDIR)/mano
33 ### Do #! scripts work on your system?
34 ### Beware: on some systems (e.g. SunOS 4), this will work only if
35 ### the string "#!$(BINDIR)/ocamlrun" is less than 32 characters long.
36 ### In doubt, set SHARPBANGSCRIPTS to false.
38 #SHARPBANGSCRIPTS=false
40 ########## Configuration for the bytecode compiler
42 ### Which C compiler to use for the bytecode interpreter.
43 ### Performance of the bytecode interpreter is *much* improved
44 ### if Gnu CC version 2 is used.
48 ### Additional compile-time options for $(BYTECC).
49 # If using gcc on Intel 386 or Motorola 68k:
50 # (the -fno-defer-pop option circumvents a bug in certain versions of gcc)
51 #BYTECCCOMPOPTS=-fno-defer-pop -Wall
52 # If using gcc and being superstitious:
55 #BYTECCCOMPOPTS=-U__GNUC__ -fno-defer-pop -Wall
59 ### Additional link-time options for $(BYTECC)
60 ### If using GCC on a Dec Alpha under OSF1:
61 #BYTECCLINKOPTS=-Wl,-T,12000000 -Wl,-D,14000000
62 # To support dynamic loading of shared libraries (they need to look at
64 #BYTECCLINKOPTS=-Wl,-E
70 #CCLIBS=-lcurses -ltermcap -lm
72 ### How to invoke the C preprocessor
73 # This is not needed anymore. Leave these lines commented out.
77 #CPP=/usr/ccs/lib/cpp -P
81 ### Magic declarations for ocamlbuild -- leave unchanged
82 #ml let syslib x = "-l"^x;;
83 #ml let mklib out files opts = Printf.sprintf "ar rc %s %s %s; ranlib %s" out opts files out;;
85 ### How to invoke ranlib
89 # If ranlib is not needed:
93 ### Shared library support
94 # Extension for shared libraries: so if supported, a if not supported
97 # Set to nothing if shared libraries supported, and to -custom if not supported
98 #CUSTOM_IF_NOT_SHARED=
99 #CUSTOM_IF_NOT_SHARED=-custom
100 # Options to $(BYTECC) to produce shared objects (e.g. PIC)
101 #SHAREDCCCOMPOPTS=-fPIC
102 # How to build a shared library, invoked with output .so as first arg
103 # and object files as remaining args
104 #MKSHAREDLIB=gcc -shared -o
105 # Compile-time option to $(BYTECC) to add a directory to be searched
106 # at run-time for shared libraries
107 #BYTECCRPATH=-Wl,-rpath
109 ############# Configuration for the native-code compiler
111 ### Name of architecture for the native-code compiler
112 ### Currently supported:
114 ### alpha Digital/Compaq Alpha machines under DUnix/Tru64 or Linux
115 ### i386 Intel Pentium PCs under Linux, *BSD*, NextStep
116 ### sparc Sun Sparcstation under SunOS 4.1 or Solaris 2
117 ### mips SGI machines under IRIX
118 ### hppa HP 9000/700 under HPUX and Linux
119 ### power Macintosh under Mac OS X and Linux
120 ### ia64 Intel Itanium/IA64 under Linux
121 ### arm ARM under Linux
123 ### Set ARCH=none if your machine is not supported
134 ### Name of architecture model for the native-code compiler.
135 ### Some architectures come in several slightly different flavors
136 ### that share a common code generator. This variable tailors the
137 ### behavior of the code generator to the particular flavor used.
138 ### Currently needed only if ARCH=power; leave MODEL=default for
139 ### other architectures.
140 ### If ARCH=power: set MODEL=ppc
141 ### For other architectures: leave MODEL=default
146 ### Name of operating system family for the native-code compiler.
147 ### If ARCH=sparc: choose between
148 ### SYSTEM=sunos SunOS 4.1
149 ### SYSTEM=solaris Solaris 2
151 ### If ARCH=i386: choose between
152 ### SYSTEM=linux_aout Linux with a.out binaries
153 ### SYSTEM=linux_elf Linux with ELF binaries
154 ### SYSTEM=bsd FreeBSD, probably works for NetBSD also
155 ### SYSTEM=nextstep NextStep
157 ### For other architectures: set SYSTEM=unknown
167 ### Which C compiler to use for the native-code compiler.
168 ### cc is better than gcc on the Mips and Alpha.
172 ### Additional compile-time options for $(NATIVECC).
173 # For cc on the Alpha:
174 #NATIVECCCOMPOPTS=-std1
175 # For cc on the Mips:
176 #NATIVECCCOMPOPTS=-std
177 # For gcc if superstitious:
178 #NATIVECCCOMPOPTS=-Wall
180 ### Additional link-time options for $(NATIVECC)
183 # Compile-time option to $(NATIVECC) to add a directory to be searched
184 # at run-time for shared libraries
185 #NATIVECCRPATH=-Wl,-rpath
187 ### Command and flags to use for assembling ocamlopt-generated code
188 # For the Alpha or the Mips:
195 ### Command and flags to use for assembling .S files (often with preprocessing)
196 # If gcc is available:
198 # On SunOS and Solaris:
201 ### Extra flags to use for assembling .S files in profiling mode
203 #ASPPPROFFLAGS=-pg -DPROFILING
205 #ASPPPROFFLAGS=-DPROFILING
207 ### Whether profiling with gprof is supported
208 # If yes: (x86/Linux, Alpha/Digital Unix, Sparc/Solaris):
210 # If no: (all others)
213 ### Option to give to the C compiler for profiling
217 ### How to perform a partial link
218 PARTIALLD=ld -r $(NATIVECCLINKOPTS)
220 ############# Configuration for the contributed libraries
222 ### Which libraries to compile and install
223 # Currently available:
224 # unix Unix system calls
225 # str Regular expressions and high-level string processing
226 # num Arbitrary-precision rational arithmetic
227 # threads Lightweight concurrent processes
228 # systhreads Same as threads, requires POSIX threads
229 # graph Portable drawing primitives for X11
230 # dynlink Dynamic linking of bytecode
231 # labltk Tcl/Tk interface
232 # bigarray Large, multidimensional numerical arrays
234 OTHERLIBRARIES=unix str num threads graph dynlink labltk bigarray
236 ### Name of the target architecture for the "num" library
238 # generic (portable C, works everywhere)
240 # amd64 (AMD Opteron, Athlon64)
245 # If you don't know, leave BNG_ARCH=generic, which selects a portable
246 # C implementation of these routines.
250 ### Link-time options to ocamlc or ocamlopt for linking with POSIX threads
251 # Needed for the "systhreads" package
253 #PTHREAD_LINK=-cclib -lpthread
255 #PTHREAD_LINK=-cclib -lpthread -cclib -lposix4
257 ### -I options for finding the X11/*.h includes
258 # Needed for the "graph" and "labltk" packages
260 #X11_INCLUDES=-I/usr/X11R6/include
261 # For SunOS with OpenLook:
262 #X11_INCLUDES=/usr/openwin/include
264 ### Link-time options to ocamlc or ocamlopt for linking with X11 libraries
265 # Needed for the "graph" and "labltk" packages
268 # For SunOS with OpenLook:
269 #X11_LINK=-L$(X11_LIB) -lX11
271 ### -I options for finding the include file ndbm.h
272 # Needed for the "dbm" package
275 # For recent Linux systems:
276 #DBM_INCLUDES=-I/usr/include/gdbm
278 ### Preprocessor options for finding tcl.h and tk.h
279 # Needed for the "labltk" package
280 # Required only if not in the standard include path.
281 # For Tcl/Tk 8.0 on FreeBSD:
282 #TK_DEFS="-I/usr/local/include/tcl8.0 -I/usr/local/include/tk8.0"
284 ### Linker options for linking tcl and tk libraries
285 # Needed for the "labltk" package
286 # Usually (with appropriate version numbers):
287 #TK_LINK="-ltk8.0 -ltcl8.0"
288 # For Tcl/Tk 8.0 on FreeBSD:
289 #TK_LINK="-L/usr/local/lib -ltk8.0 -ltcl8.0"