1999-11-17 10:59:06 -08:00
|
|
|
#########################################################################
|
|
|
|
# #
|
2011-07-27 07:17:02 -07:00
|
|
|
# OCaml #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
# Xavier Leroy, projet Cristal, INRIA Rocquencourt #
|
|
|
|
# #
|
|
|
|
# Copyright 1999 Institut National de Recherche en Informatique et #
|
|
|
|
# en Automatique. All rights reserved. This file is distributed #
|
2001-12-07 05:41:02 -08:00
|
|
|
# under the terms of the GNU Library General Public License, with #
|
|
|
|
# the special exception on linking described in file ../LICENSE. #
|
1999-11-17 10:59:06 -08:00
|
|
|
# #
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
### Compile-time configuration
|
|
|
|
|
1995-08-08 05:17:31 -07:00
|
|
|
########## General configuration
|
|
|
|
|
|
|
|
### Where to install the binaries
|
|
|
|
BINDIR=/usr/local/bin
|
|
|
|
|
|
|
|
### Where to install the standard library
|
2002-06-27 04:36:02 -07:00
|
|
|
LIBDIR=/usr/local/lib/ocaml
|
|
|
|
STUBLIBDIR=$(LIBDIR)/stublibs
|
1995-08-08 05:17:31 -07:00
|
|
|
|
|
|
|
### Where to install the man pages
|
2002-04-24 02:26:32 -07:00
|
|
|
# Man pages for commands go in $(MANDIR)/man$(MANEXT)
|
|
|
|
# Man pages for the library go in $(MANDIR)/mano
|
|
|
|
MANDIR=/usr/local/man
|
1995-08-08 05:17:31 -07:00
|
|
|
MANEXT=1
|
|
|
|
|
|
|
|
### Do #! scripts work on your system?
|
2010-01-22 04:48:24 -08:00
|
|
|
### Beware: on some systems (e.g. SunOS 4), this will work only if
|
1996-05-11 11:26:49 -07:00
|
|
|
### the string "#!$(BINDIR)/ocamlrun" is less than 32 characters long.
|
1995-08-09 02:55:27 -07:00
|
|
|
### In doubt, set SHARPBANGSCRIPTS to false.
|
1995-08-08 05:17:31 -07:00
|
|
|
SHARPBANGSCRIPTS=true
|
|
|
|
#SHARPBANGSCRIPTS=false
|
|
|
|
|
|
|
|
########## Configuration for the bytecode compiler
|
1995-07-02 09:40:47 -07:00
|
|
|
|
1995-07-18 01:39:40 -07:00
|
|
|
### Which C compiler to use for the bytecode interpreter.
|
1995-07-02 09:40:47 -07:00
|
|
|
### Performance of the bytecode interpreter is *much* improved
|
1995-08-08 05:17:31 -07:00
|
|
|
### if Gnu CC version 2 is used.
|
1996-02-13 08:29:09 -08:00
|
|
|
#BYTECC=gcc
|
1995-08-09 02:55:27 -07:00
|
|
|
#BYTECC=cc
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-07-18 01:39:40 -07:00
|
|
|
### Additional compile-time options for $(BYTECC).
|
2011-12-17 04:44:23 -08:00
|
|
|
# If using gcc on Intel x86:
|
2002-02-08 08:55:44 -08:00
|
|
|
# (the -fno-defer-pop option circumvents a bug in certain versions of gcc)
|
1995-11-05 09:34:14 -08:00
|
|
|
#BYTECCCOMPOPTS=-fno-defer-pop -Wall
|
2011-12-17 04:44:23 -08:00
|
|
|
# If using gcc and being cautious:
|
1996-02-13 08:29:09 -08:00
|
|
|
#BYTECCCOMPOPTS=-Wall
|
1995-05-04 03:15:53 -07:00
|
|
|
# Otherwise:
|
1995-08-08 05:17:31 -07:00
|
|
|
#BYTECCCOMPOPTS=
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-09-27 03:46:25 -07:00
|
|
|
### Additional link-time options for $(BYTECC)
|
2001-08-28 07:47:48 -07:00
|
|
|
# To support dynamic loading of shared libraries (they need to look at
|
|
|
|
# our own symbols):
|
|
|
|
#BYTECCLINKOPTS=-Wl,-E
|
1995-05-04 03:15:53 -07:00
|
|
|
# Otherwise:
|
1996-02-13 08:29:09 -08:00
|
|
|
#BYTECCLINKOPTS=
|
1995-07-18 10:41:36 -07:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
### Libraries needed
|
1995-08-08 05:17:31 -07:00
|
|
|
# On most platforms:
|
1996-02-13 08:29:09 -08:00
|
|
|
#CCLIBS=-lcurses -ltermcap -lm
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1996-02-15 08:19:09 -08:00
|
|
|
### How to invoke the C preprocessor
|
1996-10-07 07:02:45 -07:00
|
|
|
# This is not needed anymore. Leave these lines commented out.
|
1996-02-15 08:19:09 -08:00
|
|
|
# On most machines:
|
|
|
|
#CPP=/lib/cpp -P
|
|
|
|
# Under Solaris:
|
|
|
|
#CPP=/usr/ccs/lib/cpp -P
|
|
|
|
# Under FreeBSD:
|
|
|
|
#CPP=cpp -P
|
|
|
|
|
2010-01-20 08:26:46 -08:00
|
|
|
### Magic declarations for ocamlbuild -- leave unchanged
|
|
|
|
#ml let syslib x = "-l"^x;;
|
|
|
|
#ml let mklib out files opts = Printf.sprintf "ar rc %s %s %s; ranlib %s" out opts files out;;
|
|
|
|
|
1995-08-08 05:17:31 -07:00
|
|
|
### How to invoke ranlib
|
2010-01-20 08:26:46 -08:00
|
|
|
RANLIB=ranlib
|
|
|
|
RANLIBCMD=ranlib
|
|
|
|
|
1996-11-07 02:58:12 -08:00
|
|
|
# If ranlib is not needed:
|
|
|
|
#RANLIB=ar rs
|
|
|
|
#RANLIBCMD=
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2012-01-16 01:05:37 -08:00
|
|
|
### How to invoke ar
|
|
|
|
#ARCMD=ar
|
|
|
|
|
2001-08-28 07:47:48 -07:00
|
|
|
### Shared library support
|
|
|
|
# Extension for shared libraries: so if supported, a if not supported
|
|
|
|
#SO=so
|
|
|
|
#SO=a
|
|
|
|
# Set to nothing if shared libraries supported, and to -custom if not supported
|
|
|
|
#CUSTOM_IF_NOT_SHARED=
|
|
|
|
#CUSTOM_IF_NOT_SHARED=-custom
|
|
|
|
# Options to $(BYTECC) to produce shared objects (e.g. PIC)
|
|
|
|
#SHAREDCCCOMPOPTS=-fPIC
|
|
|
|
# How to build a shared library, invoked with output .so as first arg
|
|
|
|
# and object files as remaining args
|
|
|
|
#MKSHAREDLIB=gcc -shared -o
|
|
|
|
# Compile-time option to $(BYTECC) to add a directory to be searched
|
|
|
|
# at run-time for shared libraries
|
|
|
|
#BYTECCRPATH=-Wl,-rpath
|
|
|
|
|
1995-08-08 05:17:31 -07:00
|
|
|
############# Configuration for the native-code compiler
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1995-08-08 05:17:31 -07:00
|
|
|
### Name of architecture for the native-code compiler
|
|
|
|
### Currently supported:
|
|
|
|
###
|
2002-02-08 08:55:44 -08:00
|
|
|
### i386 Intel Pentium PCs under Linux, *BSD*, NextStep
|
1995-08-08 05:17:31 -07:00
|
|
|
### sparc Sun Sparcstation under SunOS 4.1 or Solaris 2
|
2004-06-19 09:17:31 -07:00
|
|
|
### power Macintosh under Mac OS X and Linux
|
2002-02-08 08:55:44 -08:00
|
|
|
### arm ARM under Linux
|
1995-08-08 05:17:31 -07:00
|
|
|
###
|
|
|
|
### Set ARCH=none if your machine is not supported
|
1995-11-05 09:34:14 -08:00
|
|
|
#ARCH=i386
|
2002-02-08 08:55:44 -08:00
|
|
|
#ARCH=sparc
|
|
|
|
#ARCH=power
|
|
|
|
#ARCH=arm
|
1995-08-08 05:17:31 -07:00
|
|
|
#ARCH=none
|
|
|
|
|
1996-01-08 02:14:54 -08:00
|
|
|
### Name of architecture model for the native-code compiler.
|
|
|
|
### Some architectures come in several slightly different flavors
|
|
|
|
### that share a common code generator. This variable tailors the
|
|
|
|
### behavior of the code generator to the particular flavor used.
|
|
|
|
### Currently needed only if ARCH=power; leave MODEL=default for
|
|
|
|
### other architectures.
|
2004-06-19 09:17:31 -07:00
|
|
|
### If ARCH=power: set MODEL=ppc
|
1996-01-08 02:14:54 -08:00
|
|
|
### For other architectures: leave MODEL=default
|
|
|
|
###
|
|
|
|
#MODEL=ppc
|
1996-02-13 08:29:09 -08:00
|
|
|
#MODEL=default
|
1996-01-08 02:14:54 -08:00
|
|
|
|
1995-10-31 01:27:00 -08:00
|
|
|
### Name of operating system family for the native-code compiler.
|
1995-08-08 05:17:31 -07:00
|
|
|
#SYSTEM=solaris
|
1995-11-05 09:34:14 -08:00
|
|
|
#SYSTEM=linux
|
1995-10-31 01:27:00 -08:00
|
|
|
#SYSTEM=linux_elf
|
|
|
|
#SYSTEM=bsd
|
1996-02-13 08:29:09 -08:00
|
|
|
#SYSTEM=unknown
|
1995-08-08 05:17:31 -07:00
|
|
|
|
|
|
|
### Which C compiler to use for the native-code compiler.
|
1996-02-13 08:29:09 -08:00
|
|
|
#NATIVECC=cc
|
1995-11-05 09:34:14 -08:00
|
|
|
#NATIVECC=gcc
|
1995-08-08 05:17:31 -07:00
|
|
|
|
|
|
|
### Additional compile-time options for $(NATIVECC).
|
2011-12-17 04:44:23 -08:00
|
|
|
# For gcc if cautious:
|
1995-11-05 09:34:14 -08:00
|
|
|
#NATIVECCCOMPOPTS=-Wall
|
1995-08-08 05:17:31 -07:00
|
|
|
|
1995-09-27 03:46:25 -07:00
|
|
|
### Additional link-time options for $(NATIVECC)
|
1996-02-13 08:29:09 -08:00
|
|
|
#NATIVECCLINKOPTS=
|
1995-09-27 03:46:25 -07:00
|
|
|
|
2001-08-28 07:47:48 -07:00
|
|
|
# Compile-time option to $(NATIVECC) to add a directory to be searched
|
|
|
|
# at run-time for shared libraries
|
|
|
|
#NATIVECCRPATH=-Wl,-rpath
|
|
|
|
|
2007-10-30 05:37:16 -07:00
|
|
|
### Command and flags to use for assembling ocamlopt-generated code
|
2011-08-01 01:52:10 -07:00
|
|
|
#ASM=as
|
1995-11-05 09:34:14 -08:00
|
|
|
|
1996-09-18 06:24:56 -07:00
|
|
|
### Command and flags to use for assembling .S files (often with preprocessing)
|
|
|
|
# If gcc is available:
|
2007-10-30 05:37:16 -07:00
|
|
|
#ASPP=gcc -c
|
2011-12-17 04:44:23 -08:00
|
|
|
# On Solaris:
|
2007-10-30 05:37:16 -07:00
|
|
|
#ASPP=as -P
|
1996-09-18 06:24:56 -07:00
|
|
|
|
1998-08-06 07:25:24 -07:00
|
|
|
### Extra flags to use for assembling .S files in profiling mode
|
|
|
|
#ASPPPROFFLAGS=-DPROFILING
|
|
|
|
|
1998-11-06 07:39:18 -08:00
|
|
|
### Whether profiling with gprof is supported
|
2011-12-17 04:44:23 -08:00
|
|
|
# If yes: (e.g. x86/Linux, Sparc/Solaris):
|
1998-11-06 07:39:18 -08:00
|
|
|
#PROFILING=prof
|
2011-12-17 04:44:23 -08:00
|
|
|
# If no:
|
1998-11-06 07:39:18 -08:00
|
|
|
#PROFILING=noprof
|
|
|
|
|
2002-12-02 04:31:19 -08:00
|
|
|
### Option to give to the C compiler for profiling
|
|
|
|
#CC_PROFILE=-pg
|
|
|
|
#CC_PROFILE=-xpg
|
|
|
|
|
2003-07-03 08:13:23 -07:00
|
|
|
### How to perform a partial link
|
|
|
|
PARTIALLD=ld -r $(NATIVECCLINKOPTS)
|
2002-02-08 08:55:44 -08:00
|
|
|
|
1995-11-05 09:34:14 -08:00
|
|
|
############# Configuration for the contributed libraries
|
|
|
|
|
1996-04-01 07:25:05 -08:00
|
|
|
### Which libraries to compile and install
|
|
|
|
# Currently available:
|
|
|
|
# unix Unix system calls
|
|
|
|
# str Regular expressions and high-level string processing
|
|
|
|
# num Arbitrary-precision rational arithmetic
|
2010-01-22 04:48:24 -08:00
|
|
|
# threads Lightweight concurrent processes
|
1997-12-02 05:06:56 -08:00
|
|
|
# systhreads Same as threads, requires POSIX threads
|
1996-04-01 07:25:05 -08:00
|
|
|
# graph Portable drawing primitives for X11
|
|
|
|
# dynlink Dynamic linking of bytecode
|
2000-02-16 18:19:56 -08:00
|
|
|
# labltk Tcl/Tk interface
|
2000-03-16 05:35:20 -08:00
|
|
|
# bigarray Large, multidimensional numerical arrays
|
|
|
|
|
|
|
|
OTHERLIBRARIES=unix str num threads graph dynlink labltk bigarray
|
1996-04-01 07:25:05 -08:00
|
|
|
|
1995-11-05 09:34:14 -08:00
|
|
|
### Name of the target architecture for the "num" library
|
|
|
|
# Known targets:
|
2004-04-01 05:08:56 -08:00
|
|
|
# generic (portable C, works everywhere)
|
|
|
|
# ia32 (Intel x86)
|
|
|
|
# amd64 (AMD Opteron, Athlon64)
|
|
|
|
# ppc (Power PC)
|
|
|
|
# sparc
|
|
|
|
# If you don't know, leave BNG_ARCH=generic, which selects a portable
|
1995-11-05 09:34:14 -08:00
|
|
|
# C implementation of these routines.
|
2004-04-01 05:08:56 -08:00
|
|
|
BNG_ARCH=generic
|
|
|
|
BNG_ASM_LEVEL=1
|
1995-11-05 09:34:14 -08:00
|
|
|
|
2000-03-09 01:09:14 -08:00
|
|
|
### Link-time options to ocamlc or ocamlopt for linking with POSIX threads
|
|
|
|
# Needed for the "systhreads" package
|
|
|
|
# Usually:
|
|
|
|
#PTHREAD_LINK=-cclib -lpthread
|
|
|
|
# For Solaris:
|
|
|
|
#PTHREAD_LINK=-cclib -lpthread -cclib -lposix4
|
|
|
|
|
2000-03-25 10:54:03 -08:00
|
|
|
### -I options for finding the X11/*.h includes
|
2000-02-16 18:19:56 -08:00
|
|
|
# Needed for the "graph" and "labltk" packages
|
1995-11-05 09:34:14 -08:00
|
|
|
# Usually:
|
2000-03-25 10:54:03 -08:00
|
|
|
#X11_INCLUDES=-I/usr/X11R6/include
|
1995-11-05 09:34:14 -08:00
|
|
|
# For SunOS with OpenLook:
|
|
|
|
#X11_INCLUDES=/usr/openwin/include
|
|
|
|
|
1996-05-11 11:26:49 -07:00
|
|
|
### Link-time options to ocamlc or ocamlopt for linking with X11 libraries
|
2000-02-16 18:19:56 -08:00
|
|
|
# Needed for the "graph" and "labltk" packages
|
1995-11-05 09:34:14 -08:00
|
|
|
# Usually:
|
2001-08-28 07:47:48 -07:00
|
|
|
#X11_LINK=-lX11
|
1995-11-05 09:34:14 -08:00
|
|
|
# For SunOS with OpenLook:
|
2001-08-28 07:47:48 -07:00
|
|
|
#X11_LINK=-L$(X11_LIB) -lX11
|
1996-04-01 07:25:05 -08:00
|
|
|
|
2000-02-16 18:19:56 -08:00
|
|
|
### Preprocessor options for finding tcl.h and tk.h
|
|
|
|
# Needed for the "labltk" package
|
|
|
|
# Required only if not in the standard include path.
|
|
|
|
# For Tcl/Tk 8.0 on FreeBSD:
|
|
|
|
#TK_DEFS="-I/usr/local/include/tcl8.0 -I/usr/local/include/tk8.0"
|
|
|
|
|
|
|
|
### Linker options for linking tcl and tk libraries
|
|
|
|
# Needed for the "labltk" package
|
|
|
|
# Usually (with appropriate version numbers):
|
|
|
|
#TK_LINK="-ltk8.0 -ltcl8.0"
|
|
|
|
# For Tcl/Tk 8.0 on FreeBSD:
|
|
|
|
#TK_LINK="-L/usr/local/lib -ltk8.0 -ltcl8.0"
|