blob: f7088ad58edd6e847a8bb5255a4e5d1d325ff324 [file] [log] [blame]
Bram Moolenaare2db4362012-09-05 17:57:39 +02001# Makefile for VIM on Win32
2#
Bram Moolenaar071d4272004-06-13 20:20:40 +00003# Info at http://www.mingw.org
Bram Moolenaare2db4362012-09-05 17:57:39 +02004# Alternative x86 and 64-builds: http://mingw-w64.sourceforge.net
5# Also requires GNU make, which you can download from the same sites.
Bram Moolenaar071d4272004-06-13 20:20:40 +00006# Get missing libraries from http://gnuwin32.sf.net.
7#
8# Tested on Win32 NT 4 and Win95.
9#
Bram Moolenaare2db4362012-09-05 17:57:39 +020010# To make everything, just 'make -f Make_ming.mak'.
11# To make just e.g. gvim.exe, 'make -f Make_ming.mak gvim.exe'.
12# After a run, you can 'make -f Make_ming.mak clean' to clean up.
Bram Moolenaar071d4272004-06-13 20:20:40 +000013#
14# NOTE: Sometimes 'GNU Make' will stop after building vimrun.exe -- I think
15# it's just run out of memory or something. Run again, and it will continue
16# with 'xxd'.
17#
Bram Moolenaar91856272012-02-29 16:56:39 +010018# "make upx" makes *compressed* versions of the 32 bit GUI and console EXEs,
19# using the excellent UPX compressor:
Bram Moolenaar071d4272004-06-13 20:20:40 +000020# http://upx.sourceforge.net/
Bram Moolenaar91856272012-02-29 16:56:39 +010021# "make mpress" uses the MPRESS compressor for 32- and 64-bit EXEs:
22# http://www.matcode.com/mpress.htm
Bram Moolenaar071d4272004-06-13 20:20:40 +000023#
Bram Moolenaare2db4362012-09-05 17:57:39 +020024# Maintained by Ron Aaron <ronaharon@yahoo.com> et al.
25# Updated 2012 Sep 5.
Bram Moolenaar071d4272004-06-13 20:20:40 +000026
27#>>>>> choose options:
28# set to yes for a debug build
29DEBUG=no
Bram Moolenaar7263a772007-05-10 17:35:54 +000030# set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
Bram Moolenaar071d4272004-06-13 20:20:40 +000031OPTIMIZE=MAXSPEED
32# set to yes to make gvim, no for vim
33GUI=yes
34# FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
Bram Moolenaare2db4362012-09-05 17:57:39 +020035# Set to TINY to make minimal version (few features).
Bram Moolenaar071d4272004-06-13 20:20:40 +000036FEATURES=BIG
Bram Moolenaare2db4362012-09-05 17:57:39 +020037# Set to one of i386, i486, i586, i686 as the minimum target processor.
38# For amd64/x64 architecture set ARCH=x86-64 .
Bram Moolenaar071d4272004-06-13 20:20:40 +000039ARCH=i386
Bram Moolenaare2db4362012-09-05 17:57:39 +020040# Set to yes to cross-compile from unix; no=native Windows.
Bram Moolenaar071d4272004-06-13 20:20:40 +000041CROSS=no
Bram Moolenaare2db4362012-09-05 17:57:39 +020042# Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.
Bram Moolenaar071d4272004-06-13 20:20:40 +000043#ICONV="."
44ICONV=yes
45GETTEXT=yes
Bram Moolenaare2db4362012-09-05 17:57:39 +020046# Set to yes to include multibyte support.
Bram Moolenaar071d4272004-06-13 20:20:40 +000047MBYTE=yes
Bram Moolenaare2db4362012-09-05 17:57:39 +020048# Set to yes to include IME support.
Bram Moolenaar071d4272004-06-13 20:20:40 +000049IME=yes
50DYNAMIC_IME=yes
Bram Moolenaare2db4362012-09-05 17:57:39 +020051# Set to yes to enable writing a postscript file with :hardcopy.
Bram Moolenaar071d4272004-06-13 20:20:40 +000052POSTSCRIPT=no
Bram Moolenaare2db4362012-09-05 17:57:39 +020053# Set to yes to enable OLE support.
Bram Moolenaar071d4272004-06-13 20:20:40 +000054OLE=no
Bram Moolenaare2db4362012-09-05 17:57:39 +020055# Set the default $(WINVER) to make it work with pre-Win2k.
Bram Moolenaara6cdc992012-04-20 16:13:25 +020056ifndef WINVER
Bram Moolenaar95b557b2012-07-06 13:40:50 +020057WINVER = 0x0500
Bram Moolenaara6cdc992012-04-20 16:13:25 +020058endif
Bram Moolenaare2db4362012-09-05 17:57:39 +020059# Set to yes to enable Cscope support.
Bram Moolenaar071d4272004-06-13 20:20:40 +000060CSCOPE=yes
Bram Moolenaare2db4362012-09-05 17:57:39 +020061# Set to yes to enable Netbeans support.
Bram Moolenaar071d4272004-06-13 20:20:40 +000062NETBEANS=$(GUI)
63
64
Bram Moolenaarb0d3f872010-12-30 14:50:52 +010065# Link against the shared version of libstdc++ by default. Set
66# STATIC_STDCPLUS to "yes" to link against static version instead.
67ifndef STATIC_STDCPLUS
68STATIC_STDCPLUS=no
69endif
70
Bram Moolenaar071d4272004-06-13 20:20:40 +000071# If the user doesn't want gettext, undefine it.
72ifeq (no, $(GETTEXT))
73GETTEXT=
74endif
75# Added by E.F. Amatria <eferna1@platea.ptic.mec.es> 2001 Feb 23
76# Uncomment the first line and one of the following three if you want Native Language
77# Support. You'll need gnu_gettext.win32, a MINGW32 Windows PORT of gettext by
78# Franco Bez <franco.bez@gmx.de>. It may be found at
79# http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html
80# Tested with mingw32 with GCC-2.95.2 on Win98
81# Updated 2001 Jun 9
82#GETTEXT=c:/gettext.win32.msvcrt
83#STATIC_GETTEXT=USE_STATIC_GETTEXT
84#DYNAMIC_GETTEXT=USE_GETTEXT_DLL
85#DYNAMIC_GETTEXT=USE_SAFE_GETTEXT_DLL
86SAFE_GETTEXT_DLL_OBJ = $(GETTEXT)/src/safe_gettext_dll/safe_gettext_dll.o
87# Alternatively, if you uncomment the two following lines, you get a "safe" version
88# without linking the safe_gettext_dll.o object file.
89#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
90#GETTEXT_DYNAMIC=gnu_gettext.dll
91INTLPATH=$(GETTEXT)/lib/mingw32
92INTLLIB=gnu_gettext
93
94# If you are using gettext-0.10.35 from http://sourceforge.net/projects/gettext
95# or gettext-0.10.37 from http://sourceforge.net/projects/mingwrep/
Bram Moolenaarc16756d2011-06-19 01:30:07 +020096# uncomment the following, but I can't build a static version with them, ?-(|
Bram Moolenaar071d4272004-06-13 20:20:40 +000097#GETTEXT=c:/gettext-0.10.37-20010430
98#STATIC_GETTEXT=USE_STATIC_GETTEXT
99#DYNAMIC_GETTEXT=DYNAMIC_GETTEXT
100#INTLPATH=$(GETTEXT)/lib
101#INTLLIB=intl
102
103# uncomment 'PERL' if you want a perl-enabled version
104#PERL=C:/perl
105ifdef PERL
106ifndef PERL_VER
107PERL_VER=56
108endif
109ifndef DYNAMIC_PERL
110DYNAMIC_PERL=yes
111endif
112# on Linux, for cross-compile, it's here:
113#PERLLIB=/home/ron/ActivePerl/lib
114# on NT, it's here:
115PERLLIB=$(PERL)/lib
116PERLLIBS=$(PERLLIB)/Core
Bram Moolenaar08c51aa2011-10-12 14:11:45 +0200117XSUBPPTRY=$(PERLLIB)/ExtUtils/xsubpp
118XSUBPP_EXISTS=$(shell perl -e "print 1 unless -e '$(XSUBPPTRY)'")
Bram Moolenaar612af432011-09-14 10:49:46 +0200119ifeq "$(XSUBPP_EXISTS)" ""
Bram Moolenaar08c51aa2011-10-12 14:11:45 +0200120XSUBPP=perl $(XSUBPPTRY)
Bram Moolenaar612af432011-09-14 10:49:46 +0200121else
122XSUBPP=xsubpp
123endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000124endif
125
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200126# uncomment 'LUA' if you want a Lua-enabled version
127#LUA=/usr/local
128ifdef LUA
129ifndef DYNAMIC_LUA
130DYNAMIC_LUA=yes
131endif
132
133ifndef LUA_VER
134LUA_VER=51
135endif
136
137ifeq (no,$(DYNAMIC_LUA))
138LUA_LIB = -L$(LUA)/lib -llua
139endif
140
141endif
142
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000143# uncomment 'MZSCHEME' if you want a MzScheme-enabled version
144#MZSCHEME=d:/plt
145ifdef MZSCHEME
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000146ifndef DYNAMIC_MZSCHEME
147DYNAMIC_MZSCHEME=yes
148endif
149
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000150ifndef MZSCHEME_VER
151MZSCHEME_VER=205_000
152endif
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000153
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000154ifndef MZSCHEME_PRECISE_GC
155MZSCHEME_PRECISE_GC=no
156endif
157
158# for version 4.x we need to generate byte-code for Scheme base
159ifndef MZSCHEME_GENERATE_BASE
160MZSCHEME_GENERATE_BASE=no
161endif
162
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100163ifndef MZSCHEME_USE_RACKET
164MZSCHEME_MAIN_LIB=mzsch
165else
166MZSCHEME_MAIN_LIB=racket
167endif
168
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000169ifeq (no,$(DYNAMIC_MZSCHEME))
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000170ifeq (yes,$(MZSCHEME_PRECISE_GC))
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100171MZSCHEME_LIB=-l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER)
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000172else
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100173MZSCHEME_LIB = -l$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER) -lmzgc$(MZSCHEME_VER)
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000174endif
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000175# the modern MinGW can dynamically link to dlls directly.
176# point MZSCHEME_DLLS to where you put libmzschXXXXXXX.dll and libgcXXXXXXX.dll
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000177ifndef MZSCHEME_DLLS
178MZSCHEME_DLLS=$(MZSCHEME)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000179endif
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000180MZSCHEME_LIBDIR=-L$(MZSCHEME_DLLS) -L$(MZSCHEME_DLLS)\lib
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000181endif
182
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000183endif
184
Bram Moolenaar071d4272004-06-13 20:20:40 +0000185# Python support -- works with the ActiveState python 2.0 release (and others
186# too, probably)
187#
188# uncomment 'PYTHON' to make python-enabled version
189# Put the path to the python distro here. If cross compiling from Linux, you
190# will also need to convert the header files to unix instead of dos format:
191# for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
192# and also, you will need to make a mingw32 'libpython20.a' to link with:
193# cd $PYTHON/libs
194# pexports python20.dll > python20.def
195# dlltool -d python20.def -l libpython20.a
196# on my Linux box, I put the Python stuff here:
197#PYTHON=/home/ron/ActivePython-2.0.0-202/src/Core
198# on my NT box, it's here:
199#PYTHON=c:/python20
200
201ifdef PYTHON
202ifndef DYNAMIC_PYTHON
203DYNAMIC_PYTHON=yes
204endif
205
206ifndef PYTHON_VER
207PYTHON_VER=22
208endif
209
210ifeq (no,$(DYNAMIC_PYTHON))
211PYTHONLIB=-L$(PYTHON)/libs -lpython$(PYTHON_VER)
212endif
213# my include files are in 'win32inc' on Linux, and 'include' in the standard
214# NT distro (ActiveState)
215ifeq ($(CROSS),no)
216PYTHONINC=-I $(PYTHON)/include
217else
218PYTHONINC=-I $(PYTHON)/win32inc
219endif
220endif
221
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200222#PYTHON3: See comment for Python 2 above
223
224ifdef PYTHON3
225ifndef DYNAMIC_PYTHON3
226DYNAMIC_PYTHON3=yes
227endif
228
229ifndef PYTHON3_VER
230PYTHON3_VER=31
231endif
232
233ifeq (no,$(DYNAMIC_PYTHON3))
234PYTHON3LIB=-L$(PYTHON3)/libs -lPYTHON$(PYTHON3_VER)
235endif
236
237ifeq ($(CROSS),no)
238PYTHON3INC=-I $(PYTHON3)/include
239else
240PYTHON3INC=-I $(PYTHON3)/win32inc
241endif
242endif
243
Bram Moolenaar071d4272004-06-13 20:20:40 +0000244# TCL interface:
245# TCL=[Path to TCL directory]
246# DYNAMIC_TCL=yes (to load the TCL DLL dynamically)
247# TCL_VER=[TCL version, eg 83, 84] (default is 83)
248#TCL=c:/tcl
249ifdef TCL
250ifndef DYNAMIC_TCL
251DYNAMIC_TCL=yes
252endif
253ifndef TCL_VER
254TCL_VER = 83
255endif
256TCLINC += -I$(TCL)/include
257endif
258
259
260# Ruby interface:
261# RUBY=[Path to Ruby directory]
262# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
263# RUBY_VER=[Ruby version, eg 16, 17] (default is 16)
264# RUBY_VER_LONG=[Ruby version, eg 1.6, 1.7] (default is 1.6)
Bram Moolenaarda3cb832012-08-02 21:21:47 +0200265# You must set RUBY_VER_LONG when changing RUBY_VER.
266# You must set RUBY_API_VER version to RUBY_VER_LONG.
267# Don't set ruby API version to RUBY_VER like 191.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000268#RUBY=c:/ruby
269ifdef RUBY
270ifndef DYNAMIC_RUBY
271DYNAMIC_RUBY=yes
272endif
273# Set default value
274ifndef RUBY_VER
275RUBY_VER = 16
276endif
277ifndef RUBY_VER_LONG
278RUBY_VER_LONG = 1.6
279endif
Bram Moolenaarda3cb832012-08-02 21:21:47 +0200280ifndef RUBY_API_VER
281RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
282endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000283
Bram Moolenaar66ca3202010-03-10 13:20:40 +0100284ifndef RUBY_PLATFORM
Bram Moolenaar071d4272004-06-13 20:20:40 +0000285ifeq ($(RUBY_VER), 16)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000286RUBY_PLATFORM = i586-mswin32
Bram Moolenaar8c79caf2010-03-17 17:25:09 +0100287else
288ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
Bram Moolenaar66ca3202010-03-10 13:20:40 +0100289RUBY_PLATFORM = i386-mingw32
Bram Moolenaar071d4272004-06-13 20:20:40 +0000290else
Bram Moolenaardb3fbe52013-03-07 15:16:21 +0100291ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
292RUBY_PLATFORM = x64-mingw32
293else
Bram Moolenaar071d4272004-06-13 20:20:40 +0000294RUBY_PLATFORM = i386-mswin32
295endif
Bram Moolenaar66ca3202010-03-10 13:20:40 +0100296endif
Bram Moolenaar8c79caf2010-03-17 17:25:09 +0100297endif
Bram Moolenaardb3fbe52013-03-07 15:16:21 +0100298endif
Bram Moolenaar66ca3202010-03-10 13:20:40 +0100299
Bram Moolenaar071d4272004-06-13 20:20:40 +0000300ifndef RUBY_INSTALL_NAME
Bram Moolenaar66ca3202010-03-10 13:20:40 +0100301ifeq ($(RUBY_VER), 16)
Bram Moolenaarda3cb832012-08-02 21:21:47 +0200302RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
Bram Moolenaar66ca3202010-03-10 13:20:40 +0100303else
Bram Moolenaardb3fbe52013-03-07 15:16:21 +0100304ifeq ($(ARCH),x86-64)
305RUBY_INSTALL_NAME = x64-msvcrt-ruby$(RUBY_API_VER)
306else
Bram Moolenaarda3cb832012-08-02 21:21:47 +0200307RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_API_VER)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000308endif
309endif
Bram Moolenaardb3fbe52013-03-07 15:16:21 +0100310endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000311
Bram Moolenaardd53a412012-11-28 16:18:29 +0100312ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
313RUBY_19_OR_LATER = 1
314endif
315
316RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
317ifdef RUBY_19_OR_LATER
318RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
319endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000320ifeq (no, $(DYNAMIC_RUBY))
321RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
322endif
323
324endif # RUBY
325
326# See feature.h for a list of options.
327# Any other defines can be included here.
328DEF_GUI=-DFEAT_GUI_W32 -DFEAT_CLIPBOARD
329DEFINES=-DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \
330 -DHAVE_PATHDEF -DFEAT_$(FEATURES)
Bram Moolenaar254e0282013-07-06 13:35:08 +0200331ifeq ($(ARCH),x86-64)
332DEFINES+=-DMS_WIN64
333endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000334ifeq ($(CROSS),yes)
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100335# cross-compiler prefix:
336CROSS_COMPILE = i586-pc-mingw32msvc-
Bram Moolenaar071d4272004-06-13 20:20:40 +0000337DEL = rm
Bram Moolenaar0cf6f542005-01-16 21:59:36 +0000338MKDIR = mkdir -p
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100339DIRSLASH = /
Bram Moolenaar071d4272004-06-13 20:20:40 +0000340else
341# normal (Windows) compilation:
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100342CROSS_COMPILE =
Bram Moolenaar86ce1cc2010-02-26 22:05:22 +0100343ifneq (sh.exe, $(SHELL))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000344DEL = rm
Bram Moolenaar0cf6f542005-01-16 21:59:36 +0000345MKDIR = mkdir -p
Bram Moolenaar071d4272004-06-13 20:20:40 +0000346DIRSLASH = /
347else
348DEL = del
Bram Moolenaar0cf6f542005-01-16 21:59:36 +0000349MKDIR = mkdir
Bram Moolenaar071d4272004-06-13 20:20:40 +0000350DIRSLASH = \\
351endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000352endif
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100353CC := $(CROSS_COMPILE)gcc
Bram Moolenaarb0d3f872010-12-30 14:50:52 +0100354WINDRES := $(CROSS_COMPILE)windres
355WINDRES_CC = $(CC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000356
357#>>>>> end of choices
358###########################################################################
359
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000360CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
Bram Moolenaarb0d3f872010-12-30 14:50:52 +0100361WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
Bram Moolenaar6b107212013-12-11 15:06:40 +0100362EXTRA_LIBS =
Bram Moolenaar071d4272004-06-13 20:20:40 +0000363
364ifdef GETTEXT
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000365DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
Bram Moolenaar071d4272004-06-13 20:20:40 +0000366GETTEXTINCLUDE = $(GETTEXT)/include
367GETTEXTLIB = $(INTLPATH)
368ifeq (yes, $(GETTEXT))
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000369DEFINES += -DDYNAMIC_GETTEXT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000370else
371ifdef DYNAMIC_GETTEXT
Bram Moolenaar8cd06ca2005-02-28 22:44:58 +0000372DEFINES += -D$(DYNAMIC_GETTEXT)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000373ifdef GETTEXT_DYNAMIC
374DEFINES += -DGETTEXT_DYNAMIC -DGETTEXT_DLL=\"$(GETTEXT_DYNAMIC)\"
375endif
376endif
377endif
378endif
379
380ifdef PERL
Bram Moolenaar6b107212013-12-11 15:06:40 +0100381CFLAGS += -I$(PERLLIBS) -DFEAT_PERL
Bram Moolenaar071d4272004-06-13 20:20:40 +0000382ifeq (yes, $(DYNAMIC_PERL))
383CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
Bram Moolenaar6b107212013-12-11 15:06:40 +0100384EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000385endif
386endif
387
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200388ifdef LUA
389CFLAGS += -I$(LUA)/include -DFEAT_LUA
390ifeq (yes, $(DYNAMIC_LUA))
391CFLAGS += -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua$(LUA_VER).dll\"
392endif
393endif
394
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000395ifdef MZSCHEME
396CFLAGS += -I$(MZSCHEME)/include -DFEAT_MZSCHEME -DMZSCHEME_COLLECTS=\"$(MZSCHEME)/collects\"
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000397ifeq (yes, $(DYNAMIC_MZSCHEME))
Bram Moolenaar2d0860d2010-11-03 21:59:30 +0100398CFLAGS += -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL=\"lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).dll\" -DDYNAMIC_MZGC_DLL=\"libmzgc$(MZSCHEME_VER).dll\"
Bram Moolenaar281bdce2005-01-25 21:53:18 +0000399endif
Bram Moolenaar75676462013-01-30 14:55:42 +0100400ifeq (yes, "$(MZSCHEME_DEBUG)")
401CFLAGS += -DMZSCHEME_FORCE_GC
402endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000403endif
404
Bram Moolenaar071d4272004-06-13 20:20:40 +0000405ifdef RUBY
406CFLAGS += -DFEAT_RUBY $(RUBYINC)
407ifeq (yes, $(DYNAMIC_RUBY))
408CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
409CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
410endif
411endif
412
413ifdef PYTHON
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200414CFLAGS += -DFEAT_PYTHON
Bram Moolenaar071d4272004-06-13 20:20:40 +0000415ifeq (yes, $(DYNAMIC_PYTHON))
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200416CFLAGS += -DDYNAMIC_PYTHON
417endif
418endif
419
420ifdef PYTHON3
421CFLAGS += -DFEAT_PYTHON3
422ifeq (yes, $(DYNAMIC_PYTHON3))
423CFLAGS += -DDYNAMIC_PYTHON3
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424endif
425endif
426
427ifdef TCL
428CFLAGS += -DFEAT_TCL $(TCLINC)
429ifeq (yes, $(DYNAMIC_TCL))
430CFLAGS += -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL=\"tcl$(TCL_VER).dll\"
431endif
432endif
433
434ifeq ($(POSTSCRIPT),yes)
435DEFINES += -DMSWINPS
436endif
437
438ifeq (yes, $(OLE))
439DEFINES += -DFEAT_OLE
440endif
441
442ifeq ($(CSCOPE),yes)
443DEFINES += -DFEAT_CSCOPE
444endif
445
446ifeq ($(NETBEANS),yes)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000447# Only allow NETBEANS for a GUI build.
448ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000449DEFINES += -DFEAT_NETBEANS_INTG
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000450
451ifeq ($(NBDEBUG), yes)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000452DEFINES += -DNBDEBUG
453NBDEBUG_INCL = nbdebug.h
454NBDEBUG_SRC = nbdebug.c
455endif
456endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000457endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000458
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000459# Only allow XPM for a GUI build.
460ifeq (yes, $(GUI))
Bram Moolenaare2db4362012-09-05 17:57:39 +0200461
462ifndef XPM
463ifeq ($(ARCH),i386)
464XPM = xpm/x86
Bram Moolenaar071d4272004-06-13 20:20:40 +0000465endif
Bram Moolenaare2db4362012-09-05 17:57:39 +0200466ifeq ($(ARCH),i486)
467XPM = xpm/x86
468endif
469ifeq ($(ARCH),i586)
470XPM = xpm/x86
471endif
472ifeq ($(ARCH),i686)
473XPM = xpm/x86
474endif
475ifeq ($(ARCH),x86-64)
476XPM = xpm/x64
477endif
478endif
479ifdef XPM
480ifneq ($(XPM),no)
481CFLAGS += -DFEAT_XPM_W32 -I $(XPM)/include -I $(XPM)/../include
482endif
483endif
484
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000485endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000486
487ifeq ($(DEBUG),yes)
488CFLAGS += -g -fstack-check
489DEBUG_SUFFIX=d
490else
491ifeq ($(OPTIMIZE), SIZE)
492CFLAGS += -Os
493else
494ifeq ($(OPTIMIZE), MAXSPEED)
495CFLAGS += -O3
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000496CFLAGS += -fomit-frame-pointer -freg-struct-return
Bram Moolenaar071d4272004-06-13 20:20:40 +0000497else # SPEED
498CFLAGS += -O2
499endif
500endif
501CFLAGS += -s
502endif
503
Bram Moolenaara3ffd9c2005-07-21 21:03:15 +0000504LIB = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomdlg32 -lcomctl32 -lversion
Bram Moolenaar44ecf652005-03-07 23:09:59 +0000505GUIOBJ = $(OUTDIR)/gui.o $(OUTDIR)/gui_w32.o $(OUTDIR)/gui_beval.o $(OUTDIR)/os_w32exe.o
Bram Moolenaar071d4272004-06-13 20:20:40 +0000506OBJ = \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200507 $(OUTDIR)/blowfish.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000508 $(OUTDIR)/buffer.o \
509 $(OUTDIR)/charset.o \
510 $(OUTDIR)/diff.o \
511 $(OUTDIR)/digraph.o \
512 $(OUTDIR)/edit.o \
513 $(OUTDIR)/eval.o \
514 $(OUTDIR)/ex_cmds.o \
515 $(OUTDIR)/ex_cmds2.o \
516 $(OUTDIR)/ex_docmd.o \
517 $(OUTDIR)/ex_eval.o \
518 $(OUTDIR)/ex_getln.o \
519 $(OUTDIR)/fileio.o \
520 $(OUTDIR)/fold.o \
521 $(OUTDIR)/getchar.o \
Bram Moolenaar58d98232005-07-23 22:25:46 +0000522 $(OUTDIR)/hardcopy.o \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000523 $(OUTDIR)/hashtab.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000524 $(OUTDIR)/main.o \
525 $(OUTDIR)/mark.o \
526 $(OUTDIR)/memfile.o \
527 $(OUTDIR)/memline.o \
528 $(OUTDIR)/menu.o \
529 $(OUTDIR)/message.o \
530 $(OUTDIR)/misc1.o \
531 $(OUTDIR)/misc2.o \
532 $(OUTDIR)/move.o \
533 $(OUTDIR)/mbyte.o \
534 $(OUTDIR)/normal.o \
535 $(OUTDIR)/ops.o \
536 $(OUTDIR)/option.o \
537 $(OUTDIR)/os_win32.o \
538 $(OUTDIR)/os_mswin.o \
Bram Moolenaar693e40c2013-02-26 14:56:42 +0100539 $(OUTDIR)/winclip.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000540 $(OUTDIR)/pathdef.o \
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000541 $(OUTDIR)/popupmnu.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000542 $(OUTDIR)/quickfix.o \
543 $(OUTDIR)/regexp.o \
544 $(OUTDIR)/screen.o \
545 $(OUTDIR)/search.o \
Bram Moolenaaredac1852010-05-18 20:34:20 +0200546 $(OUTDIR)/sha256.o \
Bram Moolenaar6bb68362005-03-22 23:03:44 +0000547 $(OUTDIR)/spell.o \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548 $(OUTDIR)/syntax.o \
549 $(OUTDIR)/tag.o \
550 $(OUTDIR)/term.o \
551 $(OUTDIR)/ui.o \
552 $(OUTDIR)/undo.o \
553 $(OUTDIR)/version.o \
554 $(OUTDIR)/vimrc.o \
555 $(OUTDIR)/window.o
556
557ifdef PERL
558OBJ += $(OUTDIR)/if_perl.o
559endif
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200560ifdef LUA
561OBJ += $(OUTDIR)/if_lua.o
562endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000563ifdef MZSCHEME
564OBJ += $(OUTDIR)/if_mzsch.o
565MZSCHEME_INCL = if_mzsch.h
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000566ifeq (yes,$(MZSCHEME_GENERATE_BASE))
567CFLAGS += -DINCLUDE_MZSCHEME_BASE
568MZ_EXTRA_DEP += mzscheme_base.c
569endif
570ifeq (yes,$(MZSCHEME_PRECISE_GC))
571CFLAGS += -DMZ_PRECISE_GC
572endif
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000573endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000574ifdef PYTHON
575OBJ += $(OUTDIR)/if_python.o
576endif
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200577ifdef PYTHON3
578OBJ += $(OUTDIR)/if_python3.o
579endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000580ifdef RUBY
581OBJ += $(OUTDIR)/if_ruby.o
582endif
583ifdef TCL
584OBJ += $(OUTDIR)/if_tcl.o
585endif
586ifeq ($(CSCOPE),yes)
587OBJ += $(OUTDIR)/if_cscope.o
588endif
589ifeq ($(NETBEANS),yes)
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000590# Only allow NETBEANS for a GUI build.
591ifeq (yes, $(GUI))
Bram Moolenaar44ecf652005-03-07 23:09:59 +0000592OBJ += $(OUTDIR)/netbeans.o
Bram Moolenaar071d4272004-06-13 20:20:40 +0000593LIB += -lwsock32
594endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000595endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000596ifdef XPM
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000597# Only allow XPM for a GUI build.
598ifeq (yes, $(GUI))
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599OBJ += $(OUTDIR)/xpm_w32.o
600# You'll need libXpm.a from http://gnuwin32.sf.net
Bram Moolenaar5ec83052014-01-06 15:45:10 +0100601LIB += -L$(XPM)/lib -lXpm
Bram Moolenaar071d4272004-06-13 20:20:40 +0000602endif
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000603endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000604
605
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000606ifdef MZSCHEME
607MZSCHEME_SUFFIX = Z
608endif
609
Bram Moolenaar071d4272004-06-13 20:20:40 +0000610ifeq ($(GUI),yes)
611TARGET := gvim$(DEBUG_SUFFIX).exe
612DEFINES += $(DEF_GUI)
613OBJ += $(GUIOBJ)
614LFLAGS += -mwindows
Bram Moolenaare2db4362012-09-05 17:57:39 +0200615OUTDIR = gobj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000616else
617TARGET := vim$(DEBUG_SUFFIX).exe
Bram Moolenaare2db4362012-09-05 17:57:39 +0200618OUTDIR = obj$(DEBUG_SUFFIX)$(MZSCHEME_SUFFIX)$(ARCH)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000619endif
620
621ifdef GETTEXT
622ifneq (yes, $(GETTEXT))
623CFLAGS += -I$(GETTEXTINCLUDE)
624ifndef STATIC_GETTEXT
625LIB += -L$(GETTEXTLIB) -l$(INTLLIB)
626ifeq (USE_SAFE_GETTEXT_DLL, $(DYNAMIC_GETTEXT))
627OBJ+=$(SAFE_GETTEXT_DLL_OBJ)
628endif
629else
630LIB += -L$(GETTEXTLIB) -lintl
631endif
632endif
633endif
634
635ifdef PERL
636ifeq (no, $(DYNAMIC_PERL))
Bram Moolenaar6b107212013-12-11 15:06:40 +0100637LIB += -L$(PERLLIBS) -lperl$(PERL_VER)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000638endif
639endif
640
641ifdef TCL
642LIB += -L$(TCL)/lib
643ifeq (yes, $(DYNAMIC_TCL))
644LIB += -ltclstub$(TCL_VER)
645else
646LIB += -ltcl$(TCL_VER)
647endif
648endif
649
650ifeq (yes, $(OLE))
Bram Moolenaarb0d3f872010-12-30 14:50:52 +0100651LIB += -loleaut32
Bram Moolenaar071d4272004-06-13 20:20:40 +0000652OBJ += $(OUTDIR)/if_ole.o
Bram Moolenaarb0d3f872010-12-30 14:50:52 +0100653ifeq (yes, $(STATIC_STDCPLUS))
654LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
655else
656LIB += -lstdc++
657endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000658endif
659
660ifeq (yes, $(MBYTE))
661DEFINES += -DFEAT_MBYTE
662endif
663
664ifeq (yes, $(IME))
665DEFINES += -DFEAT_MBYTE_IME
666ifeq (yes, $(DYNAMIC_IME))
667DEFINES += -DDYNAMIC_IME
668else
669LIB += -limm32
670endif
671endif
672
673ifdef ICONV
674ifneq (yes, $(ICONV))
675LIB += -L$(ICONV)
676CFLAGS += -I$(ICONV)
677endif
678DEFINES+=-DDYNAMIC_ICONV
679endif
680
681all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
682
683vimrun.exe: vimrun.c
684 $(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIB)
685
686install.exe: dosinst.c
687 $(CC) $(CFLAGS) -o install.exe dosinst.c $(LIB) -lole32 -luuid
688
689uninstal.exe: uninstal.c
690 $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB)
691
692$(TARGET): $(OUTDIR) $(OBJ)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200693 $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000694
695upx: exes
696 upx gvim.exe
697 upx vim.exe
698
Bram Moolenaar91856272012-02-29 16:56:39 +0100699mpress: exes
700 mpress gvim.exe
701 mpress vim.exe
702
Bram Moolenaar071d4272004-06-13 20:20:40 +0000703xxd/xxd.exe: xxd/xxd.c
Bram Moolenaar2369e352011-09-30 16:56:02 +0200704 $(MAKE) -C xxd -f Make_ming.mak CC=$(CC)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000705
706GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
Bram Moolenaar48f80c22010-02-24 15:08:27 +0100707 $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000708
709clean:
710 -$(DEL) $(OUTDIR)$(DIRSLASH)*.o
711 -$(DEL) $(OUTDIR)$(DIRSLASH)*.res
712 -rmdir $(OUTDIR)
713 -$(DEL) *.exe
714 -$(DEL) pathdef.c
715ifdef PERL
716 -$(DEL) if_perl.c
717endif
Bram Moolenaar2d6db762009-09-11 10:49:58 +0000718ifdef MZSCHEME
719 -$(DEL) mzscheme_base.c
720endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000721 $(MAKE) -C GvimExt -f Make_ming.mak clean
Bram Moolenaar2369e352011-09-30 16:56:02 +0200722 $(MAKE) -C xxd -f Make_ming.mak clean
Bram Moolenaar071d4272004-06-13 20:20:40 +0000723
724###########################################################################
725INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
726 structs.h regexp.h option.h ex_cmds.h proto.h globals.h farsi.h \
727 gui.h
728
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200729$(OUTDIR)/if_python.o : if_python.c if_py_both.h $(INCL)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200730 $(CC) -c $(CFLAGS) $(PYTHONINC) -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" $< -o $@
731
Bram Moolenaardd9a4a42013-06-03 20:12:51 +0200732$(OUTDIR)/if_python3.o : if_python3.c if_py_both.h $(INCL)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200733 $(CC) -c $(CFLAGS) $(PYTHON3INC) -DDYNAMIC_PYTHON3_DLL=\"PYTHON$(PYTHON3_VER).dll\" $< -o $@
734
Bram Moolenaar071d4272004-06-13 20:20:40 +0000735$(OUTDIR)/%.o : %.c $(INCL)
736 $(CC) -c $(CFLAGS) $< -o $@
737
Bram Moolenaarca628612012-03-28 17:43:11 +0200738$(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
739 $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
740 --input-format=rc --output-format=coff -i vim.rc -o $@
Bram Moolenaar071d4272004-06-13 20:20:40 +0000741
742$(OUTDIR):
Bram Moolenaar0cf6f542005-01-16 21:59:36 +0000743 $(MKDIR) $(OUTDIR)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000744
745$(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h
746 $(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o
747
748$(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h
749 $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o
750
Bram Moolenaar4da70db2013-01-23 13:55:20 +0100751$(OUTDIR)/gui_w32.o: gui_w32.c gui_w48.c $(INCL)
752 $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
753
Bram Moolenaar071d4272004-06-13 20:20:40 +0000754$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
755 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
756
Bram Moolenaar8c69d532007-08-12 13:25:01 +0000757# Remove -D__IID_DEFINED__ for newer versions of the w32api
Bram Moolenaar071d4272004-06-13 20:20:40 +0000758$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
Bram Moolenaar8c69d532007-08-12 13:25:01 +0000759 $(CC) $(CFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000760
761$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
762ifeq (16, $(RUBY))
763 $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c
764endif
765
766if_perl.c: if_perl.xs typemap
Bram Moolenaar612af432011-09-14 10:49:46 +0200767 $(XSUBPP) -prototypes -typemap \
Bram Moolenaar071d4272004-06-13 20:20:40 +0000768 $(PERLLIB)/ExtUtils/typemap if_perl.xs > $@
769
770$(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC)
771 $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o
772
Bram Moolenaarfbc0d2e2013-05-19 19:40:29 +0200773$(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL)
774 $(CC) -c $(CFLAGS) regexp.c -o $(OUTDIR)/regexp.o
775
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000776$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP)
777 $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o
778
779mzscheme_base.c:
780 $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base
781
Bram Moolenaar071d4272004-06-13 20:20:40 +0000782pathdef.c: $(INCL)
783ifneq (sh.exe, $(SHELL))
784 @echo creating pathdef.c
785 @echo '/* pathdef.c */' > pathdef.c
786 @echo '#include "vim.h"' >> pathdef.c
787 @echo 'char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)";' >> pathdef.c
788 @echo 'char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)";' >> pathdef.c
789 @echo 'char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)";' >> pathdef.c
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200790 @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.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000791 @echo 'char_u *compiled_user = (char_u *)"$(USERNAME)";' >> pathdef.c
792 @echo 'char_u *compiled_sys = (char_u *)"$(USERDOMAIN)";' >> pathdef.c
793else
794 @echo creating pathdef.c
795 @echo /* pathdef.c */ > pathdef.c
796 @echo #include "vim.h" >> pathdef.c
797 @echo char_u *default_vim_dir = (char_u *)"$(VIMRCLOC)"; >> pathdef.c
798 @echo char_u *default_vimruntime_dir = (char_u *)"$(VIMRUNTIMEDIR)"; >> pathdef.c
799 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200800 @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.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000801 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
802 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
803endif