1997-04-16 04:58:54 +00:00
|
|
|
# @(#)Makefile 8.1 (Berkeley) 6/4/93
|
|
|
|
|
1997-05-03 19:37:53 +00:00
|
|
|
LIB= libedit.a
|
|
|
|
AHDR = vi.h emacs.h common.h
|
|
|
|
ASRC = vi.c emacs.c common.c
|
|
|
|
GENSRCS = $(AHDR) fcns.h fcns.c help.c help.h editline.c
|
|
|
|
SH = /bin/sh
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
OSRCS= chared.c common.c el.c emacs.c hist.c key.c map.c parse.c \
|
|
|
|
prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c \
|
|
|
|
help.c fcns.c help.h
|
|
|
|
|
1997-05-03 19:37:53 +00:00
|
|
|
SYS_ELL_H = sys.h el.h $(AHDR) fcns.h help.h
|
|
|
|
|
|
|
|
GENOBJS = help.o fcns.o
|
|
|
|
OBJS = chared.o common.o el.o emacs.o hist.o key.o map.o parse.o \
|
|
|
|
prompt.o read.o refresh.o search.o sig.o term.o tty.o vi.o \
|
|
|
|
history.o tokenizer.o \
|
|
|
|
$(GENOBJS)
|
|
|
|
|
1997-04-16 04:58:54 +00:00
|
|
|
LDADD+= -ltermcap
|
|
|
|
|
|
|
|
# For speed and debugging
|
|
|
|
#SRCS= ${OSRCS} tokenizer.c history.c
|
|
|
|
# For protection
|
|
|
|
SRCS= editline.c tokenizer.c history.c
|
|
|
|
|
|
|
|
CLEANFILES+=common.h emacs.h fcns.h help.h vi.h help.c fcns.c editline.c
|
1997-05-03 19:37:53 +00:00
|
|
|
DEFINES = -Dlint
|
|
|
|
#CFLAGS += $(DEFINES) -I../../include -I.
|
|
|
|
CFLAGS += $(DEFINES) -I.
|
1997-04-16 04:58:54 +00:00
|
|
|
CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
|
|
|
|
CFLAGS+=#-DDEBUG_PASTE
|
1997-05-03 19:37:53 +00:00
|
|
|
CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror \
|
|
|
|
-Wshadow -Wmissing-declarations -Wnested-externs # -W
|
|
|
|
|
|
|
|
build: $(LIB)
|
|
|
|
|
|
|
|
$(LIB): $(GENSRCS) $(OBJS)
|
|
|
|
$(AR) -rcv $(LIB) $(OBJS)
|
1997-04-16 04:58:54 +00:00
|
|
|
|
1997-05-03 19:37:53 +00:00
|
|
|
clobber:
|
|
|
|
$(RM) -f $(GENSRCS) $(OBJS) $(LIB)
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
vi.h: vi.c makelist
|
1997-05-03 19:37:53 +00:00
|
|
|
$(SH) makelist -h vi.c > $@
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
emacs.h: emacs.c makelist
|
1997-05-03 19:37:53 +00:00
|
|
|
$(SH) makelist -h emacs.c > $@
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
common.h: common.c makelist
|
1997-05-03 19:37:53 +00:00
|
|
|
$(SH) makelist -h common.c > $@
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
fcns.h: ${AHDR} makelist
|
1997-05-03 19:37:53 +00:00
|
|
|
$(SH) makelist -fh ${AHDR} > $@
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
fcns.c: ${AHDR} fcns.h makelist
|
1997-05-03 19:37:53 +00:00
|
|
|
$(SH) makelist -fc ${AHDR} > $@
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
help.c: ${ASRC} makelist
|
1997-05-03 19:37:53 +00:00
|
|
|
$(SH) makelist -bc ${ASRC} > $@
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
help.h: ${ASRC} makelist
|
1997-05-03 19:37:53 +00:00
|
|
|
$(SH) makelist -bh ${ASRC} > $@
|
1997-04-16 04:58:54 +00:00
|
|
|
|
|
|
|
editline.c: ${OSRCS}
|
1997-05-03 19:37:53 +00:00
|
|
|
$(SH) makelist -e ${OSRCS} > $@
|
|
|
|
|
|
|
|
chared.o:: $(SYS_ELL_H)
|
|
|
|
common.o:: $(SYS_ELL_H)
|
|
|
|
el.o:: $(SYS_ELL_H)
|
|
|
|
emacs.o:: $(SYS_ELL_H)
|
|
|
|
hist.o:: $(SYS_ELL_H)
|
|
|
|
key.o:: $(SYS_ELL_H)
|
|
|
|
map.o:: $(SYS_ELL_H)
|
|
|
|
parse.o:: $(SYS_ELL_H) tokenizer.h
|
|
|
|
prompt.o:: $(SYS_ELL_H)
|
|
|
|
read.o:: $(SYS_ELL_H)
|
|
|
|
refresh.o:: $(SYS_ELL_H)
|
|
|
|
search.o:: $(SYS_ELL_H)
|
|
|
|
sig.o:: $(SYS_ELL_H)
|
|
|
|
term.o:: $(SYS_ELL_H)
|
|
|
|
tty.o:: $(SYS_ELL_H) tty.h
|
|
|
|
vi.o:: $(SYS_ELL_H)
|
|
|
|
|
|
|
|
# .depend: vi.h emacs.h common.h fcns.h help.h help.c
|
|
|
|
|
|
|
|
testit: TEST/test.o libedit.a ${DPADD} ${LIBTERMCAP}
|
|
|
|
${CC} ${CFLAGS} TEST/test.o ${DPADD} -o $@ libedit.a ${LDADD} -ltermcap
|
|
|
|
|
|
|
|
# .include <bsd.lib.mk>
|