2a6bf631d0afa8f0679bf8556d1da916692a40cf
[platform/upstream/bash.git] / lib / glob / Makefile.in
1 ## -*- text -*- ####################################################
2 #                                                                  #
3 # Makefile for the GNU Glob Library.                               #
4 #                                                                  #
5 ####################################################################
6
7 srcdir = @srcdir@
8 VPATH = .:@srcdir@
9 topdir = @top_srcdir@
10 BUILD_DIR = @BUILD_DIR@
11
12 INSTALL = @INSTALL@
13 INSTALL_PROGRAM = @INSTALL_PROGRAM@
14 INSTALL_DATA = @INSTALL_DATA@
15
16 CC = @CC@
17 RANLIB = @RANLIB@
18 AR = @AR@
19 RM = rm
20 CP = cp
21 MV = mv
22
23 CFLAGS = @CFLAGS@
24 LOCAL_CFLAGS = @LOCAL_CFLAGS@
25 CPPFLAGS = @CPPFLAGS@
26 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
27
28 DEFS = @DEFS@
29 LOCAL_DEFS = @LOCAL_DEFS@
30
31 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib
32
33 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
34
35 # Here is a rule for making .o files from .c files that doesn't force
36 # the type of the machine (like -sun3) into the flags.
37 .c.o:
38         $(CC) -c $(CCFLAGS) $<
39
40 # The name of the library target.
41 LIBRARY_NAME = libglob.a
42
43 # The C code source files for this library.
44 CSOURCES = $(srcdir)/glob.c $(srcdir)/fnmatch.c
45
46 # The header files for this library.
47 HSOURCES = $(srcdir)/fnmatch.h
48
49 OBJECTS = glob.o fnmatch.o
50
51 # The texinfo files which document this library.
52 DOCSOURCE = doc/glob.texi
53 DOCOBJECT = doc/glob.dvi
54 DOCSUPPORT = doc/Makefile
55 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
56
57 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
58
59 SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
60
61 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
62
63 ######################################################################
64
65 all: $(LIBRARY_NAME)
66
67 $(LIBRARY_NAME): $(OBJECTS)
68         $(RM) -f $@
69         $(AR) cr $@ $(OBJECTS)
70         -test -n "$(RANLIB)" && $(RANLIB) $@
71
72 what-tar:
73         @for file in $(THINGS_TO_TAR); do \
74           echo $(selfdir)$$file; \
75         done
76
77 documentation: force
78         -(cd doc; $(MAKE) $(MFLAGS))
79 force:
80
81 # The rule for 'includes' is written funny so that the if statement
82 # always returns TRUE unless there really was an error installing the
83 # include files.
84 install:
85
86 clean:
87         rm -f $(OBJECTS) $(LIBRARY_NAME)
88         -(cd doc && $(MAKE) $(MFLAGS) $@ )
89
90 realclean distclean maintainer-clean: clean
91         -( cd doc && $(MAKE) $(MFLAGS) $@ )
92         $(RM) -f Makefile
93
94 mostlyclean: clean
95         -( cd doc && $(MAKE) $(MFLAGS) $@ )
96
97 ######################################################################
98 #                                                                    #
99 #  Dependencies for the object files which make up this library.     #
100 #                                                                    #
101 ######################################################################
102
103 fnmatch.o: fnmatch.h
104 fnmatch.o: $(BUILD_DIR)/config.h
105
106 glob.o: $(BUILD_DIR)/config.h
107 glob.o: $(topdir)/bashtypes.h $(topdir)/ansi_stdlib.h $(topdir)/bashansi.h
108 glob.o: $(topdir)/posixstat.h $(topdir)/memalloc.h
109 glob.o: fnmatch.h