Add copyright notices and new function String.chomp
[ocaml.git] / config / Makefile.mingw
blob94c685e84d42ce5823592f117712603b6df8d5e6
1 #########################################################################
2 #                                                                       #
3 #                            Objective Caml                             #
4 #                                                                       #
5 #            Xavier Leroy, projet Cristal, INRIA Rocquencourt           #
6 #                                                                       #
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.      #
11 #                                                                       #
12 #########################################################################
14 # $Id$
16 # Configuration for Windows, Mingw compiler
18 ######### General configuration
20 PREFIX=C:/ocamlmgw
22 ### Where to install the binaries
23 BINDIR=$(PREFIX)/bin
25 ### Where to install the standard library
26 LIBDIR=$(PREFIX)/lib
28 ### Where to install the stub DLLs
29 STUBLIBDIR=$(LIBDIR)/stublibs
31 ### Where to install the info files
32 DISTRIB=$(PREFIX)
34 ### Where to install the man pages
35 MANDIR=$(PREFIX)/man
37 ########## Toolchain and OS dependencies
39 TOOLCHAIN=mingw
40 CCOMPTYPE=cc
41 O=o
42 A=a
43 S=s
44 SO=s.o
45 DO=d.o
46 EXE=.exe
47 EXT_DLL=.dll
48 EXT_OBJ=.$(O)
49 EXT_LIB=.$(A)
50 EXT_ASM=.$(S)
51 MANEXT=1
52 SHARPBANGSCRIPTS=false
53 PTHREAD_LINK=
54 X11_INCLUDES=
55 X11_LINK=
56 DBM_INCLUDES=
57 DBM_LINK=
58 BYTECCRPATH=
59 SUPPORTS_SHARED_LIBRARIES=true
60 SHAREDCCCOMPOPTS=
61 MKSHAREDLIBRPATH=
62 NATIVECCPROFOPTS=
63 NATIVECCRPATH=
64 ASFLAGS=
65 ASPP=
66 ASPPFLAGS=
67 ASPPPROFFLAGS=
68 PROFILING=noprof
69 DYNLINKOPTS=
70 DEBUGGER=
71 CC_PROFILE=
72 SYSTHREAD_SUPPORT=true
73 EXTRALIBS=
75 ########## Configuration for the bytecode compiler
77 ### Which C compiler to use for the bytecode interpreter.
78 BYTECC=gcc -mno-cygwin
80 ### Additional compile-time options for $(BYTECC).  (For static linking.)
81 BYTECCCOMPOPTS=-O -mms-bitfields -Wall -Wno-unused
83 ### Additional link-time options for $(BYTECC).  (For static linking.)
84 BYTECCLINKOPTS=
86 ### Additional compile-time options for $(BYTECC).  (For building a DLL.)
87 DLLCCCOMPOPTS=-O -mms-bitfields -Wall -Wno-unused -DCAML_DLL
89 ### Libraries needed
90 BYTECCLIBS=
91 NATIVECCLIBS=
93 ### How to invoke the C preprocessor
94 CPP=$(BYTECC) -E
96 ### How to build an EXE
97 MKEXE=$(BYTECC) -o $(1) $(2)
98 #ml let mkexe out files opts = Printf.sprintf "%s -o %s %s %s" bytecc out opts files;;
100 ### How to build a DLL
101 MKDLL=$(BYTECC) -shared -o $(1) -Wl,--out-implib,$(2) $(3)
102 #ml let mkdll out implib files opts = Printf.sprintf "%s -shared -o %s -Wl,--out-implib,%s %s %s" bytecc out implib files opts;;
104 ### How to build a static library
105 MKLIB=rm -f $(1); ar rcs $(1) $(2)
106 #ml let mklib out files opts = Printf.sprintf "rm -f %s && ar rcs %s %s %s" out opts out files;;
108 ### Canonicalize the name of a system library
109 SYSLIB=-l$(1)
110 #ml let syslib x = "-l"^x;;
112 ### The ranlib command
113 RANLIB=ranlib
114 RANLIBCMD=ranlib
116 ############# Configuration for the native-code compiler
118 ### Name of architecture for the native-code compiler
119 ARCH=i386
121 ### Name of architecture model for the native-code compiler.
122 MODEL=default
124 ### Name of operating system family for the native-code compiler.
125 SYSTEM=mingw
127 ### Which C compiler to use for the native-code compiler.
128 NATIVECC=$(BYTECC)
130 ### Additional compile-time options for $(NATIVECC).
131 NATIVECCCOMPOPTS=-O -mms-bitfields -Wall -Wno-unused
133 ### Additional link-time options for $(NATIVECC)
134 NATIVECCLINKOPTS=
136 ### Build partially-linked object file
137 PARTIALLD=ld -r $(NATIVECCLINKOPTS)
138 PACKLD=$(PARTIALLD) -o #there must be a space after this '-o'
140 ############# Configuration for the contributed libraries
142 OTHERLIBRARIES=win32unix systhreads str num win32graph dynlink bigarray labltk
144 ### Name of the target architecture for the "num" library
145 BNG_ARCH=ia32
146 BNG_ASM_LEVEL=1
148 ### Configuration for LablTk
149 # Set TK_ROOT to the directory where you installed TCL/TK 8.4
150 # There must be no spaces or special characters in $(TK_ROOT)
151 TK_ROOT=c:/tcl
152 TK_DEFS=-I$(TK_ROOT)/include
153 TK_LINK=$(TK_ROOT)/lib/tk84.lib $(TK_ROOT)/lib/tcl84.lib
155 ############# Aliases for common commands
157 MAKEREC=$(MAKE) -f Makefile.nt 
158 MAKECMD=$(MAKE)