Home | History | Annotate | Line # | Download | only in glob
      1  1.1  christos # Makefile for standalone distribution of libglob.a (fnmatch, glob).
      2  1.1  christos # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
      3  1.1  christos # 2005, 2006 Free Software Foundation, Inc.
      4  1.1  christos # This file is part of GNU Make.
      5  1.1  christos #
      6  1.1  christos # GNU Make is free software; you can redistribute it and/or modify it under the
      7  1.1  christos # terms of the GNU General Public License as published by the Free Software
      8  1.1  christos # Foundation; either version 2, or (at your option) any later version.
      9  1.1  christos #
     10  1.1  christos # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
     11  1.1  christos # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     12  1.1  christos # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     13  1.1  christos #
     14  1.1  christos # You should have received a copy of the GNU General Public License along with
     15  1.1  christos # GNU Make; see the file COPYING.  If not, write to the Free Software
     16  1.1  christos # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
     17  1.1  christos 
     18  1.1  christos # Ultrix 2.2 make doesn't expand the value of VPATH.
     19  1.1  christos VPATH = /glob/
     20  1.1  christos # This must repeat the value, because configure will remove `VPATH = .'.
     21  1.1  christos srcdir = /glob/
     22  1.1  christos 
     23  1.1  christos CC = sc
     24  1.1  christos CPPFLAGS =
     25  1.1  christos CFLAGS =
     26  1.1  christos MAKE = smake
     27  1.1  christos RM = delete
     28  1.1  christos 
     29  1.1  christos # Information determined by configure.
     30  1.1  christos DEFS = Define HAVE_HEADER_STDC Define HAVE_UNISTD_H Define HAVE_STRING_H \
     31  1.1  christos 	Define HAVE_DIRENT_H
     32  1.1  christos 
     33  1.1  christos # How to invoke ar.
     34  1.1  christos AR = join
     35  1.1  christos ARFLAGS = as
     36  1.1  christos 
     37  1.1  christos # How to invoke ranlib.
     38  1.1  christos RANLIB = ;
     39  1.1  christos 
     40  1.1  christos .PHONY: all
     41  1.1  christos all: glob.lib
     42  1.1  christos 
     43  1.1  christos glob.lib : glob.o fnmatch.o
     44  1.1  christos 	$(AR) $(ARFLAGS) $@ glob.o fnmatch.o
     45  1.1  christos 	$(RANLIB) $@
     46  1.1  christos 
     47  1.1  christos # For some reason, Unix make wants the dependencies on the source files.
     48  1.1  christos # Otherwise it refuses to use an implicit rule!
     49  1.1  christos # And, get this: it doesn't work to use $(srcdir)foo.c!!
     50  1.1  christos glob.o: $(srcdir)glob.h $(srcdir)fnmatch.h glob.c
     51  1.1  christos fnmatch.o: $(srcdir)fnmatch.h fnmatch.c
     52  1.1  christos 
     53  1.1  christos .c.o:
     54  1.1  christos 	$(CC) IDir "" \
     55  1.1  christos 	      $(DEFS) $(CPPFLAGS) $(CFLAGS) $< $(OUTPUT_OPTION)
     56  1.1  christos 
     57  1.1  christos .PHONY: clean realclean glob-clean glob-realclean distclean
     58  1.1  christos clean glob-clean:
     59  1.1  christos 	-$(RM) -f glob.lib *.o core
     60  1.1  christos distclean glob-realclean: clean
     61  1.1  christos 	-$(RM) -f TAGS tags Makefile config.status config.h config.log
     62  1.1  christos realcean: distclean
     63  1.1  christos 
     64  1.1  christos # For inside the C library.
     65  1.1  christos glob.tar glob.tar.Z:
     66  1.1  christos 	$(MAKE) -C .. $@
     67