# $OpenBSD: Makefile,v 1.7 1998/07/24 00:10:48 millert Exp $ # from: @(#)Makefile 8.1 (Berkeley) 6/4/93 # # Copyright (c) 2000 Peter 'Luna' Runestig # All rights reserved. # # Redistribution and use in source and binary forms, with or without modifi- # cation, are permitted provided that the following conditions are met: # # o Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # o Redistributions in binary form must reproduce the above copyright no- # tice, this list of conditions and the following disclaimer in the do- # cumentation and/or other materials provided with the distribution. # # o The names of the contributors may not be used to endorse or promote # products derived from this software without specific prior written # permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LI- # ABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUEN- # TIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEV- # ER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABI- # LITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. LIB= libedit.a SHELL= /bin/sh prefix = exec_prefix = ${prefix} bindir = ${exec_prefix}/bin includedir = ${prefix}/include libdir = ${exec_prefix}/lib sbindir = ${exec_prefix}/sbin libexecdir = ${exec_prefix}/libexec sysconfdir = ${prefix}/etc localstatedir = ${prefix}/var sharedstatedir = ${prefix}/com mandir = ${prefix}/man man1dir = ${mandir}/man1 man5dir = ${mandir}/man5 man8dir = ${mandir}/man8 INSTALL = /usr/bin/install -c -o root -g wheel INSTALL_DATA = install -o root -g wheel -m 444 INSTALL_PROGRAM = install -s -o root -g wheel -m 555 AR = ar RANLIB = ranlib CC = cc CWARNINGFLAGS = DEFS = -DHAVE_CONFIG_H LIBS = -lssl -lcrypto -ledit -lcurses LDFLAGS = -rpath=/usr/lib:/usr/local/lib RM = rm CFLAGS= -fno-common ${CWARNINGFLAGS} CPPFLAGS= ${DEFS} -I.. SRCS= chared.c common.c el.c emacs.c fcns.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 \ tokenizer.c history.c MAN= editline.3 editrc.5 MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \ editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \ editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_source.3 \ editline.3 el_resize.3 editline.3 el_line.3 \ editline.3 el_insertstr.3 editline.3 el_deletestr.3 \ editline.3 history_init.3 editline.3 history_end.3 editline.3 history.3 OBJS= $(SRCS:.c=.o) CLEANFILES= common.h emacs.h fcns.h help.h vi.h help.c fcns.c editline.c #CPPFLAGS+=-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH #CPPFLAGS+=-DDEBUG_PASTE #CPPFLAGS+= -Wall -Wconversion -Wstrict-prototypes -Wmissing-prototypes AHDR= vi.h emacs.h common.h ASRC= vi.c emacs.c common.c all: vi.h emacs.h common.h fcns.h help.h help.c $(LIB) .c.o: $(CC) -c $(CFLAGS) $(CPPFLAGS) $(CFADD) -o $@ $< vi.h: vi.c makelist sh makelist -h vi.c > $@ emacs.h: emacs.c makelist sh makelist -h emacs.c > $@ common.h: common.c makelist sh makelist -h common.c > $@ fcns.h: ${AHDR} makelist sh makelist -fh ${AHDR} > $@ fcns.c: ${AHDR} fcns.h makelist sh makelist -fc ${AHDR} > $@ help.c: ${ASRC} makelist sh makelist -bc ${ASRC} > $@ help.h: ${ASRC} makelist sh makelist -bh ${ASRC} > $@ $(LIB): $(OBJS) $(AR) rc $@ $? $(RANLIB) $@ clean: $(RM) -f a.out [Ee]rrs mklog core *.core test test.o \ ${LIB} ${OBJS} ${LOBJS} ${CLEANFILES} distclean: clean $(RM) -f Makefile test: libedit.a test.o ${CC} ${CFLAGS} $^ -o $@ libedit.a ${LDADD} -lcurses