a229f997305794c41e4c245c692b55f1877db88b
[platform/upstream/bash.git] / lib / glob / Makefile.in
1 ## -*- text -*- ####################################################
2 #                                                                  #
3 # Makefile for the GNU Glob Library.                               #
4 #                                                                  #
5 ####################################################################
6 #
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
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@
35 ARFLAGS = @ARFLAGS@
36 RM = rm
37 CP = cp
38 MV = mv
39
40 SHELL = @MAKE_SHELL@
41
42 CFLAGS = @CFLAGS@
43 LOCAL_CFLAGS = @LOCAL_CFLAGS@
44 CPPFLAGS = @CPPFLAGS@
45 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
46
47 DEFS = @DEFS@
48 LOCAL_DEFS = @LOCAL_DEFS@
49
50 BASHINCDIR = ${topdir}/include
51
52 INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib
53
54 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
55
56 # Here is a rule for making .o files from .c files that doesn't force
57 # the type of the machine (like -sun3) into the flags.
58 .c.o:
59         $(CC) -c $(CCFLAGS) $<
60
61 # The name of the library target.
62 LIBRARY_NAME = libglob.a
63
64 # The C code source files for this library.
65 CSOURCES = $(srcdir)/glob.c $(srcdir)/strmatch.c
66
67 # The header files for this library.
68 HSOURCES = $(srcdir)/strmatch.h
69
70 OBJECTS = glob.o strmatch.o
71
72 # The texinfo files which document this library.
73 DOCSOURCE = doc/glob.texi
74 DOCOBJECT = doc/glob.dvi
75 DOCSUPPORT = doc/Makefile
76 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
77
78 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
79
80 SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
81
82 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
83
84 ######################################################################
85
86 all: $(LIBRARY_NAME)
87
88 $(LIBRARY_NAME): $(OBJECTS)
89         $(RM) -f $@
90         $(AR) $(ARFLAGS) $@ $(OBJECTS)
91         -test -n "$(RANLIB)" && $(RANLIB) $@
92
93 what-tar:
94         @for file in $(THINGS_TO_TAR); do \
95           echo $(selfdir)$$file; \
96         done
97
98 documentation: force
99         -(cd doc; $(MAKE) $(MFLAGS))
100 force:
101
102 # The rule for 'includes' is written funny so that the if statement
103 # always returns TRUE unless there really was an error installing the
104 # include files.
105 install:
106
107 clean:
108         rm -f $(OBJECTS) $(LIBRARY_NAME)
109         -(cd doc && $(MAKE) $(MFLAGS) $@ )
110
111 realclean distclean maintainer-clean: clean
112         -( cd doc && $(MAKE) $(MFLAGS) $@ )
113         $(RM) -f Makefile
114
115 mostlyclean: clean
116         -( cd doc && $(MAKE) $(MFLAGS) $@ )
117
118 ######################################################################
119 #                                                                    #
120 #  Dependencies for the object files which make up this library.     #
121 #                                                                    #
122 ######################################################################
123
124 strmatch.o: strmatch.h
125 strmatch.o: $(BUILD_DIR)/config.h
126 strmatch.o: $(BASHINCDIR)/chartypes.h
127
128 glob.o: $(BUILD_DIR)/config.h
129 glob.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h
130 glob.o: $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/memalloc.h
131 glob.o: strmatch.h
132
133 # Rules for deficient makes, like SunOS and Solaris
134 strmatch.o: strmatch.c
135 glob.o: glob.c