summaryrefslogtreecommitdiff
path: root/config/Makefile.mingw64
blob: 54de4ec5efca31839766a4f4a163c9a2e7b68a25 (plain)
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#**************************************************************************
#*                                                                        *
#*                                 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, Mingw compiler

######### General configuration

PREFIX=C:/ocamlmgw64

### 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

### Standard runtime system
BYTERUN=ocamlrun

### 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
EMPTY=
OUTPUTEXE=-o $(EMPTY)
EXT_DLL=.dll
EXT_OBJ=.$(O)
OUTPUTOBJ=-o $(EMPTY)
EXT_LIB=.$(A)
EXT_ASM=.$(S)
PROGRAMS_MAN_SECTION=1
LIBRARIES_MAN_SECTION=3
HASHBANGSCRIPTS=false
PTHREAD_LINK=
PTHREAD_CAML_LINK=
X11_INCLUDES=
X11_LINK=
RPATH=
SUPPORTS_SHARED_LIBRARIES=true
SHAREDCCCOMPOPTS=
MKSHAREDLIBRPATH=
NATIVECCPROFOPTS=
ASM=$(TOOLPREF)as
ASPP=$(TOOLPREF)gcc -c
ASPPPROFFLAGS=
PROFILING=false
DYNLINKOPTS=
CC_PROFILE=
SYSTHREAD_SUPPORT=true
EXTRALIBS=
NATDYNLINK=true
NATDYNLINKOPTS=
CMXS=cmxs
RUNTIMED=false
ASM_CFI_SUPPORTED=false
WITH_FRAME_POINTERS=false
UNIX_OR_WIN32=win32
UNIXLIB=win32unix
GRAPHLIB=win32graph
FLAMBDA=false
WITH_PROFINFO=false
WITH_SPACETIME=false
LIBUNWIND_AVAILABLE=false
LIBUNWIND_LINK_FLAGS=
PROFINFO_WIDTH=26
SAFE_STRING=false
AFL_INSTRUMENT=false

########## Configuration for the bytecode compiler

### Which C compiler to use for the bytecode interpreter.
CC = $(TOOLPREF)gcc
CFLAGS = -O -mms-bitfields -Wall -Wno-unused
CPPFLAGS = -DCAML_NAME_SPACE
OCAMLC_CFLAGS = -O -mms-bitfields

BYTECCDBGCOMPOPTS=-g

LDFLAGS=

### Libraries needed
BYTECCLIBS=-lws2_32
NATIVECCLIBS=-lws2_32

### How to invoke the C preprocessor
CPP=$(CC) -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)
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
MKEXEDEBUGFLAG=-g
MKMAINDLL=$(FLEXLINK) -maindll

### Native command to build ocamlrun.exe without flexlink
MKEXE_BOOT=$(CC) $(CFLAGS) $(OUTPUTEXE)$(1) $(2)

### How to build a static library
MKLIB=rm -f $(1); $(TOOLPREF)ar rc $(1) $(2); $(RANLIB) $(1)
#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

OCAMLOPT_CFLAGS = -O -mms-bitfields

### Build partially-linked object file
PACKLD=$(TOOLPREF)ld -r -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

############# for the testsuite makefiles
#ml let topdir = "" and wintopdir = "";;
OTOPDIR=$(WINTOPDIR)
CTOPDIR=$(TOPDIR)
CYGPATH=cygpath -m
DIFF=/usr/bin/diff -q --strip-trailing-cr
SET_LD_PATH=PATH="$(PATH):$(LD_PATH)"
MAX_TESTSUITE_DIR_RETRIES=1