home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / AP / TERMNET / READLINE.0 / MAKEFILE < prev    next >
Encoding:
Text File  |  1995-04-20  |  5.9 KB  |  206 lines

  1. # Generated automatically from Makefile.in by configure.
  2. # Master Makefile for the GNU readline library.
  3. # Copyright (C) 1994 Free Software Foundation, Inc.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. srcdir = .
  20.  
  21. prefix = /usr
  22. exec_prefix = $(prefix)
  23. bindir = $(exec_prefix)/bin
  24. libdir = $(exec_prefix)/lib
  25. mandir = $(prefix)/man/man1
  26.  
  27. SHELL = /bin/sh
  28.  
  29. INSTALL = /usr/bin/install -c
  30. INSTALL_PROGRAM = ${INSTALL}
  31. INSTALL_DATA = ${INSTALL} -m 644
  32.  
  33. RANLIB = ranlib
  34. AR = ar
  35. RM = rm
  36. CP = cp
  37. MV = mv
  38.  
  39. DEFS = -DHAVE_CONFIG_H
  40. CFLAGS = -O
  41. LDFLAGS = -s
  42.  
  43. # For libraries which include headers from other libraries.
  44. INCLUDES = -I. -I$(srcdir)
  45.  
  46. CPPFLAGS = $(DEFS) $(INCLUDES)
  47.  
  48. PICFLAG=        -pic    # -fpic for some versions of gcc
  49. SHLIB_OPTS=    -assert pure-text -ldl    # -Bshareable for some versions of gcc
  50. MAJOR=        2
  51. MINOR=        .0
  52.  
  53. .SUFFIXES:    .so
  54. .c.o:
  55.     $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
  56.  
  57. .c.so:
  58.     -mv $*.o z$*.o
  59.     $(CC) -c $(PICFLAG) $(CPPFLAGS) $(CFLAGS) $< 
  60.     mv $*.o $@
  61.     -mv z$*.o $*.o
  62.  
  63. # The name of the main library target.
  64. LIBRARY_NAME = libreadline.a
  65. SHARED_READLINE = libreadline.so.$(MAJOR)$(MINOR)
  66. SHARED_HISTORY = libhistory.so.$(MAJOR)$(MINOR)
  67. SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY)
  68.  
  69. # The C code source files for this library.
  70. CSOURCES = $(srcdir)readline.c $(srcdir)funmap.c $(srcdir)keymaps.c \
  71.        $(srcdir)vi_mode.c $(srcdir)parens.c $(srcdir)rltty.c \
  72.        $(srcdir)complete.c $(srcdir)bind.c $(srcdir)isearch.c \
  73.        $(srcdir)display.c $(srcdir)signals.c $(srcdir)emacs_keymap.c \
  74.        $(srcdir)vi_keymap.c $(srcdir)history.c $(srcdir)tilde.c \
  75.        $(srcdir)xmalloc.c
  76.  
  77. # The header files for this library.
  78. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h \
  79.        posixstat.h tilde.h rlconf.h
  80.  
  81. INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h
  82.  
  83. OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
  84.       rltty.o complete.o bind.o isearch.o display.o signals.o \
  85.       history.o tilde.o xmalloc.o
  86.  
  87. SHARED_OBJ = readline.so vi_mode.so funmap.so keymaps.so parens.so search.so \
  88.       rltty.so complete.so bind.so isearch.so display.so signals.so \
  89.       history.so tilde.so xmalloc.so
  90.  
  91. # The texinfo files which document this library.
  92. DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
  93. DOCOBJECT = doc/readline.dvi
  94. DOCSUPPORT = doc/Makefile
  95. DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
  96.  
  97. SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]*
  98.  
  99. SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
  100.  
  101. THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
  102.  
  103. ##########################################################################
  104.  
  105. all: libreadline.a libhistory.a
  106. shared: $(SHARED_LIBS)
  107.  
  108. libreadline.a: $(OBJECTS)
  109.     $(RM) -f $@
  110.     $(AR) cq $@ $(OBJECTS)
  111.     -$(RANLIB) $@
  112.  
  113. libhistory.a: history.o
  114.     $(RM) -f $@
  115.     $(AR) cq $@ history.o
  116.     -$(RANLIB) $@
  117.  
  118. $(SHARED_READLINE):    $(SHARED_OBJ)
  119.     $(RM) -f $@
  120.     ld ${SHLIB_OPTS} -o $@ $(SHARED_OBJ)
  121.  
  122. $(SHARED_HISTORY):    history.so
  123.     $(RM) -f $@
  124.     ld ${SHLIB_OPTS} -o $@ history.so
  125.  
  126. documentation: force
  127.     [ ! -d doc ] && mkdir doc
  128.     (if [ -d doc ]; then cd doc; $(MAKE) $(MFLAGS); fi)
  129.  
  130. force:
  131.  
  132. install: installdirs libreadline.a
  133.     $(INSTALL_DATA) $(INSTALLED_HEADERS) $(incdir)/readline
  134.     -$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old
  135.     $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a
  136.     -$(RANLIB) -t $(libdir)/libreadline.a
  137.  
  138. installdirs:
  139.     [ ! -d $(incdir)/readline ] && { \
  140.       mkdir $(incdir)/readline && chmod 755 $(incdir)/readline; }
  141.     [ ! -d $(libdir) ] && mkdir $(libdir)
  142.  
  143. uninstall:
  144.     [ -n "$(incdir)" ] && cd $(incdir)/readline && \
  145.         ${RM} -f ${INSTALLED_HEADERS}
  146.     [ -n "$(libdir)" ] && cd $(libdir) && \
  147.         ${RM} -f libreadline.a libreadline.old $(SHARED_LIBS)
  148.  
  149. clean::
  150.     rm -f $(OBJECTS) *.a $(SHARED_OBJ) $(SHARED_LIBS)
  151.     (if [ -d doc ]; then cd doc; $(MAKE) $(MFLAGS) $@; fi)
  152.  
  153. readline: readline.h rldefs.h chardefs.h
  154. readline: $(OBJECTS)
  155.     $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  156.       $(LOCAL_INCLUDES) -DTEST -o readline readline.c vi_mode.o funmap.o \
  157.       keymaps.o -ltermcap
  158.  
  159. info:
  160. install-info:
  161. dvi:
  162. check:
  163. installcheck:
  164.  
  165. tags:    force
  166.     etags $(CSOURCES) $(HSOURCES)
  167.  
  168. TAGS:    force
  169.     ctags -x $(CSOURCES) $(HSOURCES) > $@
  170.  
  171. Makefile: config.status $(srcdir)/Makefile.in
  172.     $(SHELL) config.status
  173.  
  174. config.status: configure
  175.     $(SHELL) config.status --recheck
  176.  
  177. configure: configure.in            ## Comment-me-out in distribution
  178.     cd $(srcdir); autoconf     ## Comment-me-out in distribution
  179. config.h.in: configure.in          ## Comment-me-out in distribution
  180.     cd $(srcdir); autoheader   ## Comment-me-out in distribution
  181.  
  182. mostlyclean: clean
  183.  
  184. distclean realclean: clean
  185.     rm -f Makefile config.status config.h stamp-config
  186.  
  187. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  188. # Otherwise a system limit (for SysV at least) may be exceeded.
  189. .NOEXPORT:
  190.  
  191. # Dependencies
  192. readline.o: readline.c readline.h rldefs.h rlconf.h chardefs.h
  193. readline.o: keymaps.h history.h
  194. vi_mode.o:  rldefs.h rlconf.h readline.h history.h
  195. funmap.o:   funmap.c readline.h rlconf.h
  196. keymaps.o:  keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h rlconf.h
  197. history.o: history.h memalloc.h
  198. isearch.o: memalloc.h readline.h history.h
  199. search.o: memalloc.h readline.h history.h
  200. display.o: readline.h history.h rldefs.h rlconf.h
  201. complete.o: readline.h rldefs.h rlconf.h
  202. rltty.o: rldefs.h rlconf.h readline.h
  203. bind.o: rldefs.h rlconf.h readline.h history.h
  204. signals.o: rldefs.h rlconf.h readline.h history.h
  205. parens.o: readline.h
  206.