# Generated automatically from Makefile.in by configure.
# Makefile for library files used by GNU fileutils.
# Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

srcdir=.

CC=gcc
AR=ar
DEFS=-DCONFIG_BROKETS -DHAVE_CONFIG_H
CFLAGS=-O
YACC=bison -y

prefix=/vsta
libdir=$(prefix)/lib

OBJECTS = getdate.o posixtm.o \
argmatch.o backupfile.o basename.o dirname.o eaccess.o \
error.o filemode.o getopt.o getopt1.o \
getversion.o idcache.o isdir.o makepath.o \
modechange.o savedir.o \
stripslash.o xgetcwd.o xmalloc.o xstrdup.o userspec.o yesno.o \
 mountlist.o stpcpy.o 

all: libfu.a

.c.o:
	$(CC) -c $(CPPFLAGS) $(DEFS) -I.. -I$(srcdir) $(CFLAGS) $<

install:

clean:
	rm -f *.o

clobber: clean
	rm -f *.a

libfu.a: $(OBJECTS)
	rm -f $@
	$(AR) csr $@ $(OBJECTS)

# Since this directory contains two parsers, we have to be careful to avoid
# running two $(YACC)s during parallel makes.  See below.
#getdate.c: getdate.y
#	@echo expect 9 shift/reduce conflicts
#	$(YACC) $(srcdir)/getdate.y
#	mv y.tab.c getdate.c

# Make the rename atomic, in case sed is interrupted and later rerun.
# The artificial dependency on getdate.c keeps the two parsers from being
# built in parallel.  Enforcing this little bit of sequentiality lets
# everyone (even those without bison) still run mostly parallel builds.
#posixtm.c: posixtm.y getdate.c
#	$(YACC) $(srcdir)/posixtm.y
#	mv y.tab.c posixtm.tab.c
#	sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
#	mv tposixtm.c posixtm.c
#	rm -f posixtm.tab.c

rename.o: rename.c
	$(CC) -c $(CPPFLAGS) -DMVDIR="\"$(libdir)/mvdir\"" $(DEFS) \
	    -I.. -I$(srcdir) $(CFLAGS) $(srcdir)/rename.c
