]> git.ipfire.org Git - thirdparty/bash.git/blob - lib/glob/Makefile
Imported from ../bash-1.14.7.tar.gz.
[thirdparty/bash.git] / lib / glob / Makefile
1 ## -*- text -*- ####################################################
2 # #
3 # Makefile for the GNU Glob Library. #
4 # #
5 ####################################################################
6
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.
13
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.
17 srcdir = .
18 VPATH = .:$(srcdir)
19
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.
22 .c.o:
23 $(CC) -c $(CFLAGS) $(INCLUDES) $(LOCAL_DEFINES) $(CPPFLAGS) $<
24
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
28
29 # For libraries which include headers from other libraries.
30 LOCAL_INCLUDES = -I..
31
32 # The name of the library target.
33 LIBRARY_NAME = libglob.a
34
35 # The C code source files for this library.
36 CSOURCES = $(srcdir)glob.c $(srcdir)fnmatch.c
37
38 # The header files for this library.
39 HSOURCES = $(srcdir)fnmatch.h
40
41 OBJECTS = glob.o fnmatch.o
42
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)
48
49 SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
50
51 SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
52
53 THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
54
55 ######################################################################
56
57 all: $(LIBRARY_NAME)
58
59 $(LIBRARY_NAME): $(OBJECTS)
60 $(RM) -f $@
61 $(AR) cq $@ $(OBJECTS)
62 -[ -n "$(RANLIB)" ] && $(RANLIB) $@
63
64 what-tar:
65 @for file in $(THINGS_TO_TAR); do \
66 echo $(selfdir)$$file; \
67 done
68
69 documentation: force
70 -(cd doc && $(MAKE) $(MFLAGS))
71
72 force:
73
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
76 # include files.
77 install:
78 -$(MV) $(bindir)/$(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)-old
79 $(CP) $(LIBRARY_NAME) $(bindir)/$(LIBRARY_NAME)
80 -[ -n "$(RANLIB)" ] && $(RANLIB) -t $(bindir)/$(LIBRARY_NAME)
81
82 clean:
83 rm -f $(OBJECTS) $(LIBRARY_NAME)
84 -(cd doc && $(MAKE) $(MFLAGS) $@)
85
86 maintainer-clean realclean mostlyclean distclean: clean
87 -(cd doc && $(MAKE) $(MFLAGS) $@)
88
89 ######################################################################
90 # #
91 # Dependencies for the object files which make up this library. #
92 # #
93 ######################################################################
94
95 fnmatch.o: fnmatch.c fnmatch.h