201 lines
5.5 KiB
Makefile
201 lines
5.5 KiB
Makefile
#**************************************************************************
|
|
#* *
|
|
#* 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 Lesser General Public License version 2.1, with the *
|
|
#* special exception on linking described in the file LICENSE. *
|
|
#* *
|
|
#**************************************************************************
|
|
|
|
# Configuration for Windows, Visual C++ compiler
|
|
|
|
######### General configuration
|
|
|
|
PREFIX=C:/ocamlms
|
|
|
|
### 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=msvc
|
|
|
|
# It doesn't make much sense to set "TARGET" and "HOST" for msvc but it's needed
|
|
# for the myocamlbuild config.
|
|
# The only case these will be used currently is to check whether we're
|
|
# cross-compiling or not so setting them to the same value is what matters.
|
|
HOST=msvc
|
|
TARGET=$(HOST)
|
|
|
|
CCOMPTYPE=msvc
|
|
O=obj
|
|
A=lib
|
|
S=asm
|
|
SO=s.obj
|
|
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=-Ox
|
|
NATIVECCPROFOPTS=
|
|
NATIVECCRPATH=
|
|
ASM=ml -nologo -coff -Cp -c -Fo
|
|
ASPP=
|
|
ASPPPROFFLAGS=
|
|
PROFILING=noprof
|
|
DYNLINKOPTS=
|
|
CC_PROFILE=
|
|
SYSTHREAD_SUPPORT=true
|
|
EXTRALIBS=
|
|
CMXS=cmxs
|
|
NATDYNLINK=true
|
|
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=cl -nologo -D_CRT_SECURE_NO_DEPRECATE
|
|
|
|
### Additional compile-time options for $(BYTECC). (For static linking.)
|
|
BYTECCCOMPOPTS=-O2 -Gy- -MD
|
|
|
|
### Additional link-time options for $(BYTECC). (For static linking.)
|
|
BYTECCLINKOPTS=
|
|
|
|
### Additional compile-time options for $(BYTECC). (For building a DLL.)
|
|
DLLCCCOMPOPTS=-O2 -Gy- -MD
|
|
|
|
### Libraries needed
|
|
BYTECCLIBS=advapi32.lib ws2_32.lib
|
|
NATIVECCLIBS=advapi32.lib ws2_32.lib
|
|
|
|
### How to invoke the C preprocessor
|
|
CPP=cl -nologo -EP
|
|
|
|
### Flexlink
|
|
FLEXLINK_CMD=flexlink
|
|
FLEXDLL_CHAIN=msvc
|
|
# FLEXLINK_FLAGS must be safe to insert in an OCaml string
|
|
# (see ocamlmklibconfig.ml in tools/Makefile.nt)
|
|
FLEXLINK_FLAGS=-merge-manifest -stack 16777216
|
|
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
|
|
MERGEMANIFESTEXE=test ! -f $(1).manifest \
|
|
|| mt -nologo -outputresource:$(1) -manifest $(1).manifest \
|
|
&& rm -f $(1).manifest
|
|
MKEXE_BOOT=$(BYTECC) /Fe$(1) $(2) /link /subsystem:console \
|
|
&& ($(MERGEMANIFESTEXE))
|
|
|
|
### How to build a static library
|
|
MKLIB=link -lib -nologo -out:$(1) $(2)
|
|
#ml let mklib out files opts =
|
|
#ml Printf.sprintf "link -lib -nologo -out:%s %s %s" out opts files;;
|
|
MKSHAREDLIBRPATH=
|
|
|
|
### Canonicalize the name of a system library
|
|
SYSLIB=$(1).lib
|
|
#ml let syslib x = x ^ ".lib";;
|
|
|
|
### The ranlib command
|
|
RANLIB=echo
|
|
RANLIBCMD=
|
|
|
|
### The ar command
|
|
ARCMD=
|
|
|
|
############# Configuration for the native-code compiler
|
|
|
|
### Name of architecture for the native-code compiler
|
|
ARCH=i386
|
|
|
|
### Name of architecture model for the native-code compiler.
|
|
MODEL=default
|
|
|
|
### Name of operating system family for the native-code compiler.
|
|
SYSTEM=win32
|
|
|
|
### Which C compiler to use for the native-code compiler.
|
|
NATIVECC=cl -nologo -D_CRT_SECURE_NO_DEPRECATE
|
|
|
|
### Additional compile-time options for $(NATIVECC).
|
|
NATIVECCCOMPOPTS=-O2 -Gy- -MD
|
|
|
|
### Additional link-time options for $(NATIVECC)
|
|
NATIVECCLINKOPTS=
|
|
|
|
### Build partially-linked object file
|
|
PACKLD=link -lib -nologo -out:# there must be no space after this '-out:'
|
|
|
|
### Clear this to disable compiling ocamldebug
|
|
WITH_DEBUGGER=ocamldebugger
|
|
|
|
### Clear this to disable compiling ocamldoc
|
|
WITH_OCAMLDOC=ocamldoc
|
|
|
|
############# Configuration for the contributed libraries
|
|
|
|
OTHERLIBRARIES=win32unix systhreads str num win32graph dynlink bigarray
|
|
|
|
### Name of the target architecture for the "num" library
|
|
BNG_ARCH=generic
|
|
BNG_ASM_LEVEL=0
|
|
|
|
############# Aliases for common commands
|
|
|
|
MAKEREC=$(MAKE) -f Makefile.nt
|
|
MAKECMD=$(MAKE)
|
|
|
|
############# for the testsuite makefiles
|
|
#ml let topdir = "" and wintopdir = "";;
|
|
OTOPDIR=$(WINTOPDIR)
|
|
CTOPDIR=$(WINTOPDIR)
|
|
CYGPATH=cygpath -m
|
|
DIFF=diff -q --strip-trailing-cr
|
|
FIND=/usr/bin/find
|
|
SORT=/usr/bin/sort
|
|
SET_LD_PATH=PATH="$(PATH):$(LD_PATH)"
|
|
MAX_TESTSUITE_DIR_RETRIES=1
|