]>
Commit | Line | Data |
---|---|---|
ccc6cda3 JA |
1 | ## -*- text -*- #################################################### |
2 | # # | |
3 | # Makefile for the GNU Tilde Library. # | |
4 | # # | |
5 | #################################################################### | |
6 | ||
bb70624e JA |
7 | # Copyright (C) 1996 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 | ||
ccc6cda3 JA |
23 | srcdir = @srcdir@ |
24 | VPATH = .:@srcdir@ | |
25 | topdir = @top_srcdir@ | |
26 | BUILD_DIR = @BUILD_DIR@ | |
27 | ||
28 | INSTALL = @INSTALL@ | |
29 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | |
30 | INSTALL_DATA = @INSTALL_DATA@ | |
31 | ||
32 | CC = @CC@ | |
33 | RANLIB = @RANLIB@ | |
34 | AR = @AR@ | |
b72432fd | 35 | ARFLAGS = @ARFLAGS@ |
ccc6cda3 JA |
36 | RM = rm |
37 | CP = cp | |
38 | MV = mv | |
39 | ||
b72432fd JA |
40 | SHELL = @MAKE_SHELL@ |
41 | ||
7117c2d2 JA |
42 | PROFILE_FLAGS = @PROFILE_FLAGS@ |
43 | ||
d166f048 JA |
44 | CFLAGS = @CFLAGS@ |
45 | LOCAL_CFLAGS = @LOCAL_CFLAGS@ | |
ccc6cda3 JA |
46 | CPPFLAGS = @CPPFLAGS@ |
47 | LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ | |
48 | ||
49 | DEFS = @DEFS@ | |
d166f048 | 50 | LOCAL_DEFS = @LOCAL_DEFS@ |
ccc6cda3 | 51 | |
bb70624e JA |
52 | BASHINCDIR = ${topdir}/include |
53 | ||
54 | INCLUDES = -I. -I../.. -I$(topdir) -I${BASHINCDIR} -I$(topdir)/lib | |
ccc6cda3 | 55 | |
7117c2d2 JA |
56 | CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) \ |
57 | ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS) | |
ccc6cda3 JA |
58 | |
59 | .c.o: | |
60 | $(CC) -c $(CCFLAGS) $< | |
61 | ||
62 | # The name of the library target. | |
63 | LIBRARY_NAME = libtilde.a | |
64 | ||
65 | # The C code source files for this library. | |
66 | CSOURCES = $(srcdir)/tilde.c | |
67 | ||
68 | # The header files for this library. | |
69 | HSOURCES = $(srcdir)/tilde.h | |
70 | ||
71 | OBJECTS = tilde.o | |
72 | ||
73 | # The texinfo files which document this library. | |
74 | DOCSOURCE = doc/tilde.texi | |
75 | DOCOBJECT = doc/tilde.dvi | |
76 | DOCSUPPORT = doc/Makefile | |
77 | DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) | |
78 | ||
79 | SUPPORT = Makefile ChangeLog $(DOCSUPPORT) | |
80 | ||
81 | SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) | |
82 | ||
83 | THINGS_TO_TAR = $(SOURCES) $(SUPPORT) | |
84 | ||
85 | ###################################################################### | |
86 | ||
87 | all: $(LIBRARY_NAME) | |
88 | ||
89 | $(LIBRARY_NAME): $(OBJECTS) | |
90 | $(RM) -f $@ | |
b72432fd | 91 | $(AR) $(ARFLAGS) $@ $(OBJECTS) |
ccc6cda3 JA |
92 | -test -n "$(RANLIB)" && $(RANLIB) $@ |
93 | ||
94 | documentation: force | |
95 | -(cd doc; $(MAKE) $(MFLAGS)) | |
96 | ||
97 | force: | |
98 | ||
99 | # The rule for 'includes' is written funny so that the if statement | |
100 | # always returns TRUE unless there really was an error installing the | |
101 | # include files. | |
102 | install: | |
f73dda09 JA |
103 | $(INSTALL_DATA) -c -m 644 $(LIBRARY_NAME) $(libdir)/$(LIBRARY_NAME) |
104 | -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/$(LIBRARY_NAME) | |
ccc6cda3 JA |
105 | |
106 | clean: | |
107 | $(RM) -f $(OBJECTS) $(LIBRARY_NAME) | |
108 | -( cd doc && $(MAKE) $(MFLAGS) $@ ) | |
109 | ||
110 | realclean distclean maintainer-clean: clean | |
111 | -( cd doc && $(MAKE) $(MFLAGS) $@ ) | |
112 | $(RM) -f Makefile | |
113 | ||
114 | mostlyclean: clean | |
115 | -( cd doc && $(MAKE) $(MFLAGS) $@ ) | |
116 | ||
117 | ###################################################################### | |
118 | # # | |
119 | # Dependencies for the object files which make up this library. # | |
120 | # # | |
121 | ###################################################################### | |
122 | ||
bb70624e | 123 | tilde.o: tilde.h $(BASHINCDIR)/ansi_stdlib.h |
ccc6cda3 | 124 | tilde.o: $(BUILD_DIR)/config.h |
e8ce775d JA |
125 | |
126 | # Rules for deficient makes, like SunOS and Solaris | |
127 | tilde.o: tilde.c |