]>
git.ipfire.org Git - thirdparty/bash.git/blob - lib/glob/Makefile
1 ## -*- text -*- ####################################################
3 # Makefile for the GNU Glob Library. #
5 ####################################################################
7 # This Makefile is hand made from a template file, found in
8 # ../template. Each library must provide several Makefile
9 # targets: `all', `clean', `documentation', `install', and
10 # `what-tar'. The `what-tar' target reports the names of the
11 # files that need to be included in a tarfile to build the full
12 # code and documentation for this library.
14 # Please note that the values for INCLUDES, CC, AR, RM, CP,
15 # RANLIB, and selfdir are passed in from ../Makefile, and do
16 # not need to be defined here.
20 # Here is a rule for making .o files from .c files that doesn't force
21 # the type of the machine (like -sun3) into the flags.
23 $(CC
) -c
$(CFLAGS
) $(INCLUDES
) $(LOCAL_DEFINES
) $(CPPFLAGS
) $<
25 # LOCAL_DEFINES are flags that are specific to this library.
26 # Define -DUSG if you are using a System V operating system.
27 LOCAL_DEFINES
= $(LOCAL_INCLUDES
) #-DUSG
29 # For libraries which include headers from other libraries.
32 # The name of the library target.
33 LIBRARY_NAME
= libglob.a
35 # The C code source files for this library.
36 CSOURCES
= $(srcdir)glob.c
$(srcdir)fnmatch.c
38 # The header files for this library.
39 HSOURCES
= $(srcdir)fnmatch.h
41 OBJECTS
= glob.o fnmatch.o
43 # The texinfo files which document this library.
44 DOCSOURCE
= doc
/glob.texi
45 DOCOBJECT
= doc
/glob.
dvi
46 DOCSUPPORT
= doc
/Makefile
47 DOCUMENTATION
= $(DOCSOURCE
) $(DOCOBJECT
) $(DOCSUPPORT
)
49 SUPPORT
= Makefile ChangeLog
$(DOCSUPPORT
)
51 SOURCES
= $(CSOURCES
) $(HSOURCES
) $(DOCSOURCE
)
53 THINGS_TO_TAR
= $(SOURCES
) $(SUPPORT
)
55 ######################################################################
59 $(LIBRARY_NAME
): $(OBJECTS
)
61 $(AR
) cq
$@
$(OBJECTS
)
62 -[ -n
"$(RANLIB)" ] && $(RANLIB
) $@
65 @for file in
$(THINGS_TO_TAR
); do \
66 echo
$(selfdir
)$$file; \
70 -(cd doc
&& $(MAKE
) $(MFLAGS
))
74 # The rule for 'includes' is written funny so that the if statement
75 # always returns TRUE unless there really was an error installing the
78 -$(MV
) $(bindir)/$(LIBRARY_NAME
) $(bindir)/$(LIBRARY_NAME
)-old
79 $(CP
) $(LIBRARY_NAME
) $(bindir)/$(LIBRARY_NAME
)
80 -[ -n
"$(RANLIB)" ] && $(RANLIB
) -t
$(bindir)/$(LIBRARY_NAME
)
83 rm -f
$(OBJECTS
) $(LIBRARY_NAME
)
84 -(cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
86 maintainer-clean
realclean mostlyclean distclean: clean
87 -(cd doc
&& $(MAKE
) $(MFLAGS
) $@
)
89 ######################################################################
91 # Dependencies for the object files which make up this library. #
93 ######################################################################
95 fnmatch.o
: fnmatch.c fnmatch.h