blob: 7337f98f442b56b7d76a49c90bb97d51ce7d99a0 (
plain)
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
|
.SUFFIXES:
.SUFFIXES: .o .c
PREFIX = /usr
BINDIR = ${PREFIX}/bin
MANPREFIX = ${PREFIX}/share/man
CPPFLAGS = -D_GNU_SOURCE -DEMACS -DVI -I.
CC = cc
LDFLAGS = -static
SRC = \
alloc.c \
asprintf.c \
c_ksh.c \
c_sh.c \
c_test.c \
c_ulimit.c \
confstr.c \
edit.c \
emacs.c \
eval.c \
exec.c \
expr.c \
history.c \
io.c \
jobs.c \
lex.c \
mail.c \
main.c \
misc.c \
path.c \
reallocarray.c \
shf.c \
siglist.c \
signame.c \
strlcat.c \
strlcpy.c \
strtonum.c \
syn.c \
table.c \
trap.c \
tree.c \
tty.c \
unvis.c \
var.c \
version.c \
vi.c \
vis.c \
LIBS = -lc -lncursesw
OBJ = ${SRC:.c=.o}
BIN = ksh
all: ${BIN}
${BIN}: ${OBJ}
${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
.c.o:
${CC} -c ${CFLAGS} ${CPPFLAGS} -o $@ $<
clean:
rm -f ${OBJ} ksh
install: all
mkdir -p ${DESTDIR}${BINDIR} ${DESTDIR}${MANPREFIX}/man1
cp ksh ${DESTDIR}${BINDIR}
chmod 755 ${DESTDIR}${BINDIR}/ksh
cp sh.1 ${DESTDIR}${MANPREFIX}/man1/ksh.1
chmod 644 ${DESTDIR}${MANPREFIX}/man1/ksh.1
.PHONY: all clean install
|