summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-07 11:54:15 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-07 11:54:15 +0200
commite4f25e4a8db2c8a8a71a4ba2a68540b3ab341e42 (patch)
tree5e48e171c0581f9a8240c95d4cde445e8b354ff2 /src/Makefile
parentda5116da4586fc714434411d2cccb066caa3723e (diff)
downloadvim-e4f25e4a8db2c8a8a71a4ba2a68540b3ab341e42.zip
patch 8.0.0693: no terminal emulator support
Problem: No terminal emulator support. Cannot properly run commands in the GUI. Cannot run a job interactively with an ssh connection. Solution: Very early implementation of the :terminal command. Includes libvterm converted to ANSI C. Many parts still missing.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile57
1 files changed, 54 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 2df82eced..907fdb127 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -482,6 +482,11 @@ CClink = $(CC)
# Uncomment this when you do not want inter process communication.
#CONF_OPT_CHANNEL = --disable-channel
+# TERMINAL - Terminal emulator support, :terminal command. Requires the
+# channel feature.
+# Uncomment this when you want terminal emulator support.
+#CONF_OPT_TERMINAL = --enable-terminal
+
# MULTIBYTE - To edit multi-byte characters.
# Uncomment this when you want to edit a multibyte language.
# It's automatically enabled with normal features, GTK or IME support.
@@ -598,6 +603,9 @@ CClink = $(CC)
# Use this with GCC to check for mistakes, unused arguments, etc.
#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
+# Add -Wpedantic to find // comments and other C99 constructs.
+# Better disable Perl and Python to avoid a lot of warnings.
+#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wpedantic -Wunreachable-code -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
#CFLAGS = -g -O2 -Wall -Wextra -Wmissing-prototypes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DU_DEBUG
#PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers
#MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code -Wno-unused-parameter
@@ -1371,6 +1379,13 @@ ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gu
# }}}
+TERM_DEPS = \
+ libvterm/include/vterm.h \
+ libvterm/include/vterm_keycodes.h \
+ libvterm/src/rect.h \
+ libvterm/src/utf8.h \
+ libvterm/src/vterm_internal.h
+
### Command to create dependencies based on #include "..."
### prototype headers are ignored due to -DPROTO, system
### headers #include <...> are ignored if we use the -MM option, as
@@ -1560,6 +1575,7 @@ BASIC_SRC = \
syntax.c \
tag.c \
term.c \
+ terminal.c \
ui.c \
undo.c \
userfunc.c \
@@ -1569,6 +1585,7 @@ BASIC_SRC = \
SRC = $(BASIC_SRC) \
$(GUI_SRC) \
+ $(TERM_SRC) \
$(HANGULIN_SRC) \
$(LUA_SRC) \
$(MZSCHEME_SRC) \
@@ -1610,7 +1627,7 @@ ALL_SRC = $(BASIC_SRC) $(ALL_GUI_SRC) $(UNITTEST_SRC) $(EXTRA_SRC)
LINT_SRC = $(BASIC_SRC) $(GUI_SRC) $(HANGULIN_SRC) \
$(PYTHON_SRC) $(PYTHON3_SRC) $(TCL_SRC) \
$(WORKSHOP_SRC) $(WSDEBUG_SRC) \
- $(NETBEANS_SRC) $(CHANNEL_SRC)
+ $(NETBEANS_SRC) $(CHANNEL_SRC) $(TERM_SRC)
#LINT_SRC = $(SRC)
#LINT_SRC = $(ALL_SRC)
#LINT_SRC = $(BASIC_SRC)
@@ -1665,12 +1682,14 @@ OBJ_COMMON = \
objects/syntax.o \
objects/tag.o \
objects/term.o \
+ objects/terminal.o \
objects/ui.o \
objects/undo.o \
objects/userfunc.o \
objects/version.o \
objects/window.o \
$(GUI_OBJ) \
+ $(TERM_OBJ) \
$(LUA_OBJ) \
$(MZSCHEME_OBJ) \
$(PERL_OBJ) \
@@ -1795,6 +1814,7 @@ PRO_AUTO = \
syntax.pro \
tag.pro \
term.pro \
+ terminal.pro \
termlib.pro \
ui.pro \
undo.pro \
@@ -1848,7 +1868,7 @@ config auto/config.mk: auto/configure config.mk.in config.h.in
$(CONF_OPT_OUTPUT) $(CONF_OPT_GPM) $(CONF_OPT_WORKSHOP) \
$(CONF_OPT_FEAT) $(CONF_TERM_LIB) \
$(CONF_OPT_COMPBY) $(CONF_OPT_ACL) $(CONF_OPT_NETBEANS) \
- $(CONF_OPT_CHANNEL) \
+ $(CONF_OPT_CHANNEL) $(CONF_OPT_TERMINAL) \
$(CONF_ARGS) $(CONF_OPT_MZSCHEME) $(CONF_OPT_PLTHOME) \
$(CONF_OPT_LUA) $(CONF_OPT_LUA_PREFIX) \
$(CONF_OPT_SYSMOUSE); \
@@ -3228,6 +3248,9 @@ objects/tag.o: tag.c
objects/term.o: term.c
$(CCC) -o $@ term.c
+objects/terminal.o: terminal.c $(TERM_DEPS)
+ $(CCC) -o $@ terminal.c
+
objects/ui.o: ui.c
$(CCC) -o $@ ui.c
@@ -3255,6 +3278,34 @@ objects/channel.o: channel.c
Makefile:
@echo The name of the makefile MUST be "Makefile" (with capital M)!!!!
+CCCTERM = $(CCC) -Ilibvterm/include -DINLINE=""
+objects/term_encoding.o: libvterm/src/encoding.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/encoding.c
+
+objects/term_keyboard.o: libvterm/src/keyboard.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/keyboard.c
+
+objects/term_mouse.o: libvterm/src/mouse.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/mouse.c
+
+objects/term_parser.o: libvterm/src/parser.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/parser.c
+
+objects/term_pen.o: libvterm/src/pen.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/pen.c
+
+objects/term_screen.o: libvterm/src/screen.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/screen.c
+
+objects/term_state.o: libvterm/src/state.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/state.c
+
+objects/term_unicode.o: libvterm/src/unicode.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/unicode.c
+
+objects/term_vterm.o: libvterm/src/vterm.c $(TERM_DEPS)
+ $(CCCTERM) -o $@ libvterm/src/vterm.c
+
###############################################################################
### MacOS X installation
###
@@ -3399,7 +3450,7 @@ objects/ex_cmds2.o: ex_cmds2.c vim.h auto/config.h feature.h os_unix.h \
objects/ex_docmd.o: ex_docmd.c vim.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h \
- proto.h globals.h farsi.h arabic.h
+ proto.h globals.h farsi.h arabic.h ex_cmdidxs.h
objects/ex_eval.o: ex_eval.c vim.h auto/config.h feature.h os_unix.h auto/osdef.h \
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
gui_beval.h proto/gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \