| 1 | ## -*- text -*- ####################################################
|
|---|
| 2 | # #
|
|---|
| 3 | # Makefile for termcap replacement libbrary. #
|
|---|
| 4 | # #
|
|---|
| 5 | ####################################################################
|
|---|
| 6 |
|
|---|
| 7 | # Copyright (C) 1996-2005 Free Software Foundation, Inc.
|
|---|
| 8 |
|
|---|
| 9 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 10 | # it under the terms of the GNU General Public License as published by
|
|---|
| 11 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 12 | # any later version.
|
|---|
| 13 |
|
|---|
| 14 | # This program is distributed in the hope that it will be useful,
|
|---|
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 17 | # GNU General Public License for more details.
|
|---|
| 18 |
|
|---|
| 19 | # You should have received a copy of the GNU General Public License
|
|---|
| 20 | # along with this program; if not, write to the Free Software
|
|---|
| 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
|---|
| 22 |
|
|---|
| 23 | srcdir = @srcdir@
|
|---|
| 24 | VPATH = .;@srcdir@
|
|---|
| 25 | topdir = @top_srcdir@
|
|---|
| 26 | BUILD_DIR = @BUILD_DIR@
|
|---|
| 27 |
|
|---|
| 28 | libdir = @libdir@
|
|---|
| 29 |
|
|---|
| 30 | INSTALL = @INSTALL@
|
|---|
| 31 | INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|---|
| 32 | INSTALL_DATA = @INSTALL_DATA@
|
|---|
| 33 |
|
|---|
| 34 | CC = @CC@
|
|---|
| 35 | RANLIB = @RANLIB@
|
|---|
| 36 | AR = @AR@
|
|---|
| 37 | ARFLAGS = @ARFLAGS@
|
|---|
| 38 | RM = rm -f
|
|---|
| 39 | CP = cp
|
|---|
| 40 | MV = mv
|
|---|
| 41 |
|
|---|
| 42 | SHELL = @MAKE_SHELL@
|
|---|
| 43 |
|
|---|
| 44 | CFLAGS = @CFLAGS@
|
|---|
| 45 | CPPFLAGS = @CPPFLAGS@
|
|---|
| 46 | LDFLAGS = @LDFLAGS@
|
|---|
| 47 |
|
|---|
| 48 | DEFS = @DEFS@
|
|---|
| 49 |
|
|---|
| 50 | INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(srcdir)
|
|---|
| 51 |
|
|---|
| 52 | CCFLAGS = $(CFLAGS) $(DEFS) $(CPPFLAGS) ${INCLUDES}
|
|---|
| 53 |
|
|---|
| 54 | # Here is a rule for making .o files from .c files that doesn't force
|
|---|
| 55 | # the type of the machine (like -sun3) into the flags.
|
|---|
| 56 | .c.o:
|
|---|
| 57 | $(CC) -c $(CCFLAGS) $<
|
|---|
| 58 |
|
|---|
| 59 | SOURCES = termcap.c tparam.c
|
|---|
| 60 | OBJECTS = termcap.o tparam.o
|
|---|
| 61 |
|
|---|
| 62 | DOCUMENTATION = termcap.texinfo
|
|---|
| 63 |
|
|---|
| 64 | THINGS_TO_TAR = $(SOURCES) $(DOCUMENTATION)
|
|---|
| 65 |
|
|---|
| 66 | ##########################################################################
|
|---|
| 67 |
|
|---|
| 68 | all: libtermcap.a
|
|---|
| 69 |
|
|---|
| 70 | libtermcap.a: $(OBJECTS)
|
|---|
| 71 | $(RM) -f $@
|
|---|
| 72 | $(AR) $(ARFLAGS) $@ $(OBJECTS)
|
|---|
| 73 | -test -n "$(RANLIB)" && $(RANLIB) $@
|
|---|
| 74 |
|
|---|
| 75 | install:
|
|---|
| 76 |
|
|---|
| 77 | clean:
|
|---|
| 78 | $(RM) *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc
|
|---|
| 79 |
|
|---|
| 80 | mostlyclean: clean
|
|---|
| 81 |
|
|---|
| 82 | distclean maintainer-clean: clean
|
|---|
| 83 | $(RM) Makefile
|
|---|
| 84 |
|
|---|
| 85 | $(DESTDIR)$(libdir)/libtermcap.a: libtermcap.a
|
|---|
| 86 | ${INSTALL_DATA} -c -m 644 libtermcap.a $@
|
|---|
| 87 | -test -n "$(RANLIB)" && $(RANLIB) -t $@
|
|---|
| 88 |
|
|---|
| 89 | termcap.o: $(BUILD_DIR)/config.h
|
|---|
| 90 | tparam.o: $(BUILD_DIR)/config.h
|
|---|
| 91 | version.o: $(BUILD_DIR)/config.h
|
|---|