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@
30 INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib
32 CCFLAGS = $(DEFS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
34 # Here is a rule for making .o files from .c files that doesn't force
35 # the type of the machine (like -sun3) into the flags.
37 $(CC) -c $(CCFLAGS) $<
39 # The name of the library target.
40 LIBRARY_NAME = libglob.a
42 # The C code source files for this library.
43 CSOURCES = $(srcdir)/glob.c $(srcdir)/fnmatch.c
45 # The header files for this library.
46 HSOURCES = $(srcdir)/fnmatch.h
48 OBJECTS = glob.o fnmatch.o
50 # The texinfo files which document this library.
51 DOCSOURCE = doc/glob.texi
52 DOCOBJECT = doc/glob.dvi
53 DOCSUPPORT = doc/Makefile
54 DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
56 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
58 SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
60 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
62 ######################################################################
66 $(LIBRARY_NAME): $(OBJECTS)
68 $(AR) cr $@ $(OBJECTS)
69 -test -n "$(RANLIB)" && $(RANLIB) $@
72 @for file in $(THINGS_TO_TAR); do \
73 echo $(selfdir)$$file; \
77 -(cd doc; $(MAKE) $(MFLAGS))
80 # The rule for 'includes' is written funny so that the if statement
81 # always returns TRUE unless there really was an error installing the
86 rm -f $(OBJECTS) $(LIBRARY_NAME)
87 -(cd doc && $(MAKE) $(MFLAGS) $@ )
89 realclean distclean maintainer-clean: clean
90 -( cd doc && $(MAKE) $(MFLAGS) $@ )
94 -( cd doc && $(MAKE) $(MFLAGS) $@ )
96 ######################################################################
98 # Dependencies for the object files which make up this library. #
100 ######################################################################
102 fnmatch.o: fnmatch.c fnmatch.h
104 fnmatch.o: $(BUILD_DIR)/config.h
105 glob.o: $(BUILD_DIR)/config.h