Mercurial > vim
comparison src/libvterm/Makefile @ 11621:b8299e742f41 v8.0.0693
patch 8.0.0693: no terminal emulator support
commit https://github.com/vim/vim/commit/e4f25e4a8db2c8a8a71a4ba2a68540b3ab341e42
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 7 11:54:15 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 07 Jul 2017 12:00:04 +0200 |
parents | |
children | 9d05de1ecc6f |
comparison
equal
deleted
inserted
replaced
11620:fb788b3997c1 | 11621:b8299e742f41 |
---|---|
1 ifeq ($(shell uname),Darwin) | |
2 LIBTOOL ?= glibtool | |
3 else | |
4 LIBTOOL ?= libtool | |
5 endif | |
6 | |
7 ifneq ($(VERBOSE),1) | |
8 LIBTOOL +=--quiet | |
9 endif | |
10 | |
11 # override CFLAGS +=-Wall -Iinclude -std=c99 -DINLINE="static inline" -DUSE_INLINE | |
12 override CFLAGS +=-Wall -Iinclude -std=c90 -Wpedantic -DINLINE="" | |
13 | |
14 ifeq ($(shell uname),SunOS) | |
15 override CFLAGS +=-D__EXTENSIONS__ -D_XPG6 -D__XOPEN_OR_POSIX | |
16 endif | |
17 | |
18 ifeq ($(DEBUG),1) | |
19 override CFLAGS +=-ggdb -DDEBUG | |
20 endif | |
21 | |
22 ifeq ($(PROFILE),1) | |
23 override CFLAGS +=-pg | |
24 override LDFLAGS+=-pg | |
25 endif | |
26 | |
27 CFILES=$(sort $(wildcard src/*.c)) | |
28 HFILES=$(sort $(wildcard include/*.h)) | |
29 OBJECTS=$(CFILES:.c=.lo) | |
30 LIBRARY=libvterm.la | |
31 | |
32 BINFILES_SRC=$(sort $(wildcard bin/*.c)) | |
33 BINFILES=$(BINFILES_SRC:.c=) | |
34 | |
35 TBLFILES=$(sort $(wildcard src/encoding/*.tbl)) | |
36 INCFILES=$(TBLFILES:.tbl=.inc) | |
37 | |
38 HFILES_INT=$(sort $(wildcard src/*.h)) $(HFILES) | |
39 | |
40 VERSION_MAJOR=0 | |
41 VERSION_MINOR=0 | |
42 | |
43 VERSION_CURRENT=0 | |
44 VERSION_REVISION=0 | |
45 VERSION_AGE=0 | |
46 | |
47 VERSION=0 | |
48 | |
49 PREFIX=/usr/local | |
50 BINDIR=$(PREFIX)/bin | |
51 LIBDIR=$(PREFIX)/lib | |
52 INCDIR=$(PREFIX)/include | |
53 MANDIR=$(PREFIX)/share/man | |
54 MAN3DIR=$(MANDIR)/man3 | |
55 | |
56 all: $(LIBRARY) $(BINFILES) | |
57 | |
58 $(LIBRARY): $(OBJECTS) | |
59 @echo LINK $@ | |
60 @$(LIBTOOL) --mode=link --tag=CC $(CC) -rpath $(LIBDIR) -version-info $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE) -o $@ $^ $(LDFLAGS) | |
61 | |
62 src/%.lo: src/%.c $(HFILES_INT) | |
63 @echo CC $< | |
64 @$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $< | |
65 | |
66 src/encoding/%.inc: src/encoding/%.tbl | |
67 @echo TBL $< | |
68 @perl -CSD tbl2inc_c.pl $< >$@ | |
69 | |
70 src/encoding.lo: $(INCFILES) | |
71 | |
72 bin/%: bin/%.c $(LIBRARY) | |
73 @echo CC $< | |
74 @$(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $< -lvterm $(LDFLAGS) | |
75 | |
76 t/harness.lo: t/harness.c $(HFILES) | |
77 @echo CC $< | |
78 @$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $< | |
79 | |
80 t/harness: t/harness.lo $(LIBRARY) | |
81 @echo LINK $@ | |
82 @$(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) | |
83 | |
84 .PHONY: test | |
85 test: $(LIBRARY) t/harness | |
86 for T in `ls t/[0-9]*.test`; do echo "** $$T **"; perl t/run-test.pl $$T $(if $(VALGRIND),--valgrind) || exit 1; done | |
87 | |
88 .PHONY: clean | |
89 clean: | |
90 $(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(INCFILES) | |
91 $(LIBTOOL) --mode=clean rm -f t/harness.lo t/harness | |
92 $(LIBTOOL) --mode=clean rm -f $(LIBRARY) $(BINFILES) | |
93 | |
94 .PHONY: install | |
95 install: install-inc install-lib install-bin | |
96 | |
97 install-inc: | |
98 install -d $(DESTDIR)$(INCDIR) | |
99 install -m644 $(HFILES) $(DESTDIR)$(INCDIR) | |
100 install -d $(DESTDIR)$(LIBDIR)/pkgconfig | |
101 sed -e "s,@PREFIX@,$(PREFIX)," -e "s,@LIBDIR@,$(LIBDIR)," -e "s,@VERSION@,$(VERSION)," <vterm.pc.in >$(DESTDIR)$(LIBDIR)/pkgconfig/vterm.pc | |
102 | |
103 install-lib: $(LIBRARY) | |
104 install -d $(DESTDIR)$(LIBDIR) | |
105 $(LIBTOOL) --mode=install install $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) | |
106 $(LIBTOOL) --mode=finish $(DESTDIR)$(LIBDIR) | |
107 | |
108 install-bin: $(BINFILES) | |
109 install -d $(DESTDIR)$(BINDIR) | |
110 $(LIBTOOL) --mode=install install $(BINFILES) $(DESTDIR)$(BINDIR)/ | |
111 | |
112 # DIST CUT | |
113 | |
114 VERSION=$(VERSION_MAJOR).$(VERSION_MINOR) | |
115 | |
116 DISTDIR=libvterm-$(VERSION) | |
117 | |
118 distdir: $(INCFILES) | |
119 mkdir __distdir | |
120 cp LICENSE __distdir | |
121 mkdir __distdir/src | |
122 cp src/*.c src/*.h __distdir/src | |
123 mkdir __distdir/src/encoding | |
124 cp src/encoding/*.inc __distdir/src/encoding | |
125 mkdir __distdir/include | |
126 cp include/*.h __distdir/include | |
127 mkdir __distdir/bin | |
128 cp bin/*.c __distdir/bin | |
129 mkdir __distdir/t | |
130 cp t/*.test t/harness.c t/run-test.pl __distdir/t | |
131 sed "s,@VERSION@,$(VERSION)," <vterm.pc.in >__distdir/vterm.pc.in | |
132 sed "/^# DIST CUT/Q" <Makefile >__distdir/Makefile | |
133 mv __distdir $(DISTDIR) | |
134 | |
135 TARBALL=$(DISTDIR).tar.gz | |
136 | |
137 dist: distdir | |
138 tar -czf $(TARBALL) $(DISTDIR) | |
139 rm -rf $(DISTDIR) | |
140 | |
141 dist+bzr: | |
142 $(MAKE) dist VERSION=$(VERSION)+bzr`bzr revno` | |
143 | |
144 distdir+bzr: | |
145 $(MAKE) distdir VERSION=$(VERSION)+bzr`bzr revno` |