## -*- text -*- ####################################################
# #
# Makefile for readline and history libraries. #
# #
####################################################################
# Here is a rule for making .o files from .c files that doesn't force
# the type of the machine (like -sun3) into the flags.
c.o:
$(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
# Destination installation directory. The libraries are copied to DESTDIR
# when you do a `make install', and the header files to INCDIR/readline/*.h.
DESTDIR = /usr/lib
INCDIR = /usr/include
# Define TYPES as -DVOID_SIGHANDLER if your operating system uses
# a return type of "void" for signal handlers.
TYPES = -DVOID_SIGHANDLER
# Define USG as -DUSG if you are using a System V operating system.
USG = -Dhpux
# HP-UX compilation requires the BSD library.
#LOCAL_LIBS = -lBSD
# Comment out "-DVI_MODE" if you don't think that anyone will ever desire
# the vi line editing mode and features.
READLINE_DEFINES = $(TYPES) # -DVI_MODE
# The rule for 'includes' is written funny so that the if statement
# always returns TRUE unless there really was an error installing the
# include files.
includes:
if [ -r $(INCDIR)/readline ]; then \
:; \
else \
mkdir $(INCDIR)/readline && chmod a+r $(INCDIR)/readline; \
fi
$(CP) readline.h keymaps.h chardefs.h $(INCDIR)/readline/
clean:
rm -f *.o *.a
(cd doc; make clean)
$(DESTDIR)/libreadline.a: libreadline.a
-mv $(DESTDIR)/libreadline.a $(DESTDIR)/libreadline.old
cp libreadline.a $(DESTDIR)/libreadline.a
if [ -f $(RANLIB) ]; then $(RANLIB) -t $(DESTDIR)/libreadline.a; fi