-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
90 lines (71 loc) · 2.42 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# bvim - bvi improved Makefile
#
# This is the Makefile for bvi - binary visual editor. If it has the name
# "Makefile.in" then it is a template for a Makefile; to generate the actual
# Makefile, run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
# Copyright (c) 1996-2003 by Gerhard Buergmann
#
# 1996-01-18 V 1.0.0
# 1999-01-15 V 1.1.0
# 1999-03-03 V 1.1.1
# 1999-10-22 V 1.2.0
# 2000-05-31 V 1.3.0 beta
# 2000-10-01 V 1.3.0 final
# 2003-07-03 V 1.3.2
#
###############################################
srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}
bindir = $(DESTDIR)${exec_prefix}/bin
mandir = $(DESTDIR)${prefix}/share/man
libdir = $(DESTDIR)${exec_prefix}/lib
man1dir = $(mandir)/man1
OBJS = bvim.o blocks.o keys.o commands.o buffers.o set.o re.o io.o edit.o recomp.o bscript.o math.o ui.o plugins.o collaboration.o signature.o search.o
HEADER = data.h bvim.h blocks.h buffers.h set.h bscript.h math.h ui.h keys.h commands.h plugins.h messages.h collaboration.h signature.h search.h
CC = gcc
CFLAGS = -g -O2 -Wall -Iinclude -I./lua/include
DEFS = -DHAVE_CONFIG_H
LDFLAGS=
LIBS = -lm -lncurses -lssl -ldl -L./lua/lib -llua
SHELL = /bin/sh
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
all: blua bvim
blua:
make -C lua lua
bvim: $(OBJS)
$(CC) $(LDFLAGS) -o bvim $(OBJS) $(LIBS)
.c.o:
$(CC) $(CFLAGS) $(DEFS) -c $<
plugins:
make -C plugins plugins
install: all installdirs
@echo "Installing bvi"
@$(INSTALL_DATA) bvim.1 $(man1dir)
@$(INSTALL_PROGRAM) -s bvim $(bindir)
@if [ -f $(bindir)/bview ]; then rm $(bindir)/bview; fi
@if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi
@ln $(bindir)/bvim $(bindir)/bview
@ln $(bindir)/bvim $(bindir)/bvedit
installdirs:
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(libdir) $(man1dir)
uninstall:
@echo "Uninstalling bvi"
@if [ -f $(bindir)/bview ]; then rm $(bindir)/bview; fi
@if [ -f $(bindir)/bvedit ]; then rm $(bindir)/bvedit; fi
@if [ -f $(bindir)/bvim ]; then rm $(bindir)/bvim; fi
@if [ -f $(man1dir)/bvim.1 ]; then rm $(man1dir)/bvim.1; fi
clean:
rm -f core *.o *.c~ *.h~ bvim bvim.exe a.out
deepclean:
make -C lua clean
make -C plugins clean
rm -f core *.o *.c~ *.h~ .*.swp bvim bvim.exe a.out
distclean: deepclean
rm -f Makefile config.cache config.h config.log config.status