init version.
[bush.git] / lib / glob / Makefile.in
blob2d28634ad384d6d6375a2f4c93e29aa9da5e2ad3
1 ## -*- text -*- ####################################################
2 # #
3 # Makefile for the GNU Glob Library. #
4 # #
5 ####################################################################
7 # Copyright (C) 1996-2009 Free Software Foundation, Inc.
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.
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.
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/>.
22 srcdir = @srcdir@
23 VPATH = @srcdir@
24 topdir = @top_srcdir@
25 BUILD_DIR = @BUILD_DIR@
27 INSTALL = @INSTALL@
28 INSTALL_PROGRAM = @INSTALL_PROGRAM@
29 INSTALL_DATA = @INSTALL_DATA@
31 CC = @CC@
32 RANLIB = @RANLIB@
33 AR = @AR@
34 ARFLAGS = @ARFLAGS@
35 RM = rm -f
36 CP = cp
37 MV = mv
39 SHELL = @MAKE_SHELL@
41 PROFILE_FLAGS = @PROFILE_FLAGS@
43 CFLAGS = @CFLAGS@
44 LOCAL_CFLAGS = @LOCAL_CFLAGS@
45 CPPFLAGS = @CPPFLAGS@
46 LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
48 DEFS = @DEFS@
49 LOCAL_DEFS = @LOCAL_DEFS@
51 BUSHINCDIR = ${topdir}/include
53 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/src -I$(BUSHINCDIR) -I$(topdir)/lib
55 CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) ${INCLUDES} $(CPPFLAGS) \
56 $(LOCAL_CFLAGS) $(CFLAGS) ${ADDON_CFLAGS}
58 # Here is a rule for making .o files from .c files that doesn't force
59 # the type of the machine (like -sun3) into the flags.
60 .c.o:
61 $(RM) $@
62 $(CC) -c $(CCFLAGS) $<
64 # The name of the library target.
65 LIBRARY_NAME = libglob.a
67 # The C code source files for this library.
68 CSOURCES = $(srcdir)/glob.c $(srcdir)/strmatch.c $(srcdir)/smatch.c \
69 $(srcdir)/xmbsrtowcs.c
71 # The header files for this library.
72 HSOURCES = $(srcdir)/strmatch.h
74 OBJECTS = glob.o strmatch.o smatch.o xmbsrtowcs.o gmisc.o
76 # The texinfo files which document this library.
77 DOCSOURCE = doc/glob.texi
78 DOCOBJECT = doc/glob.dvi
79 DOCSUPPORT = doc/Makefile
80 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
82 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
84 SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
86 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
88 ######################################################################
90 all: $(LIBRARY_NAME)
92 $(LIBRARY_NAME): $(OBJECTS)
93 $(RM) -f $@
94 $(AR) $(ARFLAGS) $@ $(OBJECTS)
95 -test -n "$(RANLIB)" && $(RANLIB) $@
97 what-tar:
98 @for file in $(THINGS_TO_TAR); do \
99 echo $(selfdir)$$file; \
100 done
102 documentation: force
103 -(cd doc; $(MAKE) $(MFLAGS))
104 force:
106 # The rule for 'includes' is written funny so that the if statement
107 # always returns TRUE unless there really was an error installing the
108 # include files.
109 install:
111 clean:
112 rm -f $(OBJECTS) $(LIBRARY_NAME)
113 -(cd doc && $(MAKE) $(MFLAGS) $@ )
115 realclean distclean maintainer-clean: clean
116 -( cd doc && $(MAKE) $(MFLAGS) $@ )
117 $(RM) -f Makefile
119 mostlyclean: clean
120 -( cd doc && $(MAKE) $(MFLAGS) $@ )
122 ${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile
123 -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h )
125 ######################################################################
127 # Dependencies for the object files which make up this library. #
129 ######################################################################
131 smatch.o: strmatch.h
132 smatch.o: $(BUILD_DIR)/config.h
133 smatch.o: $(BUSHINCDIR)/chartypes.h
134 smatch.o: $(BUSHINCDIR)/ansi_stdlib.h ${topdir}/src/bushansi.h
135 smatch.o: $(BUSHINCDIR)/shmbutil.h
136 smatch.o: ${topdir}/src/xmalloc.h
138 strmatch.o: strmatch.h
139 strmatch.o: $(BUILD_DIR)/config.h
140 strmatch.o: $(BUSHINCDIR)/stdc.h
142 glob.o: $(BUILD_DIR)/config.h
143 glob.o: ${topdir}/src/shell.h $(BUILD_DIR)/pathnames.h
144 glob.o: ${topdir}/src/bushtypes.h $(BUSHINCDIR)/ansi_stdlib.h ${topdir}/src/bushansi.h
145 glob.o: $(BUSHINCDIR)/posixstat.h $(BUSHINCDIR)/memalloc.h
146 glob.o: strmatch.h glob.h
147 glob.o: $(BUSHINCDIR)/shmbutil.h
148 glob.o: ${topdir}/src/xmalloc.h
150 gmisc.o: $(BUILD_DIR)/config.h
151 gmisc.o: ${topdir}/src/bushtypes.h $(BUSHINCDIR)/ansi_stdlib.h ${topdir}/src/bushansi.h
152 gmisc.o: $(BUSHINCDIR)/shmbutil.h
154 xmbsrtowcs.o: ${BUILD_DIR}/config.h
155 xmbsrtowcs.o: ${topdir}/src/bushansi.h ${BUSHINCDIR}/ansi_stdlib.h
156 xmbsrtowcs.o: ${BUSHINCDIR}/shmbutil.h
158 # Rules for deficient makes, like SunOS and Solaris
159 glob.o: glob.c
160 gmisc.o: gmisc.c
161 strmatch.o: strmatch.c
162 smatch.o: smatch.c
163 xmbsrtowcs.o: xmbsrtowcs.c
165 # dependencies for C files that include other C files
166 glob.o: glob_loop.c
167 gmisc.o: gm_loop.c
168 smatch.o: sm_loop.c