]>
Commit | Line | Data |
---|---|---|
ccc6cda3 JA |
1 | ## -*- text -*- #################################################### |
2 | # # | |
3 | # Makefile for termcap replacement libbrary. # | |
4 | # # | |
5 | #################################################################### | |
6 | ||
012bac39 | 7 | # Copyright (C) 1996-2009 Free Software Foundation, Inc. |
bb70624e | 8 | |
2e4498b3 CR |
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 3 of the License, or | |
12 | # (at your option) any later version. | |
bb70624e | 13 | |
2e4498b3 CR |
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. | |
bb70624e | 18 | |
2e4498b3 CR |
19 | # You should have received a copy of the GNU General Public License |
20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
bb70624e | 21 | |
ccc6cda3 | 22 | srcdir = @srcdir@ |
1573ba78 | 23 | VPATH = @srcdir@ |
ccc6cda3 JA |
24 | topdir = @top_srcdir@ |
25 | BUILD_DIR = @BUILD_DIR@ | |
26 | ||
f73dda09 JA |
27 | libdir = @libdir@ |
28 | ||
ccc6cda3 JA |
29 | INSTALL = @INSTALL@ |
30 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
31 | INSTALL_DATA = @INSTALL_DATA@ | |
32 | ||
33 | CC = @CC@ | |
34 | RANLIB = @RANLIB@ | |
35 | AR = @AR@ | |
b72432fd | 36 | ARFLAGS = @ARFLAGS@ |
ccc6cda3 JA |
37 | RM = rm -f |
38 | CP = cp | |
39 | MV = mv | |
40 | ||
b72432fd JA |
41 | SHELL = @MAKE_SHELL@ |
42 | ||
ccc6cda3 JA |
43 | CFLAGS = @CFLAGS@ |
44 | CPPFLAGS = @CPPFLAGS@ | |
45 | LDFLAGS = @LDFLAGS@ | |
46 | ||
47 | DEFS = @DEFS@ | |
48 | ||
bb70624e | 49 | INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(srcdir) |
ccc6cda3 JA |
50 | |
51 | CCFLAGS = $(CFLAGS) $(DEFS) $(CPPFLAGS) ${INCLUDES} | |
52 | ||
53 | # Here is a rule for making .o files from .c files that doesn't force | |
54 | # the type of the machine (like -sun3) into the flags. | |
55 | .c.o: | |
56 | $(CC) -c $(CCFLAGS) $< | |
57 | ||
ccc6cda3 JA |
58 | SOURCES = termcap.c tparam.c |
59 | OBJECTS = termcap.o tparam.o | |
60 | ||
61 | DOCUMENTATION = termcap.texinfo | |
62 | ||
63 | THINGS_TO_TAR = $(SOURCES) $(DOCUMENTATION) | |
64 | ||
65 | ########################################################################## | |
66 | ||
67 | all: libtermcap.a | |
68 | ||
69 | libtermcap.a: $(OBJECTS) | |
70 | $(RM) -f $@ | |
b72432fd | 71 | $(AR) $(ARFLAGS) $@ $(OBJECTS) |
ccc6cda3 JA |
72 | -test -n "$(RANLIB)" && $(RANLIB) $@ |
73 | ||
74 | install: | |
75 | ||
76 | clean: | |
77 | $(RM) *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc | |
78 | ||
bb70624e JA |
79 | mostlyclean: clean |
80 | ||
81 | distclean maintainer-clean: clean | |
82 | $(RM) Makefile | |
ccc6cda3 | 83 | |
f73dda09 | 84 | $(DESTDIR)$(libdir)/libtermcap.a: libtermcap.a |
ccc6cda3 JA |
85 | ${INSTALL_DATA} -c -m 644 libtermcap.a $@ |
86 | -test -n "$(RANLIB)" && $(RANLIB) -t $@ | |
87 | ||
88 | termcap.o: $(BUILD_DIR)/config.h | |
89 | tparam.o: $(BUILD_DIR)/config.h | |
90 | version.o: $(BUILD_DIR)/config.h |