Mercurial > vim
changeset 11782:112427b2de52 v8.0.0773
patch 8.0.0773: mixing 32 and 64 bit libvterm builds fails
commit https://github.com/vim/vim/commit/f80451e6fe19b3bbddc45ec047a2f95989ef3531
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 25 21:49:35 2017 +0200
patch 8.0.0773: mixing 32 and 64 bit libvterm builds fails
Problem: Mixing 32 and 64 bit libvterm builds fails.
Solution: Use OUTDIR. (Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 25 Jul 2017 22:00:05 +0200 |
parents | c56c413f83a1 |
children | 3a49849036d5 |
files | src/Make_cyg_ming.mak src/Make_mvc.mak src/libvterm/Makefile.msc src/version.c |
diffstat | 4 files changed, 137 insertions(+), 88 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -561,6 +561,12 @@ endif ifeq ($(TERMINAL),yes) DEFINES += -DFEAT_TERMINAL +TERM_DEPS = \ + libvterm/include/vterm.h \ + libvterm/include/vterm_keycodes.h \ + libvterm/src/rect.h \ + libvterm/src/utf8.h \ + libvterm/src/vterm_internal.h endif # DirectWrite (DirectX) @@ -750,8 +756,16 @@ endif endif ifeq ($(TERMINAL),yes) -OBJ += $(OUTDIR)/terminal.o -VTERM_LIB = libvterm/.libs/libvterm.a +OBJ += $(OUTDIR)/terminal.o \ + $(OUTDIR)/term_encoding.o \ + $(OUTDIR)/term_keyboard.o \ + $(OUTDIR)/term_mouse.o \ + $(OUTDIR)/term_parser.o \ + $(OUTDIR)/term_pen.o \ + $(OUTDIR)/term_screen.o \ + $(OUTDIR)/term_state.o \ + $(OUTDIR)/term_unicode.o \ + $(OUTDIR)/term_vterm.o endif @@ -851,7 +865,7 @@ uninstal.exe: uninstal.c $(CC) $(CFLAGS) -o uninstal.exe uninstal.c $(LIB) $(TARGET): $(OUTDIR) $(OBJ) - $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) $(VTERM_LIB) + $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) upx: exes upx gvim.exe @@ -867,9 +881,6 @@ xxd/xxd.exe: xxd/xxd.c GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h $(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS) -libvterm/.libs/libvterm.a : - cd libvterm && $(MAKE) libvterm.la - clean: -$(DEL) $(OUTDIR)$(DIRSLASH)*.o -$(DEL) $(OUTDIR)$(DIRSLASH)*.res @@ -907,34 +918,43 @@ CUI_INCL = iscygpty.h $(OUTDIR): $(MKDIR) $(OUTDIR) +$(OUTDIR)/channel.o: channel.c $(INCL) + $(CC) -c $(CFLAGS) channel.c -o $(OUTDIR)/channel.o + $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h $(CC) -c $(CFLAGS) ex_docmd.c -o $(OUTDIR)/ex_docmd.o $(OUTDIR)/ex_eval.o: ex_eval.c $(INCL) ex_cmds.h $(CC) -c $(CFLAGS) ex_eval.c -o $(OUTDIR)/ex_eval.o +$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h + $(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o + $(OUTDIR)/gui_w32.o: gui_w32.c $(INCL) $(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o -$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h - $(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o - $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o +$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP) + $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o + +mzscheme_base.c: + $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base + # Remove -D__IID_DEFINED__ for newer versions of the w32api $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) $(CC) $(CFLAGS) $(CXXFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp +if_perl.c: if_perl.xs typemap + $(XSUBPP) -prototypes -typemap \ + $(PERLTYPEMAP) if_perl.xs -output $@ + $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL) ifeq (16, $(RUBY)) $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c endif -if_perl.c: if_perl.xs typemap - $(XSUBPP) -prototypes -typemap \ - $(PERLTYPEMAP) if_perl.xs > $@ - $(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL) $(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL @@ -944,17 +964,41 @@ if_perl.c: if_perl.xs typemap $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_INCL) $(NBDEBUG_SRC) $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o -$(OUTDIR)/channel.o: channel.c $(INCL) - $(CC) -c $(CFLAGS) channel.c -o $(OUTDIR)/channel.o - $(OUTDIR)/regexp.o: regexp.c regexp_nfa.c $(INCL) $(CC) -c $(CFLAGS) regexp.c -o $(OUTDIR)/regexp.o -$(OUTDIR)/if_mzsch.o: if_mzsch.c $(INCL) if_mzsch.h $(MZ_EXTRA_DEP) - $(CC) -c $(CFLAGS) if_mzsch.c -o $(OUTDIR)/if_mzsch.o +$(OUTDIR)/terminal.o: terminal.c $(INCL) $(TERM_DEPS) + $(CC) -c $(CFLAGS) terminal.c -o $(OUTDIR)/terminal.o + + +CCCTERM = $(CC) -c $(CFLAGS) -Ilibvterm/include -DINLINE="" -DVSNPRINTF=vim_vsnprintf +$(OUTDIR)/term_encoding.o: libvterm/src/encoding.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/encoding.c -o $@ + +$(OUTDIR)/term_keyboard.o: libvterm/src/keyboard.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/keyboard.c -o $@ + +$(OUTDIR)/term_mouse.o: libvterm/src/mouse.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/mouse.c -o $@ -mzscheme_base.c: - $(MZSCHEME)/mzc --c-mods mzscheme_base.c ++lib scheme/base +$(OUTDIR)/term_parser.o: libvterm/src/parser.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/parser.c -o $@ + +$(OUTDIR)/term_pen.o: libvterm/src/pen.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/pen.c -o $@ + +$(OUTDIR)/term_screen.o: libvterm/src/screen.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/screen.c -o $@ + +$(OUTDIR)/term_state.o: libvterm/src/state.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/state.c -o $@ + +$(OUTDIR)/term_unicode.o: libvterm/src/unicode.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/unicode.c -o $@ + +$(OUTDIR)/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS) + $(CCCTERM) libvterm/src/vterm.c -o $@ + pathdef.c: $(INCL) ifneq (sh.exe, $(SHELL))
--- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -354,13 +354,24 @@ CSCOPE_DEFS = -DFEAT_CSCOPE !endif !if "$(TERMINAL)" == "yes" -TERMINAL_OBJ = $(OBJDIR)/terminal.obj -TERMINAL_DEFS = -DFEAT_TERMINAL -!if $(MSVC_MAJOR) <= 11 -TERMINAL_DEFS = $(TERMINAL_DEFS) /I if_perl_msvc -!endif -TERMINAL_SRC = terminal.c -VTERM_LIB = libvterm/vterm.lib +TERM_OBJ = \ + $(OBJDIR)/terminal.obj \ + $(OBJDIR)/term_encoding.obj \ + $(OBJDIR)/term_keyboard.obj \ + $(OBJDIR)/term_mouse.obj \ + $(OBJDIR)/term_parser.obj \ + $(OBJDIR)/term_pen.obj \ + $(OBJDIR)/term_screen.obj \ + $(OBJDIR)/term_state.obj \ + $(OBJDIR)/term_unicode.obj \ + $(OBJDIR)/term_vterm.obj +TERM_DEFS = -DFEAT_TERMINAL +TERM_DEPS = \ + libvterm/include/vterm.h \ + libvterm/include/vterm_keycodes.h \ + libvterm/src/rect.h \ + libvterm/src/utf8.h \ + libvterm/src/vterm_internal.h !endif !ifndef NETBEANS @@ -470,10 +481,9 @@ WINVER = 0x0501 #VIMRUNTIMEDIR = somewhere CFLAGS = -c /W3 /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \ - $(CSCOPE_DEFS) $(TERMINAL_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \ + $(CSCOPE_DEFS) $(TERM_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \ $(NBDEBUG_DEFS) $(XPM_DEFS) \ - $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) \ - /Fo$(OUTDIR)/ + $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) #>>>>> end of choices ########################################################################### @@ -1121,6 +1131,9 @@ LINK_PDB = /PDB:$(VIM).pdb -debug # !message +# CFLAGS with /Fo$(OUTDIR)/ +CFLAGS_OUTDIR=$(CFLAGS) /Fo$(OUTDIR)/ + conflags = /nologo /subsystem:$(SUBSYSTEM) PATHDEF_SRC = $(OUTDIR)\pathdef.c @@ -1136,7 +1149,7 @@ conflags = $(conflags) /map /mapinfo:lin LINKARGS1 = $(linkdebug) $(conflags) LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \ $(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \ - $(TCL_LIB) $(NETBEANS_LIB) $(VTERM_LIB) $(XPM_LIB) $(LINK_PDB) + $(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB) # Report link time code generation progress if used. !ifdef NODEBUG @@ -1157,12 +1170,12 @@ all: $(VIM).exe \ $(VIM).exe: $(OUTDIR) $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) $(OLE_IDL) $(MZSCHEME_OBJ) \ $(LUA_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) $(TCL_OBJ) \ - $(CSCOPE_OBJ) $(TERMINAL_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) $(VTERM_LIB) \ + $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) $(XPM_OBJ) \ version.c version.h - $(CC) $(CFLAGS) version.c + $(CC) $(CFLAGS_OUTDIR) version.c $(link) $(LINKARGS1) -out:$(VIM).exe $(OBJ) $(GUI_OBJ) $(CUI_OBJ) $(OLE_OBJ) \ $(LUA_OBJ) $(MZSCHEME_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(PYTHON3_OBJ) $(RUBY_OBJ) \ - $(TCL_OBJ) $(CSCOPE_OBJ) $(TERMINAL_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \ + $(TCL_OBJ) $(CSCOPE_OBJ) $(TERM_OBJ) $(NETBEANS_OBJ) $(CHANNEL_OBJ) \ $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2) if exist $(VIM).exe.manifest mt.exe -nologo -manifest $(VIM).exe.manifest -updateresource:$(VIM).exe;1 @@ -1256,7 +1269,7 @@ testclean: !ELSE .c{$(OUTDIR)/}.obj:: !ENDIF - $(CC) $(CFLAGS) $< + $(CC) $(CFLAGS_OUTDIR) $< # Create a default rule for transforming .cpp files to .obj files in $(OUTDIR) # Batch compilation is supported by nmake 1.62 (part of VS 5.0) and later) @@ -1265,7 +1278,7 @@ testclean: !ELSE .cpp{$(OUTDIR)/}.obj:: !ENDIF - $(CC) $(CFLAGS) $< + $(CC) $(CFLAGS_OUTDIR) $< $(OUTDIR)/arabic.obj: $(OUTDIR) arabic.c $(INCL) @@ -1324,41 +1337,41 @@ testclean: $(OUTDIR)/if_cscope.obj: $(OUTDIR) if_cscope.c $(INCL) $(OUTDIR)/if_lua.obj: $(OUTDIR) if_lua.c $(INCL) - $(CC) $(CFLAGS) $(LUA_INC) if_lua.c + $(CC) $(CFLAGS_OUTDIR) $(LUA_INC) if_lua.c if_perl.c : if_perl.xs typemap $(XSUBPP) -prototypes -typemap $(XSUBPP_TYPEMAP) \ -typemap typemap if_perl.xs > if_perl.c $(OUTDIR)/if_perl.obj: $(OUTDIR) if_perl.c $(INCL) - $(CC) $(CFLAGS) $(PERL_INC) if_perl.c + $(CC) $(CFLAGS_OUTDIR) $(PERL_INC) if_perl.c $(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL) - $(CC) $(CFLAGS) $(PERL_INC) if_perlsfio.c + $(CC) $(CFLAGS_OUTDIR) $(PERL_INC) if_perlsfio.c $(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c if_mzsch.h $(INCL) $(MZSCHEME_EXTRA_DEP) - $(CC) $(CFLAGS) if_mzsch.c \ + $(CC) $(CFLAGS_OUTDIR) if_mzsch.c \ -DMZSCHEME_COLLECTS="\"$(MZSCHEME_COLLECTS:\=\\)\"" lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).lib: lib /DEF:"$(MZSCHEME)\lib\lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).def" $(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c if_py_both.h $(INCL) - $(CC) $(CFLAGS) $(PYTHON_INC) if_python.c + $(CC) $(CFLAGS_OUTDIR) $(PYTHON_INC) if_python.c $(OUTDIR)/if_python3.obj: $(OUTDIR) if_python3.c if_py_both.h $(INCL) - $(CC) $(CFLAGS) $(PYTHON3_INC) if_python3.c + $(CC) $(CFLAGS_OUTDIR) $(PYTHON3_INC) if_python3.c $(OUTDIR)/if_ole.obj: $(OUTDIR) if_ole.cpp $(INCL) if_ole.h $(OUTDIR)/if_ruby.obj: $(OUTDIR) if_ruby.c $(INCL) - $(CC) $(CFLAGS) $(RUBY_INC) if_ruby.c + $(CC) $(CFLAGS_OUTDIR) $(RUBY_INC) if_ruby.c $(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL) - $(CC) $(CFLAGS) $(TCL_INC) if_tcl.c + $(CC) $(CFLAGS_OUTDIR) $(TCL_INC) if_tcl.c $(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL) - $(CC) $(CFLAGS) iscygpty.c -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL + $(CC) $(CFLAGS_OUTDIR) iscygpty.c -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL $(OUTDIR)/json.obj: $(OUTDIR) json.c $(INCL) @@ -1396,7 +1409,7 @@ lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).l $(OUTDIR)/os_mswin.obj: $(OUTDIR) os_mswin.c $(INCL) -$(OUTDIR)/terminal.obj: $(OUTDIR) terminal.c $(INCL) +$(OUTDIR)/terminal.obj: $(OUTDIR) terminal.c $(INCL) $(TERM_DEPS) $(OUTDIR)/winclip.obj: $(OUTDIR) winclip.c $(INCL) @@ -1405,7 +1418,7 @@ lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).l $(OUTDIR)/os_w32exe.obj: $(OUTDIR) os_w32exe.c $(INCL) $(OUTDIR)/pathdef.obj: $(OUTDIR) $(PATHDEF_SRC) $(INCL) - $(CC) $(CFLAGS) $(PATHDEF_SRC) + $(CC) $(CFLAGS_OUTDIR) $(PATHDEF_SRC) $(OUTDIR)/popupmnu.obj: $(OUTDIR) popupmnu.c $(INCL) @@ -1438,7 +1451,7 @@ lib$(MZSCHEME_MAIN_LIB)$(MZSCHEME_VER).l $(OUTDIR)/window.obj: $(OUTDIR) window.c $(INCL) $(OUTDIR)/xpm_w32.obj: $(OUTDIR) xpm_w32.c - $(CC) $(CFLAGS) $(XPM_INC) xpm_w32.c + $(CC) $(CFLAGS_OUTDIR) $(XPM_INC) xpm_w32.c $(OUTDIR)/vim.res: $(OUTDIR) vim.rc gvim.exe.mnf version.h tools.bmp \ tearoff.bmp vim.ico vim_error.ico \ @@ -1456,6 +1469,36 @@ dimm.h dimm_i.c: dimm.idl $(OUTDIR)/glbl_ime.obj: $(OUTDIR) glbl_ime.cpp dimm.h $(INCL) + +CCCTERM = $(CC) $(CFLAGS) -Ilibvterm/include -DINLINE="" -DVSNPRINTF=vim_vsnprintf +$(OUTDIR)/term_encoding.obj: $(OUTDIR) libvterm/src/encoding.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/encoding.c + +$(OUTDIR)/term_keyboard.obj: $(OUTDIR) libvterm/src/keyboard.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/keyboard.c + +$(OUTDIR)/term_mouse.obj: $(OUTDIR) libvterm/src/mouse.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/mouse.c + +$(OUTDIR)/term_parser.obj: $(OUTDIR) libvterm/src/parser.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/parser.c + +$(OUTDIR)/term_pen.obj: $(OUTDIR) libvterm/src/pen.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/pen.c + +$(OUTDIR)/term_screen.obj: $(OUTDIR) libvterm/src/screen.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/screen.c + +$(OUTDIR)/term_state.obj: $(OUTDIR) libvterm/src/state.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/state.c + +$(OUTDIR)/term_unicode.obj: $(OUTDIR) libvterm/src/unicode.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/unicode.c + +$(OUTDIR)/term_vterm.obj: $(OUTDIR) libvterm/src/vterm.c $(TERM_DEPS) + $(CCCTERM) -Fo$@ libvterm/src/vterm.c + + # $CFLAGS may contain backslashes and double quotes, escape them both. E0_CFLAGS = $(CFLAGS:\=\\) E_CFLAGS = $(E0_CFLAGS:"=\") @@ -1550,9 +1593,4 @@ proto.h: \ .c.i: $(CC) $(CFLAGS) /P /C $< -libvterm/vterm.lib : - cd libvterm - $(MAKE) /NOLOGO -f Makefile.msc "MSVC_MAJOR=$(MSVC_MAJOR)" - cd .. - # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:
deleted file mode 100644 --- a/src/libvterm/Makefile.msc +++ /dev/null @@ -1,35 +0,0 @@ -CFLAGS = /DINLINE= /Iinclude - -OBJS = \ - src\encoding.c \ - src\keyboard.c \ - src\mouse.c \ - src\parser.c \ - src\pen.c \ - src\screen.c \ - src\state.c \ - src\unicode.c \ - src\vterm.c - -OBJS = \ - src\encoding.obj \ - src\keyboard.obj \ - src\mouse.obj \ - src\parser.obj \ - src\pen.obj \ - src\screen.obj \ - src\state.obj \ - src\unicode.obj \ - src\vterm.obj - -all : vterm.lib - - -.c.obj : - cl $(CFLAGS) /Fo$@ /c $< - -vterm.lib : $(OBJS) - lib /OUT:$@ $(OBJS) - -clean: - del $(OBJS) vterm.lib