#
# Copyright (c) 1991 University College London
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the Department of Computer Science, University College London.
# The name of the University may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#

# Makefile for the utility libraries
#
# By George Pavlou, June 1991


HFILES	=	Boolean.h DebugMem.h \
		GenList.h ListIterator.h GenArray.h GenString.h \
		dbm-lock.h

OFILES  =	GenList.o GenArray.o GenString.o DebugMem.o dbm-lock.o

GDBM-OFILES =	gdbmopen.o gdbmdelete.o gdbmfetch.o gdbmstore.o gdbmclose.o \
		gdbmreorg.o gdbmseq.o \
		bucket.o falloc.o findkey.o global.o \
		hash.o update.o version.o

all:		lib

lib:		libutil.a

install:	install-h install-lib

clean:;		rm -f *.o *.a *.ph core

install-h:;	@for i in $(HFILES); \
		    do (echo "cp $$i $(H)/$$i"; cp $$i $(H)/$$i); done

install-lib:	libutil.a
		@echo "cp libutil.a $(LIB)/libutil.a; ranlib $(LIB)/libutil.a";\
		       cp libutil.a $(LIB)/libutil.a; ranlib $(LIB)/libutil.a

libutil.a:	$(OFILES) $(GDBM-OFILES)
		ar ruv libutil.a $(OFILES) $(GDBM-OFILES)
		ranlib libutil.a

DebugMem.o:	DebugMem.h

GenList.o:	GenList.h ListIterator.h

GenString.o:	GenString.h

GenArray.o:	GenArray.h

dbm-lock.o:     dbm-lock.h gdbmdefs.h extern.h
