old-cross-binutils/readline/Makefile.in

167 lines
4.2 KiB
Makefile
Raw Normal View History

1991-03-28 16:26:26 +00:00
# #
# Makefile for readline and history libraries. #
# #
1991-03-28 16:26:26 +00:00
1991-05-22 01:30:56 +00:00
srcdir = .
ddestdir = /usr/local
idestdir = /usr/local
1991-06-12 21:33:26 +00:00
INSTALL_PROG = install -c
INSTALL_FILE = $(INSTALL_PROG)
1991-05-22 01:30:56 +00:00
#### host and target dependent Makefile fragments come in here.
##
1991-03-28 16:26:26 +00:00
# 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) $(READLINE_DEFINES) $<
# Destination installation directory. The libraries are copied to DESTDIR
# when you do a `make install', and the header files to INCDIR/readline/*.h.
DESTDIR = $(ddestdir)/lib
INCDIR = $(ddestdir)/include
1991-03-28 16:26:26 +00:00
# Define TYPES as -DVOID_SIGHANDLER if your operating system uses
# a return type of "void" for signal handlers.
TYPES = -DVOID_SIGHANDLER
# HP-UX compilation requires the BSD library.
#LOCAL_LIBS = -lBSD
# Xenix compilation requires -ldir -lx
#LOCAL_LIBS = -ldir -lx
# 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
MINUS_G=-g
DEBUG_FLAGS = $(MINUS_G)
1991-03-28 16:26:26 +00:00
LDFLAGS = $(DEBUG_FLAGS)
CFLAGS = $(DEBUG_FLAGS) $(SYSV) -I.
# A good alternative is gcc -traditional.
#CC = gcc -traditional
CC = cc
1991-05-22 01:30:56 +00:00
RANLIB = /bin/ranlib
1991-03-28 16:26:26 +00:00
AR = ar
1991-05-22 01:30:56 +00:00
AR_FLAGS = clq
1991-03-28 16:26:26 +00:00
RM = rm
CP = cp
1991-05-22 01:30:56 +00:00
LOCAL_INCLUDES = -I$(srcdir)/../
1991-03-28 16:26:26 +00:00
CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
emacs_keymap.c vi_keymap.c
HSOURCES = readline.h chardefs.h history.h keymaps.h
SOURCES = $(CSOURCES) $(HSOURCES)
1991-11-14 00:36:22 +00:00
DOCUMENTATION = readline.texi inc-read.texi \
history.texi inc-hist.texi
1991-03-28 16:26:26 +00:00
SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
##########################################################################
1991-06-12 20:09:59 +00:00
STAGESTUFF = *.o
1991-05-22 01:30:56 +00:00
all: libreadline.a
all-info: history.info readline.info
1991-11-14 00:36:22 +00:00
history.info: history.texi
- $(MAKEINFO) -o history.info $(srcdir)/history.texi
readline.info: readline.texi
- $(MAKEINFO) -o readline.info $(srcdir)/readline.texi
1991-03-28 16:26:26 +00:00
libreadline.a: readline.o history.o funmap.o keymaps.o
$(RM) -f libreadline.a
1991-05-22 01:30:56 +00:00
$(AR) $(AR_FLAGS) libreadline.a readline.o history.o funmap.o keymaps.o
$(RANLIB) libreadline.a
1991-03-28 16:26:26 +00:00
readline.o: readline.h chardefs.h keymaps.h history.h readline.c vi_mode.c
history.o: history.c history.h
funmap.o: readline.h
keymaps.o: emacs_keymap.c vi_keymap.c keymaps.h chardefs.h keymaps.c
libtest: libreadline.a libtest.c
$(CC) -o libtest $(CFLAGS) $(CPPFLAGS) -L. libtest.c -lreadline -ltermcap
readline: readline.c history.o keymaps.o funmap.o readline.h chardefs.h
$(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
$(LOCAL_INCLUDES) -DTEST -o readline readline.c funmap.o \
keymaps.o history.o -L. -ltermcap
readline.tar: $(THINGS_TO_TAR)
tar -cf readline.tar $(THINGS_TO_TAR)
readline.tar.Z: readline.tar
compress -f readline.tar
1991-11-14 00:36:22 +00:00
install: includes
$(INSTALL_PROG) libreadline.a $(DESTDIR)/libreadline.an
-mv $(DESTDIR)/libreadline.an $(DESTDIR)/libreadline.a
1991-11-14 00:36:22 +00:00
$(RANLIB) $(DESTDIR)/libreadline.a
install-info: all-info
1991-11-14 00:36:22 +00:00
for i in *.info* ; do \
echo Installing $$i... ; \
cp $$i $(idestdir)/info/$$i ; \
1991-11-14 00:36:22 +00:00
done
1991-03-28 16:26:26 +00:00
includes:
if [ ! -r $(INCDIR)/readline ]; then\
mkdir $(INCDIR)/readline;\
chmod a+r $(INCDIR)/readline;\
fi
$(INSTALL_FILE) $(srcdir)/readline.h $(INCDIR)/readline/
$(INSTALL_FILE) $(srcdir)/keymaps.h $(INCDIR)/readline/
$(INSTALL_FILE) $(srcdir)/chardefs.h $(INCDIR)/readline/
1991-03-28 16:26:26 +00:00
clean:
1991-11-14 00:36:22 +00:00
rm -f $(STAGESTUFF) *.a *.log *.cp *.tp *.vr *.fn
rm -f *.aux *.pg *.toc *.info*
1991-03-28 16:26:26 +00:00
$(DESTDIR)/libreadline.a: libreadline.a
1991-05-22 01:30:56 +00:00
# Copy the object files from a particular stage into a subdirectory.
stage1: force
-mkdir stage1
-mv $(STAGESTUFF) stage1
stage2: force
-mkdir stage2
-mv $(STAGESTUFF) stage2
stage3: force
-mkdir stage3
-mv $(STAGESTUFF) stage3
1991-06-09 20:22:11 +00:00
against=stage2
comparison: force
for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
1991-05-22 01:30:56 +00:00
de-stage1: force
- (cd stage1 ; mv -f * ..)
- rmdir stage1
de-stage2: force
- (cd stage2 ; mv -f * ..)
- rmdir stage2
de-stage3: force
- (cd stage3 ; mv -f * ..)
- rmdir stage3
force:
# with the gnu make, this is done automatically.
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
$(SHELL) ./config.status