Line 0
Link Here
|
|
|
1 |
# @(#)Makefile 8.1 (Berkeley) 6/4/93 |
2 |
# $FreeBSD: src/lib/libedit/Makefile,v 1.18 1999/10/03 10:41:40 marcel Exp $ |
3 |
|
4 |
LIB= edit |
5 |
SHLIB_MAJOR= 3 |
6 |
SHLIB_MINOR= 0 |
7 |
|
8 |
CONTRIBPATH= ${.CURDIR}/../../contrib |
9 |
LIBPATH= ${CONTRIBPATH}/lib${LIB} |
10 |
|
11 |
OPT_CFLAGS= -Wall -O2 -Wno-unused -Wno-uninitialized |
12 |
|
13 |
OSRCS= ${LIBPATH}/chared.c ${LIBPATH}/common.c ${LIBPATH}/el.c \ |
14 |
${LIBPATH}/emacs.c ${.CURDIR}/fcns.c ${.CURDIR}/help.c \ |
15 |
${LIBPATH}/hist.c ${LIBPATH}/key.c ${LIBPATH}/map.c \ |
16 |
${LIBPATH}/parse.c ${LIBPATH}/prompt.c ${LIBPATH}/read.c \ |
17 |
${LIBPATH}/refresh.c ${LIBPATH}/search.c ${LIBPATH}/sig.c \ |
18 |
${LIBPATH}/term.c ${LIBPATH}/tty.c ${LIBPATH}/vi.c |
19 |
|
20 |
DPADD= ${LIBTERMCAP} |
21 |
#LDADD= ../libbsdlibc.a -ltermcap |
22 |
|
23 |
# For speed and debugging |
24 |
#SRCS= ${OSRCS} tokenizer.c history.c |
25 |
# For protection |
26 |
SRCS_O= editline.o tokenizer.o history.o |
27 |
SRCS_H= common.h emacs.h fcns.h help.h vi.h |
28 |
SRCS= ${SRCS_O} ${SRCS_H} |
29 |
|
30 |
CLEANFILES+=common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h |
31 |
CFLAGS+= ${OPT_CFLAGS} -I. -I${.CURDIR} -I${LIBPATH} -I../../port |
32 |
CFLAGS+= -DLINUX |
33 |
#CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH |
34 |
#CFLAGS+=#-DDEBUG_PASTE |
35 |
|
36 |
AHDR=vi.h emacs.h common.h |
37 |
ASRC=${LIBPATH}/vi.c ${LIBPATH}/emacs.c ${LIBPATH}/common.c |
38 |
|
39 |
all: ${AHDR} fcns.c help.h help.c editline.c ${SRCS} libedit.a |
40 |
|
41 |
vi.h: ${LIBPATH}/vi.c ${LIBPATH}/makelist |
42 |
sh ${LIBPATH}/makelist -h ${LIBPATH}/vi.c > ${.CURDIR}/vi.h |
43 |
|
44 |
emacs.h: ${LIBPATH}/emacs.c ${LIBPATH}/makelist |
45 |
sh ${LIBPATH}/makelist -h ${LIBPATH}/emacs.c > ${.CURDIR}/emacs.h |
46 |
|
47 |
common.h: ${LIBPATH}/common.c ${LIBPATH}/makelist |
48 |
sh ${LIBPATH}/makelist -h ${LIBPATH}/common.c > ${.CURDIR}/common.h |
49 |
|
50 |
fcns.h: ${AHDR} ${LIBPATH}/makelist |
51 |
sh ${LIBPATH}/makelist -fh ${AHDR} > ${.CURDIR}/fcns.h |
52 |
|
53 |
fcns.c: ${AHDR} fcns.h ${LIBPATH}/makelist |
54 |
sh ${LIBPATH}/makelist -fc ${AHDR} > ${.CURDIR}/fcns.c |
55 |
|
56 |
help.c: ${ASRC} ${LIBPATH}/makelist |
57 |
sh ${LIBPATH}/makelist -bc ${ASRC} > ${.CURDIR}/help.c |
58 |
|
59 |
help.h: ${ASRC} ${LIBPATH}/makelist |
60 |
sh ${LIBPATH}/makelist -bh ${ASRC} > ${.CURDIR}/help.h |
61 |
|
62 |
editline.c: |
63 |
sh ${LIBPATH}/makelist -e ${OSRCS} > ${.CURDIR}/editline.c |
64 |
|
65 |
tokenizer.o: ${LIBPATH}/tokenizer.c |
66 |
${CC} -c ${CFLAGS} ${LDADD} ${LIBPATH}/tokenizer.c |
67 |
|
68 |
history.o: ${LIBPATH}/history.c |
69 |
${CC} -c ${CFLAGS} ${LDADD} ${LIBPATH}/history.c |
70 |
|
71 |
#beforedepend editline.o editline.po editline.So: \ |
72 |
# vi.h emacs.h common.h fcns.h fcns.c help.h help.c |
73 |
# |
74 |
#test: test.o libedit.a ${DPADD} ${LIBTERMCAP} |
75 |
# ${CC} ${CFLAGS} ${ALLSRC} -o ${TARGET} libedit.a ${LDADD} |
76 |
|
77 |
#.include <bsd.lib.mk> |
78 |
|
79 |
#LIB= bsd |
80 |
#CFLAGS= -DLIBC_SCCS -I../../include |
81 |
#OBJS= getenv.o herror.o setenv.o strerror.o getpass.o inet_addr.o |
82 |
|
83 |
lib${LIB}.a: ${SRCS} |
84 |
@echo [building standard ${LIB} library] |
85 |
rm -f lib${LIB}.a |
86 |
if [ -f /usr/bin/lorder ]; then \ |
87 |
ar cq lib${LIB}.a `lorder ${SRCS_O} | tsort` ; \ |
88 |
else \ |
89 |
ar cq lib${LIB}.a ${SRCS_O}; \ |
90 |
fi; |
91 |
if [ -f /usr/bin/ranlib ]; then \ |
92 |
ranlib lib${LIB}.a; \ |
93 |
fi; |
94 |
cp lib${LIB}.a ../ |
95 |
|
96 |
clean: |
97 |
rm -f *.o lib${LIB}.a ../lib${LIB}.a ${CLEANFILES} |