ocaml/config/Makefile.mingw64

193 lines
5.0 KiB
Makefile
Raw Normal View History

#########################################################################
# #
# OCaml #
# #
# Xavier Leroy, projet Cristal, INRIA Rocquencourt #
# #
# Copyright 1999 Institut National de Recherche en Informatique et #
# en Automatique. All rights reserved. This file is distributed #
# under the terms of the GNU Library General Public License, with #
# the special exception on linking described in file ../LICENSE. #
# #
#########################################################################
# Configuration for Windows, Mingw compiler
######### General configuration
PREFIX=C:/ocamlmgw64
build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables. (Patch by Adrien Nader!) This makes the variable names more coherent and is in preparation for another patch that will allow disabling ocamldoc and ocamlbuild. This changes the interface of the configuration somewhat but I don't think anything outside of the ocaml tree reads the Makefile.config file that gets installed in order to see whether the debugger and camlp4 have been built. It also changes a .mli which might be problematic but I also believe it is safe and we have time to see if there's a bad impact. It also adds a configure switch to skip building ocamldebug. While at it, it fixes a PR number in the Changes file. build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables. This makes the variable names more coherent and is in preparation for another patch that will allow disabling ocamldoc and ocamlbuild. This changes the interface of the configuration somewhat but I don't think anything outside of the ocaml tree reads the Makefile.config file that gets installed in order to see whether the debugger and camlp4 have been built. It also changes a .mli which might be problematic but I also believe it is safe and we have time to see if there's a bad impact. It also adds a configure switch to skip building ocamldebug. While at it, it fixes a PR number in the Changes file. build: prepend "with_" to camlp4/ocamldebug-{en,dis}abling variables. This makes the variable names more coherent and is in preparation for another patch that will allow disabling ocamldoc and ocamlbuild. This changes the interface of the configuration somewhat but I don't think anything outside of the ocaml tree reads the Makefile.config file that gets installed in order to see whether the debugger and camlp4 have been built. It also changes a .mli which might be problematic but I also believe it is safe and we have time to see if there's a bad impact. It also adds a configure switch to skip building ocamldebug. While at it, it fixes a PR number in the Changes file. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-28 08:52:14 -07:00
### Remove this to disable compiling ocamldebug
WITH_DEBUGGER=ocamldebugger
### Remove this to disable compiling ocamldoc
WITH_OCAMLDOC=ocamldoc
### Where to install the binaries
BINDIR=$(PREFIX)/bin
### Where to install the standard library
LIBDIR=$(PREFIX)/lib
### Where to install the stub DLLs
STUBLIBDIR=$(LIBDIR)/stublibs
### Where to install the info files
DISTRIB=$(PREFIX)
### Where to install the man pages
MANDIR=$(PREFIX)/man
########## Toolchain and OS dependencies
TOOLCHAIN=mingw
### Toolchain prefix
TARGET=x86_64-w64-mingw32
HOST=$(TARGET)
TOOLPREF=$(TARGET)-
CCOMPTYPE=cc
O=o
A=a
S=s
SO=s.o
EXE=.exe
EXT_DLL=.dll
EXT_OBJ=.$(O)
EXT_LIB=.$(A)
EXT_ASM=.$(S)
MANEXT=1
SHARPBANGSCRIPTS=false
PTHREAD_LINK=
X11_INCLUDES=
X11_LINK=
BYTECCRPATH=
SUPPORTS_SHARED_LIBRARIES=true
SHAREDCCCOMPOPTS=-O
MKSHAREDLIBRPATH=
NATIVECCPROFOPTS=
NATIVECCRPATH=
ASM=$(TOOLPREF)as
ASPP=$(TOOLPREF)gcc -c
ASPPPROFFLAGS=
PROFILING=noprof
DYNLINKOPTS=
CC_PROFILE=
SYSTHREAD_SUPPORT=true
EXTRALIBS=
NATDYNLINK=true
CMXS=cmxs
RUNTIMED=noruntimed
ASM_CFI_SUPPORTED=false
UNIXLIB=win32unix
GRAPHLIB=win32graph
FLAMBDA=false
########## Configuration for the bytecode compiler
### Which C compiler to use for the bytecode interpreter.
BYTECC=$(TOOLPREF)gcc
### Additional compile-time options for $(BYTECC). (For static linking.)
BYTECCCOMPOPTS=-O -mms-bitfields -Wall -Wno-unused
### Additional link-time options for $(BYTECC). (For static linking.)
BYTECCLINKOPTS=
### Additional compile-time options for $(BYTECC). (For building a DLL.)
DLLCCCOMPOPTS=-O -mms-bitfields -Wall -Wno-unused -DCAML_DLL
### Libraries needed
BYTECCLIBS=-lws2_32
NATIVECCLIBS=-lws2_32
### How to invoke the C preprocessor
CPP=$(BYTECC) -E
### Flexlink
FLEXLINK_CMD=flexlink
FLEXDLL_CHAIN=mingw64
# FLEXLINK_FLAGS must be safe to insert in an OCaml string
# (see ocamlmklibconfig.ml in tools/Makefile.nt)
FLEXLINK_FLAGS=-chain $(FLEXDLL_CHAIN) -stack 33554432
FLEXLINK=$(FLEXLINK_CMD) $(FLEXLINK_FLAGS)
FLEXDIR:=$(shell $(FLEXLINK) -where 2>/dev/null)
ifeq ($(FLEXDIR),)
IFLEXDIR=-I"../flexdll"
else
IFLEXDIR=-I"$(FLEXDIR)"
endif
# MKDLL, MKEXE and MKMAINDLL must ultimately be equivalent to
# $(FLEXLINK_CMD) $(FLEXLINK_FLAGS) [-exe|-maindll]
# or OCAML_FLEXLINK overriding will not work (see utils/config.mlp)
MKDLL=$(FLEXLINK)
MKEXE=$(FLEXLINK) -exe
MKMAINDLL=$(FLEXLINK) -maindll
### Native command to build ocamlrun.exe without flexlink
MKEXE_BOOT=$(BYTECC) -o $(1) $(2)
### How to build a static library
MKLIB=rm -f $(1); $(TOOLPREF)ar rc $(1) $(2); $(RANLIB) $(1)
2016-02-16 04:23:31 -08:00
#ml let mklib out files opts =
#ml Printf.sprintf "rm -f %s && %sar rcs %s %s %s"
#ml out toolpref opts out files;;
### Canonicalize the name of a system library
SYSLIB=-l$(1)
#ml let syslib x = "-l"^x;;
### The ranlib command
RANLIB=$(TOOLPREF)ranlib
RANLIBCMD=$(TOOLPREF)ranlib
### The ar command
ARCMD=$(TOOLPREF)ar
############# Configuration for the native-code compiler
### Name of architecture for the native-code compiler
ARCH=amd64
### Name of architecture model for the native-code compiler.
MODEL=default
### Name of operating system family for the native-code compiler.
SYSTEM=mingw64
### Which C compiler to use for the native-code compiler.
NATIVECC=$(BYTECC)
### Additional compile-time options for $(NATIVECC).
NATIVECCCOMPOPTS=-O -mms-bitfields -Wall -Wno-unused
### Additional link-time options for $(NATIVECC)
NATIVECCLINKOPTS=
### Build partially-linked object file
PACKLD=$(TOOLPREF)ld -r $(NATIVECCLINKOPTS) -o # must have a space after '-o'
############# Configuration for the contributed libraries
OTHERLIBRARIES=win32unix str num win32graph dynlink bigarray systhreads
### Name of the target architecture for the "num" library
BNG_ARCH=amd64
BNG_ASM_LEVEL=1
############# Aliases for common commands
MAKEREC=$(MAKE) -f Makefile.nt
MAKECMD=$(MAKE)
############# for the testsuite makefiles
#ml let topdir = "" and wintopdir = "";;
OTOPDIR=$(WINTOPDIR)
CTOPDIR=$(TOPDIR)
CYGPATH=cygpath -m
DIFF=diff -q --strip-trailing-cr
SET_LD_PATH=PATH="$(PATH):$(LD_PATH)"
MAX_TESTSUITE_DIR_RETRIES=1