1 ## -*- text -*- ####################################################
3 # Makefile for the GNU Glob Library. #
5 ####################################################################
10 BUILD_DIR
= @BUILD_DIR@
13 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
14 INSTALL_DATA
= @INSTALL_DATA@
24 LOCAL_CFLAGS
= @LOCAL_CFLAGS@
26 LDFLAGS
= @LDFLAGS@ @LOCAL_LDFLAGS@
29 LOCAL_DEFS
= @LOCAL_DEFS@
31 INCLUDES
= -I.
-I..
/..
-I
$(topdir
) -I
$(topdir
)/lib
33 CCFLAGS
= $(DEFS
) $(LOCAL_DEFS
) $(CPPFLAGS
) ${INCLUDES} $(LOCAL_CFLAGS
) $(CFLAGS
)
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.
38 $(CC
) -c
$(CCFLAGS
) $<
40 # The name of the library target.
41 LIBRARY_NAME
= libglob.a
43 # The C code source files for this library.
44 CSOURCES
= $(srcdir)/glob.c
$(srcdir)/fnmatch.c
46 # The header files for this library.
47 HSOURCES
= $(srcdir)/fnmatch.h
49 OBJECTS
= glob.o fnmatch.o
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
)
57 SUPPORT
= Makefile ChangeLog
$(DOCSUPPORT
)
59 SOURCES
= $(CSOURCES
) $(HSOURCES
) $(DOCSOURCE
)
61 THINGS_TO_TAR
= $(SOURCES
) $(SUPPORT
)
63 ######################################################################
67 $(LIBRARY_NAME
): $(OBJECTS
)
69 $(AR
) cr
$@
$(OBJECTS
)
70 -test -n
"$(RANLIB)" && $(RANLIB
) $@
73 @for file in
$(THINGS_TO_TAR
); do \
74 echo
$(selfdir
)$$file; \
78 -(cd doc
; $(MAKE
) $(MFLAGS
))
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
87 rm -f
$(OBJECTS
) $(LIBRARY_NAME
)
88 -(cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
90 realclean distclean maintainer-clean
: clean
91 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
95 -( cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
97 ######################################################################
99 # Dependencies for the object files which make up this library. #
101 ######################################################################
104 fnmatch.o
: $(BUILD_DIR
)/config.h
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