1 # Makefile for GNU termcap library.
2 # Copyright (C) 1992, 1993 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., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #### Start of system configuration section. ####
25 # If you don't have a BSD or GNU install program, use cp.
27 INSTALL_DATA = @INSTALL_DATA@
31 # Things you might add to DEFS:
32 # -DHAVE_STRING_H If you have memcpy instead of bcopy.
33 # -DNO_ARG_ARRAY If you can't take the address of the first of
34 # a group of arguments and treat it as an array.
35 # We always define this, because it's not a big loss
36 # and can't be detected when cross-autoconfiguring.
38 DEFS = @DEFS@ -DNO_ARG_ARRAY
43 exec_prefix = $(prefix)
45 # Directory in which to install libtermcap.a.
46 libdir = $(exec_prefix)/lib
48 # Directory in which to install termcap.h.
49 includedir = $(prefix)/include
51 # Directory in which to optionally also install termcap.h,
52 # so compilers besides gcc can find it by default.
53 # If it is empty or not defined, termcap.h will only be installed in
55 oldincludedir = /usr/include
57 # Directory in which to install the documentation info files.
58 infodir = $(prefix)/info
60 #### End of system configuration section. ####
64 SRCS = termcap.c tparam.c version.c
65 OBJS = termcap.o tparam.o version.o
67 DISTFILES = $(SRCS) $(HDRS) ChangeLog COPYING README INSTALL NEWS \
68 termcap.texi termcap.info* \
69 texinfo.tex Makefile.in configure configure.in
71 all: libtermcap.a termcap.info
74 $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
77 $(INSTALL_DATA) libtermcap.a $(libdir)/libtermcap.a
78 -ranlib $(libdir)/libtermcap.a
79 test -d $(includedir) || mkdir $(includedir)
80 cd $(srcdir); $(INSTALL_DATA) termcap.h $(includedir)/termcap.h
81 -cd $(srcdir); test -z "$(oldincludedir)" || \
82 $(INSTALL_DATA) termcap.h $(oldincludedir)/termcap.h
83 cd $(srcdir); for f in termcap.info*; \
84 do $(INSTALL_DATA) $$f $(infodir)/$$f; done
87 rm -f $(libdir)/libtermcap.a $(includedir)/termcap.h
88 test -z "$(oldincludedir)" || rm -f $(oldincludedir)/termcap.h
89 rm -f $(infodir)/termcap.info*
95 termcap.info: termcap.texi
96 $(MAKEINFO) $(srcdir)/termcap.texi --output=$(srcdir)/termcap.info
107 rm -f Makefile config.status
113 echo termcap-`sed -e '/version_string/!d' -e 's/[^0-9]*\([0-9a-z.]*\).*/\1/' -e q version.c` > .fname
116 ln $(DISTFILES) `cat .fname`
117 tar chzf `cat .fname`.tar.z `cat .fname`
118 rm -rf `cat .fname` .fname