blob: 3bc57aa44cba1db3922b4ae00e6cd0b262c62c10 [file] [log] [blame]
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001# Makefile for VIM on Win32 (Cygwin and MinGW)
2#
3# This file contains common part for Cygwin and MinGW and it is included
4# from Make_cyg.mak and Make_ming.mak.
5#
6# Info at http://www.mingw.org
7# Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
8# Also requires GNU make, which you can download from the same sites.
9# Get missing libraries from http://gnuwin32.sf.net.
10#
11# Tested on Win32 NT 4 and Win95.
12#
13# To make everything, just 'make -f Make_ming.mak'.
14# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
15# After a run, you can 'make -f Make_ming.mak clean' to clean up.
16#
17# NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
18# it's just run out of memory or something. Run again, and it will continue
19# with 'xxd'.
20#
21# "make upx" makes *compressed* versions of the 32 bit GUI and console EXEs,
22# using the excellent UPX compressor:
Bram Moolenaar43cb6262018-03-14 21:39:02 +010023# https://upx.github.io/
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010024# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
25# http://www.matcode.com/mpress.htm
26#
27# Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
28# Updated 2014 Oct 13.
29
30#>>>>> choose options:
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010031# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
32# Set to TINY to make minimal version (few features).
Bram Moolenaare5f2be62016-01-21 20:24:34 +010033FEATURES=HUGE
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020034
35# set to yes for a debug build
36DEBUG=no
37
Bram Moolenaar4ff42902018-09-21 14:43:10 +020038# set to yes to create a mapfile
Bram Moolenaarafde13b2019-04-28 19:46:49 +020039#MAP=yes
Bram Moolenaar4ff42902018-09-21 14:43:10 +020040
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020041# set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
42OPTIMIZE=MAXSPEED
43
44# set to yes to make gvim, no for vim
45GUI=yes
46
Bram Moolenaarafde13b2019-04-28 19:46:49 +020047# set to yes to enable the DLL support (EXPERIMENTAL).
48# Creates vim{32,64}.dll, and stub gvim.exe and vim.exe.
49# "GUI" should be also set to "yes".
50#VIMDLL=yes
51
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020052# set to no if you do not want to use DirectWrite (DirectX)
53# MinGW-w64 is needed, and ARCH should be set to i686 or x86-64.
54DIRECTX=yes
55
56# Disable Color emoji support
57# (default is yes if DIRECTX=yes, requires WinSDK 8.1 or later.)
58#COLOR_EMOJI=no
59
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010060# Set to one of i386, i486, i586, i686 as the minimum target processor.
61# For amd64/x64 architecture set ARCH=x86-64 .
Bram Moolenaare0485392016-07-12 21:17:03 +020062# If not set, it will be automatically detected. (Normally i686 or x86-64.)
63#ARCH=i686
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010064# Set to yes to cross-compile from unix; no=native Windows (and Cygwin).
65CROSS=no
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020066
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010067# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
Bram Moolenaarac8069b2017-10-14 20:24:19 +020068# Use "yes" when the path does not need to be define.
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010069#ICONV="."
70ICONV=yes
71GETTEXT=yes
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020072
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010073# Set to yes to include IME support.
74IME=yes
75DYNAMIC_IME=yes
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020076
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010077# Set to yes to enable writing a postscript file with :hardcopy.
78POSTSCRIPT=no
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020079
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010080# Set to yes to enable OLE support.
81OLE=no
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020082
Bram Moolenaar304925e2018-06-30 16:27:02 +020083# Set the default $(WINVER). Use 0x0501 to make it work with WinXP.
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010084ifndef WINVER
Bram Moolenaar304925e2018-06-30 16:27:02 +020085# WINVER = 0x0501
86WINVER = 0x0600
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010087endif
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020088
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010089# Set to yes to enable Cscope support.
90CSCOPE=yes
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020091
Bram Moolenaare0874f82016-01-24 20:36:41 +010092# Set to yes to enable Netbeans support (requires CHANNEL).
Bram Moolenaar4f7e8212014-11-05 13:53:32 +010093NETBEANS=$(GUI)
Bram Moolenaarcccd62d2018-04-12 20:23:48 +020094
Bram Moolenaare0874f82016-01-24 20:36:41 +010095# Set to yes to enable inter process communication.
Bram Moolenaar1aa07bd2016-06-03 19:43:16 +020096ifeq (HUGE, $(FEATURES))
97CHANNEL=yes
98else
Bram Moolenaare0874f82016-01-24 20:36:41 +010099CHANNEL=$(GUI)
Bram Moolenaar1aa07bd2016-06-03 19:43:16 +0200100endif
Bram Moolenaarcccd62d2018-04-12 20:23:48 +0200101
Bram Moolenaar8a773062017-07-24 22:29:21 +0200102# Set to yes to enable terminal support.
Bram Moolenaarac8069b2017-10-14 20:24:19 +0200103ifeq (HUGE, $(FEATURES))
104TERMINAL=yes
105else
Bram Moolenaar4fc63502017-07-19 11:28:17 +0200106TERMINAL=no
Bram Moolenaarac8069b2017-10-14 20:24:19 +0200107endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100108
Bram Moolenaar9b283522019-06-17 22:19:33 +0200109# Set to yes to enable sound support.
110ifneq ($(findstring $(FEATURES),BIG HUGE),)
111SOUND=yes
112else
113SOUND=no
114endif
115
Bram Moolenaar9ac9dfa2017-09-01 18:41:26 +0200116ifndef CTAGS
117# this assumes ctags is Exuberant ctags
118CTAGS = ctags -I INIT+ --fields=+S
119endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100120
121# Link against the shared version of libstdc++ by default. Set
122# STATIC_STDCPLUS to "yes" to link against static version instead.
123ifndef STATIC_STDCPLUS
124STATIC_STDCPLUS=no
125endif
126
Bram Moolenaare3af7632016-12-01 20:37:47 +0100127
128# Link against the shared version of libwinpthread by default. Set
129# STATIC_WINPTHREAD to "yes" to link against static version instead.
130ifndef STATIC_WINPTHREAD
131STATIC_WINPTHREAD=$(STATIC_STDCPLUS)
132endif
Bram Moolenaareda9e9c2018-10-21 22:45:43 +0200133# If you use TDM-GCC(-64), change HAS_GCC_EH to "no".
134# This is used when STATIC_STDCPLUS=yes.
135HAS_GCC_EH=yes
Bram Moolenaare3af7632016-12-01 20:37:47 +0100136
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100137# If the user doesn't want gettext, undefine it.
138ifeq (no, $(GETTEXT))
139GETTEXT=
140endif
141# Added by E.F. Amatria <eferna1@platea.ptic.mec.es> 2001 Feb 23
142# Uncomment the first line and one of the following three if you want Native Language
143# Support. You'll need gnu_gettext.win32, a MINGW32 Windows PORT of gettext by
144# Franco Bez <franco.bez@gmx.de>. It may be found at
145# http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html
146# Tested with mingw32 with GCC-2.95.2 on Win98
147# Updated 2001 Jun 9
148#GETTEXT=c:/gettext.win32.msvcrt
149#STATIC_GETTEXT=USE_STATIC_GETTEXT
150#DYNAMIC_GETTEXT=USE_GETTEXT_DLL
151#DYNAMIC_GETTEXT=USE_SAFE_GETTEXT_DLL
152SAFE_GETTEXT_DLL_OBJ = $(GETTEXT)/src/safe_gettext_dll/safe_gettext_dll.o
153# Alternatively, if you uncomment the two following lines, you get a "safe" version
154# without linking the safe_gettext_dll.o object file.
155#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
156#GETTEXT_DYNAMIC=gnu_gettext.dll
157INTLPATH=$(GETTEXT)/lib/mingw32
158INTLLIB=gnu_gettext
159
160# If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext
161# or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/
162# uncomment the following, but I can't build a static version with them, ?-(|
163#GETTEXT=c:/gettext-0.10.37-20010430
164#STATIC_GETTEXT=USE_STATIC_GETTEXT
165#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
166#INTLPATH=$(GETTEXT)/lib
167#INTLLIB=intl
168
Bram Moolenaare0485392016-07-12 21:17:03 +0200169
170# Command definitions (depends on cross-compiling and shell)
171ifeq ($(CROSS),yes)
172# cross-compiler prefix:
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200173 ifndef CROSS_COMPILE
Bram Moolenaare0485392016-07-12 21:17:03 +0200174CROSS_COMPILE = i586-pc-mingw32msvc-
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200175 endif
Bram Moolenaare0485392016-07-12 21:17:03 +0200176DEL = rm
177MKDIR = mkdir -p
178DIRSLASH = /
179else
180# normal (Windows) compilation:
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200181 ifndef CROSS_COMPILE
Bram Moolenaare0485392016-07-12 21:17:03 +0200182CROSS_COMPILE =
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200183 endif
Bram Moolenaare828b762018-09-10 17:51:58 +0200184
185# About the "sh.exe" condition, as explained by Ken Takata:
186#
187# If the makefile is executed with mingw32-make and sh.exe is not found in
188# $PATH, then $SHELL is set to "sh.exe" (without any path). In this case,
189# unix-like commands might not work and a dos-style path is needed.
190#
191# If the makefile is executed with mingw32-make and sh.exe IS found in $PATH,
192# then $SHELL is set with the actual path of sh.exe (e.g.
193# "C:/msys64/usr/bin/sh.exe"). In this case, unix-like commands can be used.
194#
195# If it is executed by the "make" command from cmd.exe, $SHELL is set to
196# "/bin/sh". If the "make" command is in the $PATH, other unix-like commands
197# might also work.
198#
199# If it is executed by the "make" command from a unix-like shell,
200# $SHELL is set with the unix-style path (e.g. "/bin/bash").
201# In this case, unix-like commands can be used.
202#
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200203 ifneq (sh.exe, $(SHELL))
Bram Moolenaare0485392016-07-12 21:17:03 +0200204DEL = rm
205MKDIR = mkdir -p
206DIRSLASH = /
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200207 else
Bram Moolenaare0485392016-07-12 21:17:03 +0200208DEL = del
209MKDIR = mkdir
210DIRSLASH = \\
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200211 endif
Bram Moolenaare0485392016-07-12 21:17:03 +0200212endif
213CC := $(CROSS_COMPILE)gcc
214CXX := $(CROSS_COMPILE)g++
215ifeq ($(UNDER_CYGWIN),yes)
216WINDRES := $(CROSS_COMPILE)windres
217else
218WINDRES := windres
219endif
220WINDRES_CC = $(CC)
221
222# Get the default ARCH.
223ifndef ARCH
Bram Moolenaarf62e7972016-07-14 20:25:03 +0200224ARCH := $(shell $(CC) -dumpmachine | sed -e 's/-.*//' -e 's/_/-/' -e 's/^mingw32$$/i686/')
Bram Moolenaare0485392016-07-12 21:17:03 +0200225endif
226
227
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100228# Perl interface:
229# PERL=[Path to Perl directory] (Set inside Make_cyg.mak or Make_ming.mak)
230# DYNAMIC_PERL=yes (to load the Perl DLL dynamically)
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200231# PERL_VER=[Perl version, eg 56, 58, 510] (default is 524)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100232ifdef PERL
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200233 ifndef PERL_VER
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200234PERL_VER=524
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200235 endif
236 ifndef DYNAMIC_PERL
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100237DYNAMIC_PERL=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200238 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100239# on Linux, for cross-compile, it's here:
240#PERLLIB=/home/ron/ActivePerl/lib
241# on NT, it's here:
242PERLEXE=$(PERL)/bin/perl
243PERLLIB=$(PERL)/lib
244PERLLIBS=$(PERLLIB)/Core
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200245 ifeq ($(UNDER_CYGWIN),yes)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100246PERLTYPEMAP:=$(shell cygpath -m $(PERLLIB)/ExtUtils/typemap)
247XSUBPPTRY:=$(shell cygpath -m $(PERLLIB)/ExtUtils/xsubpp)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200248 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100249PERLTYPEMAP=$(PERLLIB)/ExtUtils/typemap
250XSUBPPTRY=$(PERLLIB)/ExtUtils/xsubpp
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200251 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100252XSUBPP_EXISTS=$(shell $(PERLEXE) -e "print 1 unless -e '$(XSUBPPTRY)'")
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200253 ifeq "$(XSUBPP_EXISTS)" ""
Bram Moolenaar345326a2014-11-06 10:03:01 +0100254XSUBPP=$(PERLEXE) $(XSUBPPTRY)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200255 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100256XSUBPP=xsubpp
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200257 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100258endif
259
260# Lua interface:
261# LUA=[Path to Lua directory] (Set inside Make_cyg.mak or Make_ming.mak)
Bram Moolenaarb872e632018-09-21 13:44:09 +0200262# LUA_LIBDIR=[Path to Lua library directory] (default: $LUA/lib)
263# LUA_INCDIR=[Path to Lua include directory] (default: $LUA/include)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100264# DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200265# LUA_VER=[Lua version, eg 51, 52] (default is 53)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100266ifdef LUA
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200267 ifndef DYNAMIC_LUA
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100268DYNAMIC_LUA=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200269 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100270
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200271 ifndef LUA_VER
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200272LUA_VER=53
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200273 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100274
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200275 ifeq (no,$(DYNAMIC_LUA))
Bram Moolenaarb872e632018-09-21 13:44:09 +0200276LUA_LIBDIR = $(LUA)/lib
277LUA_LIB = -L$(LUA_LIBDIR) -llua
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200278 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100279
280endif
281
282# MzScheme interface:
283# MZSCHEME=[Path to MzScheme directory] (Set inside Make_cyg.mak or Make_ming.mak)
284# DYNAMIC_MZSCHEME=yes (to load the MzScheme DLL dynamically)
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200285# MZSCHEME_VER=[MzScheme version] (default is 3m_a0solc (6.6))
Bram Moolenaarf16c71b2017-09-18 20:01:02 +0200286# Used for the DLL file name. E.g.:
287# C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100288# MZSCHEME_DEBUG=no
289ifdef MZSCHEME
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200290 ifndef DYNAMIC_MZSCHEME
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100291DYNAMIC_MZSCHEME=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200292 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100293
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200294 ifndef MZSCHEME_VER
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200295MZSCHEME_VER=3m_a0solc
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200296 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100297
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100298# for version 4.x we need to generate byte-code for Scheme base
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200299 ifndef MZSCHEME_GENERATE_BASE
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100300MZSCHEME_GENERATE_BASE=no
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200301 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100302
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200303 ifneq ($(wildcard $(MZSCHEME)/lib/msvc/libmzsch$(MZSCHEME_VER).lib),)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100304MZSCHEME_MAIN_LIB=mzsch
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200305 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100306MZSCHEME_MAIN_LIB=racket
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200307 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100308
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200309 ifndef MZSCHEME_PRECISE_GC
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100310MZSCHEME_PRECISE_GC=no
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200311 ifneq ($(wildcard $(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll),)
312 ifeq ($(wildcard $(MZSCHEME)\lib\libmzgc$(MZSCHEME_VER).dll),)
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100313MZSCHEME_PRECISE_GC=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200314 endif
315 else
316 ifneq ($(wildcard $(MZSCHEME)\lib\msvc\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib),)
317 ifeq ($(wildcard $(MZSCHEME)\lib\msvc\libmzgc$(MZSCHEME_VER).lib),)
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100318MZSCHEME_PRECISE_GC=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200319 endif
320 endif
321 endif
322 endif
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100323
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200324 ifeq (no,$(DYNAMIC_MZSCHEME))
325 ifeq (yes,$(MZSCHEME_PRECISE_GC))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100326MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200327 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100328MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200329 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100330# the modern MinGW can dynamically link to dlls directly.
331# point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200332 ifndef MZSCHEME_DLLS
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100333MZSCHEME_DLLS=$(MZSCHEME)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200334 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100335MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200336 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100337
338endif
339
340# Python interface:
341# PYTHON=[Path to Python directory] (Set inside Make_cyg.mak or Make_ming.mak)
342# DYNAMIC_PYTHON=yes (to load the Python DLL dynamically)
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200343# PYTHON_VER=[Python version, eg 22, 23, ..., 27] (default is 27)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100344ifdef PYTHON
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200345 ifndef DYNAMIC_PYTHON
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100346DYNAMIC_PYTHON=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200347 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100348
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200349 ifndef PYTHON_VER
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100350PYTHON_VER=27
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200351 endif
352 ifndef DYNAMIC_PYTHON_DLL
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100353DYNAMIC_PYTHON_DLL=python$(PYTHON_VER).dll
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200354 endif
355 ifdef PYTHON_HOME
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100356PYTHON_HOME_DEF=-DPYTHON_HOME=\"$(PYTHON_HOME)\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200357 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100358
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200359 ifeq (no,$(DYNAMIC_PYTHON))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100360PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200361 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100362# my include files are in 'win32inc' on Linux, and 'include' in the standard
363# NT distro (ActiveState)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200364 ifndef PYTHONINC
365 ifeq ($(CROSS),no)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100366PYTHONINC=-I $(PYTHON)/include
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200367 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100368PYTHONINC=-I $(PYTHON)/win32inc
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200369 endif
370 endif
Bram Moolenaar3c6f92e2016-01-02 20:26:36 +0100371endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100372
373# Python3 interface:
374# PYTHON3=[Path to Python3 directory] (Set inside Make_cyg.mak or Make_ming.mak)
375# DYNAMIC_PYTHON3=yes (to load the Python3 DLL dynamically)
Bram Moolenaar59eb0162017-12-10 18:17:44 +0100376# PYTHON3_VER=[Python3 version, eg 31, 32] (default is 36)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100377ifdef PYTHON3
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200378 ifndef DYNAMIC_PYTHON3
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100379DYNAMIC_PYTHON3=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200380 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100381
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200382 ifndef PYTHON3_VER
Bram Moolenaar59eb0162017-12-10 18:17:44 +0100383PYTHON3_VER=36
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200384 endif
385 ifndef DYNAMIC_PYTHON3_DLL
Bram Moolenaara7c37952016-01-20 22:23:15 +0100386DYNAMIC_PYTHON3_DLL=python$(PYTHON3_VER).dll
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200387 endif
388 ifdef PYTHON3_HOME
Bram Moolenaaracd58ef2016-02-16 13:42:24 +0100389PYTHON3_HOME_DEF=-DPYTHON3_HOME=L\"$(PYTHON3_HOME)\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200390 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100391
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200392 ifeq (no,$(DYNAMIC_PYTHON3))
Bram Moolenaara7c37952016-01-20 22:23:15 +0100393PYTHON3LIB=-L$(PYTHON3)/libs -lpython$(PYTHON3_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200394 endif
Bram Moolenaara7c37952016-01-20 22:23:15 +0100395
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200396 ifndef PYTHON3INC
397 ifeq ($(CROSS),no)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100398PYTHON3INC=-I $(PYTHON3)/include
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200399 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100400PYTHON3INC=-I $(PYTHON3)/win32inc
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200401 endif
402 endif
Bram Moolenaara7c37952016-01-20 22:23:15 +0100403endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100404
405# TCL interface:
406# TCL=[Path to TCL directory] (Set inside Make_cyg.mak or Make_ming.mak)
407# DYNAMIC_TCL=yes (to load the TCL DLL dynamically)
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200408# TCL_VER=[TCL version, eg 83, 84] (default is 86)
409# TCL_VER_LONG=[Tcl version, eg 8.3] (default is 8.6)
Bram Moolenaareca99bd2016-01-07 22:50:05 +0100410# You must set TCL_VER_LONG when you set TCL_VER.
Bram Moolenaar77f74742017-08-23 22:40:41 +0200411# TCL_DLL=[TCL dll name, eg tcl86.dll] (default is tcl86.dll)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100412ifdef TCL
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200413 ifndef DYNAMIC_TCL
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100414DYNAMIC_TCL=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200415 endif
416 ifndef TCL_VER
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200417TCL_VER = 86
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200418 endif
419 ifndef TCL_VER_LONG
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200420TCL_VER_LONG = 8.6
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200421 endif
422 ifndef TCL_DLL
Bram Moolenaar77f74742017-08-23 22:40:41 +0200423TCL_DLL = tcl$(TCL_VER).dll
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200424 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100425TCLINC += -I$(TCL)/include
426endif
427
428
429# Ruby interface:
430# RUBY=[Path to Ruby directory] (Set inside Make_cyg.mak or Make_ming.mak)
Bram Moolenaar61766972018-04-20 22:31:41 +0200431# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically, "no" for static)
Bram Moolenaar6384c5d2016-09-06 22:06:35 +0200432# RUBY_VER=[Ruby version, eg 19, 22] (default is 22)
433# RUBY_API_VER_LONG=[Ruby API version, eg 1.8, 1.9.1, 2.2.0]
434# (default is 2.2.0)
435# You must set RUBY_API_VER_LONG when changing RUBY_VER.
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100436# Note: If you use Ruby 1.9.3, set as follows:
437# RUBY_VER=19
Bram Moolenaar6384c5d2016-09-06 22:06:35 +0200438# RUBY_API_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100439ifdef RUBY
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200440 ifndef DYNAMIC_RUBY
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100441DYNAMIC_RUBY=yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200442 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100443# Set default value
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200444 ifndef RUBY_VER
Bram Moolenaar6384c5d2016-09-06 22:06:35 +0200445RUBY_VER = 22
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200446 endif
447 ifndef RUBY_VER_LONG
Bram Moolenaar6384c5d2016-09-06 22:06:35 +0200448RUBY_VER_LONG = 2.2.0
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200449 endif
450 ifndef RUBY_API_VER_LONG
Bram Moolenaar0eaadec2016-09-08 20:28:45 +0200451RUBY_API_VER_LONG = $(RUBY_VER_LONG)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200452 endif
453 ifndef RUBY_API_VER
Bram Moolenaar6384c5d2016-09-06 22:06:35 +0200454RUBY_API_VER = $(subst .,,$(RUBY_API_VER_LONG))
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200455 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100456
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200457 ifndef RUBY_PLATFORM
458 ifeq ($(RUBY_VER), 16)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100459RUBY_PLATFORM = i586-mswin32
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200460 else ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/i386-mingw32),)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100461RUBY_PLATFORM = i386-mingw32
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200462 else ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/x64-mingw32),)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100463RUBY_PLATFORM = x64-mingw32
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200464 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100465RUBY_PLATFORM = i386-mswin32
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200466 endif
467 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100468
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200469 ifndef RUBY_INSTALL_NAME
470 ifeq ($(RUBY_VER), 16)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100471RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200472 else
473 ifndef RUBY_MSVCRT_NAME
Bram Moolenaar0bee2fe2016-01-07 22:45:09 +0100474# Base name of msvcrXX.dll which is used by ruby's dll.
475RUBY_MSVCRT_NAME = msvcrt
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200476 endif
477 ifeq ($(ARCH),x86-64)
Bram Moolenaar0bee2fe2016-01-07 22:45:09 +0100478RUBY_INSTALL_NAME = x64-$(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200479 else
Bram Moolenaar0bee2fe2016-01-07 22:45:09 +0100480RUBY_INSTALL_NAME = $(RUBY_MSVCRT_NAME)-ruby$(RUBY_API_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200481 endif
482 endif
483 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100484
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200485 ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100486RUBY_19_OR_LATER = 1
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200487 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100488
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200489 ifdef RUBY_19_OR_LATER
Bram Moolenaar76c612a2018-09-21 14:31:51 +0200490RUBYINC = -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200491 else
Bram Moolenaar76c612a2018-09-21 14:31:51 +0200492RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200493 endif
494 ifeq (no, $(DYNAMIC_RUBY))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100495RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200496 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100497
498endif # RUBY
499
500# See feature.h for a list of options.
501# Any other defines can be included here.
Bram Moolenaar0472b6d2019-02-18 21:41:37 +0100502DEF_GUI=-DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100503DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
Bram Moolenaar22fcfad2016-07-01 18:17:26 +0200504 -DHAVE_PATHDEF -DFEAT_$(FEATURES) -DHAVE_STDINT_H
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100505ifeq ($(ARCH),x86-64)
506DEFINES+=-DMS_WIN64
507endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100508
509#>>>>> end of choices
510###########################################################################
511
Bram Moolenaarb361db02018-10-16 21:13:14 +0200512CFLAGS = -I. -Iproto $(DEFINES) -pipe -march=$(ARCH) -Wall
Bram Moolenaar6c0e9842016-03-22 20:42:31 +0100513CXXFLAGS = -std=gnu++11
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100514WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
515EXTRA_LIBS =
516
517ifdef GETTEXT
518DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
519GETTEXTINCLUDE = $(GETTEXT)/include
520GETTEXTLIB = $(INTLPATH)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200521 ifeq (yes, $(GETTEXT))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100522DEFINES += -DDYNAMIC_GETTEXT
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200523 else ifdef DYNAMIC_GETTEXT
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100524DEFINES += -D$(DYNAMIC_GETTEXT)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200525 ifdef GETTEXT_DYNAMIC
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100526DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200527 endif
528 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100529endif
530
531ifdef PERL
Bram Moolenaar367fbf12015-06-25 16:13:46 +0200532CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200533 ifeq (yes, $(DYNAMIC_PERL))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100534CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
535EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200536 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100537endif
538
539ifdef LUA
Bram Moolenaarb872e632018-09-21 13:44:09 +0200540LUA_INCDIR = $(LUA)/include
541CFLAGS += -I$(LUA_INCDIR) -I$(LUA) -DFEAT_LUA
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200542 ifeq (yes, $(DYNAMIC_LUA))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100543CFLAGS += -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200544 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100545endif
546
547ifdef MZSCHEME
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200548 ifndef MZSCHEME_COLLECTS
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100549MZSCHEME_COLLECTS=$(MZSCHEME)/collects
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200550 ifeq (yes, $(UNDER_CYGWIN))
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100551MZSCHEME_COLLECTS:=$(shell cygpath -m $(MZSCHEME_COLLECTS) | sed -e 's/ /\\ /g')
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200552 endif
553 endif
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100554CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME_COLLECTS)\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200555 ifeq (yes, $(DYNAMIC_MZSCHEME))
556 ifeq (yes, $(MZSCHEME_PRECISE_GC))
Bram Moolenaar4e640bd2016-01-16 16:20:38 +0100557# Precise GC does not use separate dll
558CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200559 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100560CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200561 endif
562 endif
563 ifeq (yes, "$(MZSCHEME_DEBUG)")
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100564CFLAGS += -DMZSCHEME_FORCE_GC
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200565 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100566endif
567
568ifdef RUBY
569CFLAGS += -DFEAT_RUBY $(RUBYINC)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200570 ifeq (yes, $(DYNAMIC_RUBY))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100571CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
572CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200573 endif
574 ifeq (no, $(DYNAMIC_RUBY))
Bram Moolenaar259a90f2018-04-21 19:08:55 +0200575CFLAGS += -DRUBY_VERSION=$(RUBY_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200576 endif
577 ifneq ($(findstring w64-mingw32,$(CC)),)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100578# A workaround for MinGW-w64
579CFLAGS += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200580 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100581endif
582
583ifdef PYTHON
Bram Moolenaar223b7232016-02-19 19:43:49 +0100584CFLAGS += -DFEAT_PYTHON
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200585 ifeq (yes, $(DYNAMIC_PYTHON))
Bram Moolenaar449538c2016-01-09 17:49:15 +0100586CFLAGS += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"$(DYNAMIC_PYTHON_DLL)\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200587 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100588endif
589
Bram Moolenaar223b7232016-02-19 19:43:49 +0100590ifdef PYTHON3
591CFLAGS += -DFEAT_PYTHON3
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200592 ifeq (yes, $(DYNAMIC_PYTHON3))
Bram Moolenaara7c37952016-01-20 22:23:15 +0100593CFLAGS += -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"$(DYNAMIC_PYTHON3_DLL)\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200594 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100595endif
596
597ifdef TCL
598CFLAGS += -DFEAT_TCL $(TCLINC)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200599 ifeq (yes, $(DYNAMIC_TCL))
Bram Moolenaar77f74742017-08-23 22:40:41 +0200600CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"$(TCL_DLL)\" -DDYNAMIC_TCL_VER=\"$(TCL_VER_LONG)\"
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200601 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100602endif
603
604ifeq ($(POSTSCRIPT),yes)
605DEFINES += -DMSWINPS
606endif
607
608ifeq (yes, $(OLE))
609DEFINES += -DFEAT_OLE
610endif
611
612ifeq ($(CSCOPE),yes)
613DEFINES += -DFEAT_CSCOPE
614endif
615
616ifeq ($(NETBEANS),yes)
617# Only allow NETBEANS for a GUI build.
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200618 ifeq (yes, $(GUI))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100619DEFINES += -DFEAT_NETBEANS_INTG
620
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200621 ifeq ($(NBDEBUG), yes)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100622DEFINES += -DNBDEBUG
623NBDEBUG_INCL = nbdebug.h
624NBDEBUG_SRC = nbdebug.c
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200625 endif
626 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100627endif
628
Bram Moolenaare0874f82016-01-24 20:36:41 +0100629ifeq ($(CHANNEL),yes)
Bram Moolenaar509ce2a2016-03-11 22:52:15 +0100630DEFINES += -DFEAT_JOB_CHANNEL
Bram Moolenaare0874f82016-01-24 20:36:41 +0100631endif
632
Bram Moolenaar4fc63502017-07-19 11:28:17 +0200633ifeq ($(TERMINAL),yes)
634DEFINES += -DFEAT_TERMINAL
Bram Moolenaarf80451e2017-07-25 21:49:35 +0200635TERM_DEPS = \
636 libvterm/include/vterm.h \
637 libvterm/include/vterm_keycodes.h \
638 libvterm/src/rect.h \
639 libvterm/src/utf8.h \
640 libvterm/src/vterm_internal.h
Bram Moolenaar4fc63502017-07-19 11:28:17 +0200641endif
642
Bram Moolenaar9b283522019-06-17 22:19:33 +0200643ifeq ($(SOUND),yes)
644DEFINES += -DFEAT_SOUND
645endif
646
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100647# DirectWrite (DirectX)
648ifeq ($(DIRECTX),yes)
649# Only allow DirectWrite for a GUI build.
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200650 ifeq (yes, $(GUI))
Bram Moolenaarcccd62d2018-04-12 20:23:48 +0200651DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200652 ifneq ($(COLOR_EMOJI),no)
Bram Moolenaarcccd62d2018-04-12 20:23:48 +0200653DEFINES += -DFEAT_DIRECTX_COLOR_EMOJI
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200654 endif
655 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100656endif
657
658# Only allow XPM for a GUI build.
659ifeq (yes, $(GUI))
660
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200661 ifndef XPM
662 ifeq ($(ARCH),i386)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100663XPM = xpm/x86
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200664 endif
665 ifeq ($(ARCH),i486)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100666XPM = xpm/x86
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200667 endif
668 ifeq ($(ARCH),i586)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100669XPM = xpm/x86
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200670 endif
671 ifeq ($(ARCH),i686)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100672XPM = xpm/x86
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200673 endif
674 ifeq ($(ARCH),x86-64)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100675XPM = xpm/x64
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200676 endif
677 endif
678 ifdef XPM
679 ifneq ($(XPM),no)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100680CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200681 endif
682 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100683
684endif
685
686ifeq ($(DEBUG),yes)
687CFLAGS += -g -fstack-check
688DEBUG_SUFFIX=d
689else
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200690 ifeq ($(OPTIMIZE), SIZE)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100691CFLAGS += -Os
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200692 else ifeq ($(OPTIMIZE), MAXSPEED)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100693CFLAGS += -O3
694CFLAGS += -fomit-frame-pointer -freg-struct-return
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200695 else # SPEED
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100696CFLAGS += -O2
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200697 endif
Bram Moolenaarafde13b2019-04-28 19:46:49 +0200698LFLAGS += -s
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100699endif
700
Bram Moolenaar828c3d72018-06-19 18:58:07 +0200701LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lnetapi32 -lversion
Bram Moolenaar796cc422019-04-03 20:31:00 +0200702GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o
Bram Moolenaar97ff9b92016-06-26 20:37:46 +0200703CUIOBJ = $(OUTDIR)/iscygpty.o
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100704OBJ = \
Bram Moolenaar75464dc2016-07-02 20:27:50 +0200705 $(OUTDIR)/arabic.o \
Bram Moolenaar4ad62152019-08-17 14:38:55 +0200706 $(OUTDIR)/arglist.o \
Bram Moolenaar3e460fd2019-01-26 16:21:07 +0100707 $(OUTDIR)/autocmd.o \
Bram Moolenaarc3719bd2017-11-18 22:13:31 +0100708 $(OUTDIR)/beval.o \
Bram Moolenaar6e5ea8d2019-01-12 22:47:31 +0100709 $(OUTDIR)/blob.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100710 $(OUTDIR)/blowfish.o \
711 $(OUTDIR)/buffer.o \
Bram Moolenaarec28d152019-05-11 18:36:34 +0200712 $(OUTDIR)/change.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100713 $(OUTDIR)/charset.o \
Bram Moolenaar66b51422019-08-18 21:44:12 +0200714 $(OUTDIR)/cmdexpand.o \
Bram Moolenaard7663c22019-08-06 21:59:57 +0200715 $(OUTDIR)/cmdhist.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100716 $(OUTDIR)/crypt.o \
717 $(OUTDIR)/crypt_zip.o \
Bram Moolenaareead75c2019-04-21 11:35:00 +0200718 $(OUTDIR)/debugger.o \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200719 $(OUTDIR)/dict.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100720 $(OUTDIR)/diff.o \
721 $(OUTDIR)/digraph.o \
Bram Moolenaar7528d1f2019-09-19 23:06:20 +0200722 $(OUTDIR)/drawline.o \
723 $(OUTDIR)/drawscreen.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100724 $(OUTDIR)/edit.o \
725 $(OUTDIR)/eval.o \
Bram Moolenaar261f3462019-09-07 15:45:32 +0200726 $(OUTDIR)/evalbuffer.o \
Bram Moolenaar73dad1e2016-07-17 22:13:49 +0200727 $(OUTDIR)/evalfunc.o \
Bram Moolenaar0522ba02019-08-27 22:48:30 +0200728 $(OUTDIR)/evalvars.o \
Bram Moolenaar261f3462019-09-07 15:45:32 +0200729 $(OUTDIR)/evalwindow.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100730 $(OUTDIR)/ex_cmds.o \
731 $(OUTDIR)/ex_cmds2.o \
732 $(OUTDIR)/ex_docmd.o \
733 $(OUTDIR)/ex_eval.o \
734 $(OUTDIR)/ex_getln.o \
735 $(OUTDIR)/fileio.o \
Bram Moolenaarb005cd82019-09-04 15:54:55 +0200736 $(OUTDIR)/filepath.o \
Bram Moolenaar5fd0f502019-02-13 23:13:28 +0100737 $(OUTDIR)/findfile.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100738 $(OUTDIR)/fold.o \
739 $(OUTDIR)/getchar.o \
740 $(OUTDIR)/hardcopy.o \
741 $(OUTDIR)/hashtab.o \
Bram Moolenaarf9cc9f22019-07-14 21:29:22 +0200742 $(OUTDIR)/highlight.o \
Bram Moolenaar5ec84982019-09-06 21:46:15 +0200743 $(OUTDIR)/if_cscope.o \
Bram Moolenaar4b471622019-01-31 13:48:09 +0100744 $(OUTDIR)/indent.o \
Bram Moolenaar7591bb32019-03-30 13:53:47 +0100745 $(OUTDIR)/insexpand.o \
Bram Moolenaar520e1e42016-01-23 19:46:28 +0100746 $(OUTDIR)/json.o \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200747 $(OUTDIR)/list.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100748 $(OUTDIR)/main.o \
Bram Moolenaarb66bab32019-08-01 14:28:24 +0200749 $(OUTDIR)/map.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100750 $(OUTDIR)/mark.o \
751 $(OUTDIR)/memfile.o \
752 $(OUTDIR)/memline.o \
753 $(OUTDIR)/menu.o \
754 $(OUTDIR)/message.o \
755 $(OUTDIR)/misc1.o \
756 $(OUTDIR)/misc2.o \
Bram Moolenaarb20b9e12019-09-21 20:48:04 +0200757 $(OUTDIR)/mouse.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100758 $(OUTDIR)/move.o \
759 $(OUTDIR)/mbyte.o \
760 $(OUTDIR)/normal.o \
761 $(OUTDIR)/ops.o \
762 $(OUTDIR)/option.o \
Bram Moolenaardac13472019-09-16 21:06:21 +0200763 $(OUTDIR)/optionstr.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100764 $(OUTDIR)/os_mswin.o \
Bram Moolenaar796cc422019-04-03 20:31:00 +0200765 $(OUTDIR)/os_win32.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100766 $(OUTDIR)/pathdef.o \
767 $(OUTDIR)/popupmnu.o \
Bram Moolenaar4d784b22019-05-25 19:51:39 +0200768 $(OUTDIR)/popupwin.o \
Bram Moolenaarfa55cfc2019-07-13 22:59:32 +0200769 $(OUTDIR)/profiler.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100770 $(OUTDIR)/quickfix.o \
771 $(OUTDIR)/regexp.o \
Bram Moolenaar4aea03e2019-09-25 22:37:17 +0200772 $(OUTDIR)/register.o \
Bram Moolenaar307c5a52019-08-25 15:41:00 +0200773 $(OUTDIR)/scriptfile.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100774 $(OUTDIR)/screen.o \
775 $(OUTDIR)/search.o \
Bram Moolenaar84538072019-07-28 14:15:42 +0200776 $(OUTDIR)/session.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100777 $(OUTDIR)/sha256.o \
Bram Moolenaarbbea4702019-01-01 13:20:31 +0100778 $(OUTDIR)/sign.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100779 $(OUTDIR)/spell.o \
Bram Moolenaar9ccfebd2016-07-19 16:39:08 +0200780 $(OUTDIR)/spellfile.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100781 $(OUTDIR)/syntax.o \
782 $(OUTDIR)/tag.o \
783 $(OUTDIR)/term.o \
Bram Moolenaarecaa70e2019-07-14 14:55:39 +0200784 $(OUTDIR)/testing.o \
Bram Moolenaar98aefe72018-12-13 22:20:09 +0100785 $(OUTDIR)/textprop.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100786 $(OUTDIR)/ui.o \
787 $(OUTDIR)/undo.o \
Bram Moolenaarac9fb182019-04-27 13:04:13 +0200788 $(OUTDIR)/usercmd.o \
Bram Moolenaar6583c442016-07-17 18:41:47 +0200789 $(OUTDIR)/userfunc.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100790 $(OUTDIR)/version.o \
Bram Moolenaardefa0672019-07-21 19:25:37 +0200791 $(OUTDIR)/viminfo.o \
Bram Moolenaar796cc422019-04-03 20:31:00 +0200792 $(OUTDIR)/winclip.o \
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100793 $(OUTDIR)/window.o
794
Bram Moolenaarafde13b2019-04-28 19:46:49 +0200795ifeq ($(VIMDLL),yes)
796OBJ += $(OUTDIR)/os_w32dll.o $(OUTDIR)/vimrcd.o
797EXEOBJC = $(OUTDIR)/os_w32exec.o $(OUTDIR)/vimrcc.o
798EXEOBJG = $(OUTDIR)/os_w32exeg.o $(OUTDIR)/vimrcg.o
799else
800OBJ += $(OUTDIR)/os_w32exe.o $(OUTDIR)/vimrc.o
801endif
802
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100803ifdef PERL
804OBJ += $(OUTDIR)/if_perl.o
805endif
806ifdef LUA
807OBJ += $(OUTDIR)/if_lua.o
808endif
809ifdef MZSCHEME
810OBJ += $(OUTDIR)/if_mzsch.o
811MZSCHEME_INCL = if_mzsch.h
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200812 ifeq (yes,$(MZSCHEME_GENERATE_BASE))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100813CFLAGS += -DINCLUDE_MZSCHEME_BASE
814MZ_EXTRA_DEP += mzscheme_base.c
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200815 endif
816 ifeq (yes,$(MZSCHEME_PRECISE_GC))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100817CFLAGS += -DMZ_PRECISE_GC
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200818 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100819endif
820ifdef PYTHON
821OBJ += $(OUTDIR)/if_python.o
822endif
823ifdef PYTHON3
824OBJ += $(OUTDIR)/if_python3.o
825endif
826ifdef RUBY
827OBJ += $(OUTDIR)/if_ruby.o
828endif
829ifdef TCL
830OBJ += $(OUTDIR)/if_tcl.o
831endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100832
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100833ifeq ($(NETBEANS),yes)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200834 ifneq ($(CHANNEL),yes)
Bram Moolenaare0874f82016-01-24 20:36:41 +0100835# Cannot use Netbeans without CHANNEL
836NETBEANS=no
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200837 else ifneq (yes, $(GUI))
Bram Moolenaar44d57182016-02-14 23:11:23 +0100838# Cannot use Netbeans without GUI.
839NETBEANS=no
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200840 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100841OBJ += $(OUTDIR)/netbeans.o
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200842 endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100843endif
844
845ifeq ($(CHANNEL),yes)
846OBJ += $(OUTDIR)/channel.o
Bram Moolenaare0874f82016-01-24 20:36:41 +0100847LIB += -lwsock32
848endif
Bram Moolenaare0874f82016-01-24 20:36:41 +0100849
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100850ifeq ($(DIRECTX),yes)
851# Only allow DIRECTX for a GUI build.
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200852 ifeq (yes, $(GUI))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100853OBJ += $(OUTDIR)/gui_dwrite.o
854LIB += -ld2d1 -ldwrite
855USE_STDCPLUS = yes
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200856 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100857endif
858ifneq ($(XPM),no)
859# Only allow XPM for a GUI build.
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200860 ifeq (yes, $(GUI))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100861OBJ += $(OUTDIR)/xpm_w32.o
862# You'll need libXpm.a from http://gnuwin32.sf.net
863LIB += -L$(XPM)/lib -lXpm
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200864 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100865endif
866
Bram Moolenaar4fc63502017-07-19 11:28:17 +0200867ifeq ($(TERMINAL),yes)
Bram Moolenaarf80451e2017-07-25 21:49:35 +0200868OBJ += $(OUTDIR)/terminal.o \
Bram Moolenaar78dcd4f2018-09-13 17:23:28 +0200869 $(OUTDIR)/encoding.o \
870 $(OUTDIR)/keyboard.o \
Bram Moolenaarb20b9e12019-09-21 20:48:04 +0200871 $(OUTDIR)/termmouse.o \
Bram Moolenaar78dcd4f2018-09-13 17:23:28 +0200872 $(OUTDIR)/parser.o \
873 $(OUTDIR)/pen.o \
874 $(OUTDIR)/termscreen.o \
875 $(OUTDIR)/state.o \
876 $(OUTDIR)/unicode.o \
877 $(OUTDIR)/vterm.o
Bram Moolenaar4fc63502017-07-19 11:28:17 +0200878endif
879
Bram Moolenaar9b283522019-06-17 22:19:33 +0200880ifeq ($(SOUND),yes)
881OBJ += $(OUTDIR)/sound.o
882endif
883
Bram Moolenaare828b762018-09-10 17:51:58 +0200884# Include xdiff
885OBJ += $(OUTDIR)/xdiffi.o \
886 $(OUTDIR)/xemit.o \
887 $(OUTDIR)/xprepare.o \
888 $(OUTDIR)/xutils.o \
889 $(OUTDIR)/xhistogram.o \
890 $(OUTDIR)/xpatience.o
891
892XDIFF_DEPS = \
893 xdiff/xdiff.h \
894 xdiff/xdiffi.h \
895 xdiff/xemit.h \
896 xdiff/xinclude.h \
897 xdiff/xmacros.h \
898 xdiff/xprepare.h \
899 xdiff/xtypes.h \
900 xdiff/xutils.h
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100901
902ifdef MZSCHEME
903MZSCHEME_SUFFIX = Z
904endif
905
Bram Moolenaar796cc422019-04-03 20:31:00 +0200906LFLAGS += -municode
907
Bram Moolenaarafde13b2019-04-28 19:46:49 +0200908ifeq ($(VIMDLL),yes)
909VIMEXE := vim$(DEBUG_SUFFIX).exe
910GVIMEXE := gvim$(DEBUG_SUFFIX).exe
911 ifeq ($(ARCH),x86-64)
912VIMDLLBASE := vim64$(DEBUG_SUFFIX)
913 else
914VIMDLLBASE := vim32$(DEBUG_SUFFIX)
915 endif
916TARGET = $(VIMDLLBASE).dll
917LFLAGS += -shared
918EXELFLAGS += -municode
919 ifneq ($(DEBUG),yes)
920EXELFLAGS += -s
921 endif
922DEFINES += $(DEF_GUI) -DVIMDLL
923OBJ += $(GUIOBJ) $(CUIOBJ)
924OUTDIR = dobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
925MAIN_TARGET = $(GVIMEXE) $(VIMEXE) $(VIMDLLBASE).dll
926else ifeq ($(GUI),yes)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100927TARGET := gvim$(DEBUG_SUFFIX).exe
928DEFINES += $(DEF_GUI)
929OBJ += $(GUIOBJ)
930LFLAGS += -mwindows
931OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
Bram Moolenaarafde13b2019-04-28 19:46:49 +0200932MAIN_TARGET = $(TARGET)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100933else
Bram Moolenaar97ff9b92016-06-26 20:37:46 +0200934OBJ += $(CUIOBJ)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100935TARGET := vim$(DEBUG_SUFFIX).exe
936OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
Bram Moolenaarafde13b2019-04-28 19:46:49 +0200937MAIN_TARGET = $(TARGET)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100938endif
939
940ifdef GETTEXT
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200941 ifneq (yes, $(GETTEXT))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100942CFLAGS += -I$(GETTEXTINCLUDE)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200943 ifndef STATIC_GETTEXT
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100944LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200945 ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100946OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200947 endif
948 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100949LIB += -L$(GETTEXTLIB) -lintl
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200950 endif
951 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100952endif
953
954ifdef PERL
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200955 ifeq (no, $(DYNAMIC_PERL))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100956LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200957 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100958endif
959
960ifdef TCL
961LIB += -L$(TCL)/lib
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200962 ifeq (yes, $(DYNAMIC_TCL))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100963LIB += -ltclstub$(TCL_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200964 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100965LIB += -ltcl$(TCL_VER)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200966 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100967endif
968
969ifeq (yes, $(OLE))
970LIB += -loleaut32
971OBJ += $(OUTDIR)/if_ole.o
972USE_STDCPLUS = yes
973endif
974
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100975ifeq (yes, $(IME))
976DEFINES += -DFEAT_MBYTE_IME
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200977 ifeq (yes, $(DYNAMIC_IME))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100978DEFINES += -DDYNAMIC_IME
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200979 else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100980LIB += -limm32
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200981 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100982endif
983
984ifdef ICONV
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200985 ifneq (yes, $(ICONV))
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100986LIB += -L$(ICONV)
987CFLAGS += -I$(ICONV)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200988 endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100989DEFINES+=-DDYNAMIC_ICONV
990endif
991
Bram Moolenaar9b283522019-06-17 22:19:33 +0200992ifeq (yes, $(SOUND))
993LIB += -lwinmm
994endif
995
Bram Moolenaar4f7e8212014-11-05 13:53:32 +0100996ifeq (yes, $(USE_STDCPLUS))
Bram Moolenaareda9e9c2018-10-21 22:45:43 +0200997LINK = $(CXX)
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +0200998 ifeq (yes, $(STATIC_STDCPLUS))
Bram Moolenaar60f807b2019-01-31 14:43:19 +0100999#LIB += -static-libstdc++ -static-libgcc
Bram Moolenaard91e5da2019-02-21 13:34:07 +01001000LIB += -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +02001001 endif
Bram Moolenaareda9e9c2018-10-21 22:45:43 +02001002else
1003LINK = $(CC)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001004endif
1005
Bram Moolenaare3af7632016-12-01 20:37:47 +01001006ifeq (yes, $(STATIC_WINPTHREAD))
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +02001007 ifeq (yes, $(HAS_GCC_EH))
Bram Moolenaareda9e9c2018-10-21 22:45:43 +02001008LIB += -lgcc_eh
Bram Moolenaar6e75e0a2019-05-11 21:24:26 +02001009 endif
Bram Moolenaare3af7632016-12-01 20:37:47 +01001010LIB += -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic
1011endif
1012
Bram Moolenaar4ff42902018-09-21 14:43:10 +02001013ifeq (yes, $(MAP))
1014LFLAGS += -Wl,-Map=$(TARGET).map
1015endif
1016
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001017all: $(MAIN_TARGET) vimrun.exe xxd/xxd.exe tee/tee.exe install.exe uninstal.exe GvimExt/gvimext.dll
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001018
1019vimrun.exe: vimrun.c
1020 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
1021
1022install.exe: dosinst.c
1023 $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid
1024
1025uninstal.exe: uninstal.c
Bram Moolenaare28cfb22019-07-11 22:04:21 +02001026 $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB) -lole32
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001027
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001028ifeq ($(VIMDLL),yes)
1029$(TARGET): $(OUTDIR) $(OBJ)
1030 $(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -lgdi32 $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
1031
1032$(GVIMEXE): $(OUTDIR) $(EXEOBJG) $(VIMDLLBASE).dll
1033 $(CC) -L. $(EXELFLAGS) -mwindows -o $@ $(EXEOBJG) -l$(VIMDLLBASE)
1034
1035$(VIMEXE): $(OUTDIR) $(EXEOBJC) $(VIMDLLBASE).dll
1036 $(CC) -L. $(EXELFLAGS) -o $@ $(EXEOBJC) -l$(VIMDLLBASE)
1037else
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001038$(TARGET): $(OUTDIR) $(OBJ)
Bram Moolenaareda9e9c2018-10-21 22:45:43 +02001039 $(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001040endif
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001041
1042upx: exes
1043 upx gvim.exe
1044 upx vim.exe
1045
1046mpress: exes
1047 mpress gvim.exe
1048 mpress vim.exe
1049
1050xxd/xxd.exe: xxd/xxd.c
1051 $(MAKE) -C xxd -f Make_ming.mak CC='$(CC)'
1052
Bram Moolenaar04c86d22018-10-17 22:45:54 +02001053tee/tee.exe: tee/tee.c
1054 $(MAKE) -C tee CC='$(CC)'
1055
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001056GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
1057 $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS)
1058
Bram Moolenaar9ac9dfa2017-09-01 18:41:26 +02001059tags: notags
Bram Moolenaar6dc67032018-12-19 21:05:57 +01001060 $(CTAGS) $(TAGS_FILES)
Bram Moolenaar9ac9dfa2017-09-01 18:41:26 +02001061
1062notags:
1063 -$(DEL) tags
1064
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001065clean:
1066 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
1067 -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
Bram Moolenaardfc14552019-06-21 17:36:10 +02001068 -$(DEL) $(OUTDIR)$(DIRSLASH)pathdef.c
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001069 -rmdir $(OUTDIR)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001070 -$(DEL) $(MAIN_TARGET) vimrun.exe install.exe uninstal.exe
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001071ifdef PERL
1072 -$(DEL) if_perl.c
Bram Moolenaara16bc542018-10-14 16:25:10 +02001073 -$(DEL) auto$(DIRSLASH)if_perl.c
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001074endif
1075ifdef MZSCHEME
1076 -$(DEL) mzscheme_base.c
1077endif
1078 $(MAKE) -C GvimExt -f Make_ming.mak clean
1079 $(MAKE) -C xxd -f Make_ming.mak clean
Bram Moolenaar04c86d22018-10-17 22:45:54 +02001080 $(MAKE) -C tee clean
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001081
1082###########################################################################
Bram Moolenaare37368c2019-03-22 16:57:45 +01001083INCL = vim.h alloc.h ascii.h ex_cmds.h feature.h globals.h \
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001084 keymap.h macros.h option.h os_dos.h os_win32.h proto.h regexp.h \
Bram Moolenaarc3719bd2017-11-18 22:13:31 +01001085 spell.h structs.h term.h beval.h $(NBDEBUG_INCL)
1086GUI_INCL = gui.h
Bram Moolenaard22a6f82019-05-24 17:17:54 +02001087ifeq ($(DIRECTX),yes)
1088GUI_INCL += gui_dwrite.h
1089endif
Bram Moolenaar97ff9b92016-06-26 20:37:46 +02001090CUI_INCL = iscygpty.h
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001091
Bram Moolenaardfc14552019-06-21 17:36:10 +02001092PATHDEF_SRC = $(OUTDIR)/pathdef.c
1093
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001094$(OUTDIR)/if_python.o: if_python.c if_py_both.h $(INCL)
Bram Moolenaar449538c2016-01-09 17:49:15 +01001095 $(CC) -c $(CFLAGS) $(PYTHONINC) $(PYTHON_HOME_DEF) $< -o $@
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001096
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001097$(OUTDIR)/if_python3.o: if_python3.c if_py_both.h $(INCL)
Bram Moolenaara7c37952016-01-20 22:23:15 +01001098 $(CC) -c $(CFLAGS) $(PYTHON3INC) $(PYTHON3_HOME_DEF) $< -o $@
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001099
1100$(OUTDIR)/%.o : %.c $(INCL)
1101 $(CC) -c $(CFLAGS) $< -o $@
1102
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001103ifeq ($(VIMDLL),yes)
1104$(OUTDIR)/vimrcc.o: vim.rc gvim.exe.mnf version.h gui_w32_rc.h vim.ico
1105 $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) -UFEAT_GUI_MSWIN \
1106 --input-format=rc --output-format=coff -i vim.rc -o $@
1107
1108$(OUTDIR)/vimrcg.o: vim.rc gvim.exe.mnf version.h gui_w32_rc.h vim.ico
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001109 $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
1110 --input-format=rc --output-format=coff -i vim.rc -o $@
1111
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001112$(OUTDIR)/vimrcd.o: vim.rc version.h gui_w32_rc.h \
1113 tools.bmp tearoff.bmp vim.ico vim_error.ico \
1114 vim_alert.ico vim_info.ico vim_quest.ico
1115 $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) -DRCDLL -DVIMDLLBASE=\\\"$(VIMDLLBASE)\\\" \
1116 --input-format=rc --output-format=coff -i vim.rc -o $@
1117else
1118$(OUTDIR)/vimrc.o: vim.rc gvim.exe.mnf version.h gui_w32_rc.h \
1119 tools.bmp tearoff.bmp vim.ico vim_error.ico \
1120 vim_alert.ico vim_info.ico vim_quest.ico
1121 $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
1122 --input-format=rc --output-format=coff -i vim.rc -o $@
1123endif
1124
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001125$(OUTDIR):
1126 $(MKDIR) $(OUTDIR)
1127
Bram Moolenaard22a6f82019-05-24 17:17:54 +02001128$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp gui_dwrite.h
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001129 $(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $@
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001130
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001131$(OUTDIR)/gui.o: gui.c $(INCL) $(GUI_INCL)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001132 $(CC) -c $(CFLAGS) gui.c -o $@
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001133
Bram Moolenaarc3719bd2017-11-18 22:13:31 +01001134$(OUTDIR)/beval.o: beval.c $(INCL) $(GUI_INCL)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001135 $(CC) -c $(CFLAGS) beval.c -o $@
Bram Moolenaarc3719bd2017-11-18 22:13:31 +01001136
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001137$(OUTDIR)/gui_beval.o: gui_beval.c $(INCL) $(GUI_INCL)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001138 $(CC) -c $(CFLAGS) gui_beval.c -o $@
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001139
1140$(OUTDIR)/gui_w32.o: gui_w32.c $(INCL) $(GUI_INCL)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001141 $(CC) -c $(CFLAGS) gui_w32.c -o $@
Bram Moolenaarf80451e2017-07-25 21:49:35 +02001142
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001143$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001144 $(CC) -c $(CFLAGS) if_cscope.c -o $@
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001145
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001146$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) $(MZSCHEME_INCL) $(MZ_EXTRA_DEP)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001147 $(CC) -c $(CFLAGS) if_mzsch.c -o $@
Bram Moolenaarf80451e2017-07-25 21:49:35 +02001148
1149mzscheme_base.c:
1150 $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
1151
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001152# Remove -D__IID_DEFINED__ for newer versions of the w32api
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001153$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) if_ole.h
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001154 $(CC) -c $(CFLAGS) $(CXXFLAGS) if_ole.cpp -o $@
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001155
Bram Moolenaara16bc542018-10-14 16:25:10 +02001156auto/if_perl.c: if_perl.xs typemap
Bram Moolenaarf80451e2017-07-25 21:49:35 +02001157 $(XSUBPP) -prototypes -typemap \
1158 $(PERLTYPEMAP) if_perl.xs -output $@
1159
Bram Moolenaara16bc542018-10-14 16:25:10 +02001160$(OUTDIR)/if_perl.o: auto/if_perl.c $(INCL)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001161 $(CC) -c $(CFLAGS) auto/if_perl.c -o $@
Bram Moolenaara16bc542018-10-14 16:25:10 +02001162
1163
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001164$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001165ifeq (16, $(RUBY))
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001166 $(CC) $(CFLAGS) -U_WIN32 -c -o $@ if_ruby.c
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001167endif
1168
Bram Moolenaar97ff9b92016-06-26 20:37:46 +02001169$(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL)
Bram Moolenaar2bc127f2016-07-10 13:57:40 +02001170 $(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL
Bram Moolenaar97ff9b92016-06-26 20:37:46 +02001171
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001172$(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001173 $(CC) -c $(CFLAGS) main.c -o $@
Bram Moolenaar97ff9b92016-06-26 20:37:46 +02001174
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001175$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001176 $(CC) -c $(CFLAGS) netbeans.c -o $@
1177
1178$(OUTDIR)/os_w32exec.o: os_w32exe.c $(INCL)
1179 $(CC) -c $(CFLAGS) -UFEAT_GUI_MSWIN os_w32exe.c -o $@
1180
1181$(OUTDIR)/os_w32exeg.o: os_w32exe.c $(INCL)
1182 $(CC) -c $(CFLAGS) os_w32exe.c -o $@
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001183
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001184$(OUTDIR)/os_win32.o: os_win32.c $(INCL) $(MZSCHEME_INCL)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001185 $(CC) -c $(CFLAGS) os_win32.c -o $@
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001186
Bram Moolenaar6d7d7cf2019-09-07 23:16:33 +02001187$(OUTDIR)/regexp.o: regexp.c regexp_bt.c regexp_nfa.c $(INCL)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001188 $(CC) -c $(CFLAGS) regexp.c -o $@
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001189
Bram Moolenaar4aea03e2019-09-25 22:37:17 +02001190$(OUTDIR)/register.o: register.c $(INCL)
1191 $(CC) -c $(CFLAGS) register.c -o $@
1192
Bram Moolenaarf80451e2017-07-25 21:49:35 +02001193$(OUTDIR)/terminal.o: terminal.c $(INCL) $(TERM_DEPS)
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001194 $(CC) -c $(CFLAGS) terminal.c -o $@
Bram Moolenaar98aefe72018-12-13 22:20:09 +01001195
Bram Moolenaardfc14552019-06-21 17:36:10 +02001196$(OUTDIR)/pathdef.o: $(PATHDEF_SRC) $(INCL)
1197 $(CC) -c $(CFLAGS) $(PATHDEF_SRC) -o $@
1198
Bram Moolenaarf80451e2017-07-25 21:49:35 +02001199
Bram Moolenaar6d0826d2017-08-22 22:12:17 +02001200CCCTERM = $(CC) -c $(CFLAGS) -Ilibvterm/include -DINLINE="" \
1201 -DVSNPRINTF=vim_vsnprintf \
1202 -DIS_COMBINING_FUNCTION=utf_iscomposing_uint \
Bram Moolenaar57da6982019-09-13 22:30:11 +02001203 -DWCWIDTH_FUNCTION=utf_uint2cells \
1204 -DGET_SPECIAL_PTY_TYPE_FUNCTION=get_special_pty_type
Bram Moolenaar6d0826d2017-08-22 22:12:17 +02001205
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001206$(OUTDIR)/%.o : libvterm/src/%.c $(TERM_DEPS)
1207 $(CCCTERM) $< -o $@
Bram Moolenaarf80451e2017-07-25 21:49:35 +02001208
Bram Moolenaarf80451e2017-07-25 21:49:35 +02001209
Bram Moolenaarafde13b2019-04-28 19:46:49 +02001210$(OUTDIR)/%.o : xdiff/%.c $(XDIFF_DEPS)
1211 $(CC) -c $(CFLAGS) $< -o $@
Bram Moolenaarf80451e2017-07-25 21:49:35 +02001212
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001213
Bram Moolenaardfc14552019-06-21 17:36:10 +02001214$(PATHDEF_SRC): Make_cyg_ming.mak Make_cyg.mak Make_ming.mak
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001215ifneq (sh.exe, $(SHELL))
Bram Moolenaardfc14552019-06-21 17:36:10 +02001216 @echo creating $(PATHDEF_SRC)
1217 @echo '/* pathdef.c */' > $(PATHDEF_SRC)
1218 @echo '#include "vim.h"' >> $(PATHDEF_SRC)
1219 @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> $(PATHDEF_SRC)
1220 @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> $(PATHDEF_SRC)
1221 @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> $(PATHDEF_SRC)
1222 @echo 'char_u *all_lflags = (char_u *)"$(LINK) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)";' >> $(PATHDEF_SRC)
1223 @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> $(PATHDEF_SRC)
1224 @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> $(PATHDEF_SRC)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001225else
Bram Moolenaardfc14552019-06-21 17:36:10 +02001226 @echo creating $(PATHDEF_SRC)
1227 @echo /* pathdef.c */ > $(PATHDEF_SRC)
1228 @echo #include "vim.h" >> $(PATHDEF_SRC)
1229 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> $(PATHDEF_SRC)
1230 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> $(PATHDEF_SRC)
1231 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> $(PATHDEF_SRC)
1232 @echo char_u *all_lflags = (char_u *)"$(CC) $(CFLAGS) $(LFLAGS) -o $(TARGET) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)"; >> $(PATHDEF_SRC)
1233 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> $(PATHDEF_SRC)
1234 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> $(PATHDEF_SRC)
Bram Moolenaar4f7e8212014-11-05 13:53:32 +01001235endif
Bram Moolenaar96e7a6e2017-09-23 19:48:29 +02001236
1237# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: