# $Id: Makefile.in,v 1.9 1998/02/23 08:04:42 assar Exp $

srcdir		= @srcdir@
VPATH		= @srcdir@

CC		= @CC@
AR		= ar
RANLIB		= @RANLIB@
MAKEDEPEND	= makedepend
ETAGS		= etags

DEFS		= @DEFS@

SHELL		= /bin/sh

CFLAGS		= @CFLAGS@ -g
REALCFLAGS	= $(CFLAGS) $(DEFS) -I$(srcdir) -I$(srcdir)/../lib/roken

SRCS		= hash.c list.c freelist.c timeval.c log.c mem.c efile.c \
		  strutil.c fnameutil.c date_rfc822.c strmatch.c strsplit.c \
		  atom.c ip.c
OBJS		= hash.o list.o freelist.o timeval.o log.o mem.o efile.o \
		  strutil.o fnameutil.o date_rfc822.o strmatch.o strsplit.o \
		  atom.o ip.o
HDRS		= minmax.h hash.h bool.h list.h freelist.h timeval.h log.h \
		  mem.h efile.h strutil.h fnameutil.h date_rfc822.h \
		  strmatch.h strsplit.h atom.h ip.h

.PHONY:	all install depend tags clean

.c.o:
		$(CC) -c $(CPPFLAGS) $(REALCFLAGS) $<

all:		libutil.a

install:	all

libutil.a:	$(OBJS)
		$(AR) cr $@ $(OBJS)
		$(RANLIB) $@

depend:		$(SRCS)
		$(MAKEDEPEND) --  $(REALCFLAGS) -- $^

Makefile:	Makefile.in ../config.status
		cd ..; CONFIG_FILES=util/Makefile CONFIG_HEADERS= $(SHELL) config.status

tags:		TAGS

TAGS:		$(SRCS) $(HDRS)
		$(ETAGS) -t $(SRCS) $(HDRS)

clean:		
		rm -f $(OBJS) libutil.a *~ *.o core

mostlyclean:	clean

distclean:	clean
		rm -f Makefile

realclean:	distclean
		rm -f TAGS
