# Makefile for VIM on Win32 (Cygwin and MinGW)
#
# This file contains common part for Cygwin and MinGW and it is included
# from Make_cyg.mak and Make_ming.mak.
#
# Info at http://www.mingw.org
# Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
# Also requires GNU make, which you can download from the same sites.
# Get missing libraries from http://gnuwin32.sf.net.
#
# Tested on Win32 NT 4 and Win95.
#
# To make everything, just 'make -f Make_ming.mak'.
# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
# After a run, you can 'make -f Make_ming.mak clean' to clean up.
#
# NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
# it's just run out of memory or something. Run again, and it will continue
# with 'xxd'.
#
# "make upx" makes *compressed* versions of the 32 bit GUI and console EXEs,
# using the excellent UPX compressor:
# https://upx.github.io/
# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
# http://www.matcode.com/mpress.htm
#
# Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
# Updated 2014 Oct 13.
#>>>>> choose options:
# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
# Set to TINY to make minimal version (few features).
FEATURES=HUGE
# set to yes for a debug build
DEBUG=no
# set to yes to create a mapfile
#MAP=yes
# set to yes to measure code coverage
COVERAGE=no
# better encryption support using libsodium
#SODIUM=yes
# set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
OPTIMIZE=MAXSPEED
# set to yes to make gvim, no for vim
GUI=yes
# set to yes to enable the DLL support (EXPERIMENTAL).
# Creates vim{32,64}.dll, and stub gvim.exe and vim.exe.
# "GUI" should be also set to "yes".
#VIMDLL=yes
# set to no if you do not want to use DirectWrite (DirectX)
# MinGW-w64 is needed, and ARCH should be set to i686 or x86-64.
DIRECTX=yes
# Disable Color emoji support
# (default is yes if DIRECTX=yes, requires WinSDK 8.1 or later.)
#COLOR_EMOJI=no
# Set to one of i386, i486, i586, i686 as the minimum target processor.
# For amd64/x64 architecture set ARCH=x86-64 .
# If not set, it will be automatically detected. (Normally i686 or x86-64.)
#ARCH=i686
# Set to yes to cross-compile from unix; no=native Windows (and Cygwin).
CROSS=no
# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
# Use "yes" when the path does not need to be define.
#ICONV="."
ICONV=yes
GETTEXT=yes
# Set to yes to include IME support.
IME=yes
DYNAMIC_IME=yes
# Set to yes to enable writing a postscript file with :hardcopy.
POSTSCRIPT=no
# Set to yes to enable OLE support.
OLE=no
# Set the default $(WINVER). Use 0x0501 to make it work with WinXP.
ifndef WINVER
# WINVER = 0x0501
WINVER = 0x0600
endif
# Set to yes to enable Cscope support.
CSCOPE=yes
# Set to yes to enable Netbeans support (requires CHANNEL).
NETBEANS=$(GUI)
# Set to yes to enable inter process communication.
ifeq (HUGE, $(FEATURES))
CHANNEL=yes
else
CHANNEL=$(GUI)
endif
# Set to yes to enable terminal support.
ifeq (HUGE, $(FEATURES))
TERMINAL=yes
else
TERMINAL=no
endif
# Set to yes to enable sound support.
ifneq ($(findstring $(FEATURES),BIG HUGE),)
SOUND=yes
else
SOUND=no
endif
ifndef CTAGS
# this assumes ctags is Exuberant ctags
CTAGS = ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S
endif
# Link against the shared version of libstdc++ by default. Set
# STATIC_STDCPLUS to "yes" to link against static version instead.
ifndef STATIC_STDCPLUS
STATIC_STDCPLUS=no
endif
# Link against the shared version of libwinpthread by default. Set
# STATIC_WINPTHREAD to "yes" to link against static version instead.
ifndef STATIC_WINPTHREAD
STATIC_WINPTHREAD=$(STATIC_STDCPLUS)
endif
# If you use TDM-GCC(-64), change HAS_GCC_EH to "no".
# This is used when STATIC_STDCPLUS=yes.
HAS_GCC_EH=yes
# If the user doesn't want gettext, undefine it.
ifeq (no, $(GETTEXT))
GETTEXT=
endif
# Added by E.F. Amatria <eferna1@platea.ptic.mec.es> 2001 Feb 23
# Uncomment the first line and one of the following three if you want Native Language
# Support. You'll need gnu_gettext.win32, a MINGW32 Windows PORT of gettext by
# Franco Bez <franco.bez@gmx.de>. It may be found at
# http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html
# Tested with mingw32 with GCC-2.95.2 on Win98
# Updated 2001 Jun 9
#GETTEXT=c:/gettext.win32.msvcrt
#STATIC_GETTEXT=USE_STATIC_GETTEXT
#DYNAMIC_GETTEXT=USE_GETTEXT_DLL
#DYNAMIC_GETTEXT=USE_SAFE_GETTEXT_DLL
SAFE_GETTEXT_DLL_OBJ = $(GETTEXT)/src/safe_gettext_dll/safe_gettext_dll.o
# Alternatively, if you uncomment the two following lines, you get a "safe" version
# without linking the safe_gettext_dll.o object file.
#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
#GETTEXT_DYNAMIC=gnu_gettext.dll
INTLPATH=$(GETTEXT)/lib/mingw32
INTLLIB=gnu_gettext
# If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext
# or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/
# uncomment the following, but I can't build a static version with them, ?-(|
#GETTEXT=c:/gettext-0.10.37-20010430
#STATIC_GETTEXT=USE_STATIC_GETTEXT
#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
#INTLPATH=$(GETTEXT)/lib
#INTLLIB=intl
# Command definitions (depends on cross-compiling and shell)
ifeq ($(CROSS),yes)
# cross-compiler prefix:
ifndef CROSS_COMPILE
CROSS_COMPILE = i586-pc-mingw32msvc-
endif
DEL = rm
MKDIR = mkdir -p
DIRSLASH = /
else
# normal (Windows) compilation:
ifndef CROSS_COMPILE
CROSS_COMPILE =