1 # Makefile for GNU termcap library.
2 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18 #### Start of system configuration section. ####
28 INSTALL_DATA = @INSTALL_DATA@
32 DEFS = @DEFS@ -DTERMCAP_FILE=\"$(termcapfile)\"
37 exec_prefix = @exec_prefix@
39 # Directory in which to install libtermcap.a.
40 libdir = $(exec_prefix)/lib
42 # Directory in which to install termcap.h.
43 includedir = $(prefix)/include
45 # Directory in which to optionally also install termcap.h,
46 # so compilers besides gcc can find it by default.
47 # If it is empty or not defined, termcap.h will only be installed in
49 oldincludedir = /usr/include
51 # Directory in which to install the documentation info files.
52 infodir = $(prefix)/info
54 # File to which `install-data' should install the data file
55 # if --enable-install-termcap was given.
56 termcapfile = @termcapfile@
58 #### End of system configuration section. ####
62 SRCS = termcap.c tparam.c version.c
63 OBJS = termcap.o tparam.o version.o
65 DISTFILES = $(SRCS) $(HDRS) ChangeLog COPYING README INSTALL NEWS \
66 termcap.src termcap.texi termcap.info* \
67 texinfo.tex Makefile.in configure configure.in mkinstalldirs install-sh
69 all: libtermcap.a info
72 $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
74 install: all installdirs @installdata@
75 $(INSTALL_DATA) libtermcap.a $(libdir)/libtermcap.a
76 -$(RANLIB) $(libdir)/libtermcap.a
77 cd $(srcdir); $(INSTALL_DATA) termcap.h $(includedir)/termcap.h
78 -cd $(srcdir); test -z "$(oldincludedir)" || \
79 $(INSTALL_DATA) termcap.h $(oldincludedir)/termcap.h
80 cd $(srcdir); for f in termcap.info*; \
81 do $(INSTALL_DATA) $$f $(infodir)/$$f; done
83 uninstall: @uninstalldata@
84 rm -f $(libdir)/libtermcap.a $(includedir)/termcap.h
85 test -z "$(oldincludedir)" || rm -f $(oldincludedir)/termcap.h
86 rm -f $(infodir)/termcap.info*
88 # These are separate targets to avoid trashing the user's existing
89 # termcap file unexpectedly.
91 $(INSTALL_DATA) ${srcdir}/termcap.src ${termcapfile}
97 $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(libdir) \
98 $(includedir) $(infodir)
100 Makefile: Makefile.in config.status
101 $(SHELL) config.status
102 config.status: configure
103 $(SHELL) config.status --recheck
104 configure: configure.in
105 cd $(srcdir) && autoconf
107 libtermcap.a: $(OBJS)
113 termcap.info: termcap.texi
114 $(MAKEINFO) $(srcdir)/termcap.texi --output=$@
125 rm -f Makefile config.status config.cache config.log
127 maintainer-clean: distclean
128 @echo "This command is intended for maintainers to use;"
129 @echo "rebuilding the deleted files requires makeinfo."
133 echo termcap-`sed -e '/version_string/!d' -e 's/[^0-9]*\([0-9a-z.]*\).*/\1/' -e q version.c` > .fname
136 ln $(DISTFILES) `cat .fname`
137 tar chzf `cat .fname`.tar.gz `cat .fname`
138 rm -rf `cat .fname` .fname