# Makefile for LQ-Text, a full text retrieval package by Liam R. Quin
#
# DO NOT RUN MAKE IN THIS DIRECTORY.
#
# instead,
#	cd ..
#	make liblqutil
#
# This Makefile belongs in the src/liblqutil directory.
# Note that the actual configuration is done in ../Makefile and
# in ../h/global.h, and not here.  This file is for representing the
# dependancies between source components and specifying the steps
# required to build the library $(DESTDIR)/$(LIAMLIB)
#
# You should not need to edit this file at all.
#
# $Id: Makefile,v 1.6 96/05/15 15:11:03 lee Exp $
#

PWD=liblqutil # for Saber-C

LIAMLIB=liblqutil.a
DESTDIR=../lib

RANLIB=ranlib
LIAMLINTLIB=llib-llq.ln
LINT=lint
LINTFLAGS=-a -b -c -h -x 

TARGETS=$(DESTDIR)/$(LIAMLIB)
OTHER_TARGETS=$(LIAMLIB)

EXTRA=-I../h

all: $(TARGETS)

install: all

lint: $(DESTDIR)/$(LIAMLINTLIB)
	-echo The lint libraries are up to date.

$(DESTDIR)/$(LIAMLINTLIB): $(LIAMLINTLIB)
	mv $(LIAMLINTLIB) $(DESTDIR)/$(LIAMLINTLIB)

NDBMCFILES=
NDBMOFILES=

## keep all of the following consistent: ###################################

LIAMOBJS= cknatstr.o cmdname.o downcase.o elseek.o eread.o fEopen.o freadf.o \
	  freadln.o isdir.o homedir.o isfile.o isnzfile.o joinstr.o \
	  joinstr2.o malloc.o namespace.o progname.o range.o readfile.o \
	  revstr.o signals.o strings.o

LIAMSRC = cknatstr.c cmdname.c downcase.c elseek.c eread.o fEopen.c freadf.c \
	  freadln.c isdir.c isfile.c homedir.c isnzfile.c joinstr.c \
	  joinstr2.c malloc.c namespace.c progname.c range.c readfile.c  \
	  revstr.c signals.c strings.c

## end of mutually related stuff  ##########################################

saber_src:
	#cd $(PWD)
	#load $(CFLAGS) $(LIAMSRC)
	#cd ..

saber_obj:
	#cd $(PWD)
	#load $(CFLAGS) $(LIAMOBJS)
	#cd ..

$(LIAMLINTLIB): $(LIAMSRC)
	$(LINT) -Clq $(LINTFLAGS) $(CFLAGS) $(LIAMSRC)

$(DESTDIR)/$(LIAMLIB): $(LIAMLIB)
	-test -d $(DESTDIR) || mkdir $(DESTDIR)
	cp $(LIAMLIB) ../lib/$(LIAMLIB)
	$(RANLIB) ../lib/$(LIAMLIB)

$(LIAMLIB): $(LIAMOBJS)
	rm -f $(LIAMLIB)
	ar rv $(LIAMLIB) $(LIAMOBJS)
	$(RANLIB) $(LIAMLIB)

tidy:
	/bin/rm -f *.o core

clean: tidy
	/bin/rm -f $(TARGETS) $(OTHER_TARGETS)

depend:
	chmod +w Makefile
	mkdep $(CFLAGS) *.c


# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

cknatstr.o: cknatstr.c ../h/error.h 
cknatstr.o: ../h/globals.h ../h/port.h
cknatstr.o: ../h/wordrules.h ../h/api.h ../h/port2.h 
cknatstr.o: ../h/lqutil.h ../h/range.h
cmdname.o: cmdname.c
cstring.o: cstring.c ../h/error.h ../h/globals.h ../h/port.h ../h/wordrules.h
cstring.o: ../h/api.h ../h/port2.h 
cstring.o: ../h/emalloc.h 
cstring.o: ../h/lqutil.h ../h/range.h
downcase.o: downcase.c ../h/error.h 
downcase.o: ../h/globals.h ../h/port.h
downcase.o: ../h/wordrules.h ../h/api.h ../h/port2.h 
downcase.o: ../h/lqutil.h ../h/range.h ../h/emalloc.h 
elseek.o: elseek.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
elseek.o: ../h/port2.h ../h/error.h 
elseek.o: ../h/lqutil.h
elseek.o: ../h/range.h
eread.o: eread.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
eread.o: ../h/port2.h ../h/error.h 
eread.o: ../h/lqutil.h ../h/range.h
fEopen.o: fEopen.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
fEopen.o: ../h/port2.h ../h/error.h 
fEopen.o: ../h/emalloc.h ../h/lqutil.h
fEopen.o: ../h/range.h
freadf.o: freadf.c ../h/error.h 
freadf.o: ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h ../h/port2.h
freadf.o: ../h/emalloc.h ../h/lqutil.h ../h/range.h
freadln.o: freadln.c ../h/error.h 
freadln.o: ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h ../h/port2.h
freadln.o: ../h/emalloc.h
freadln.o: ../h/lqutil.h ../h/range.h
homedir.o: homedir.c ../h/error.h ../h/globals.h ../h/port.h ../h/wordrules.h
homedir.o: ../h/api.h ../h/port2.h 
homedir.o: ../h/emalloc.h 
homedir.o: ../h/emalloc.h
homedir.o: ../h/lqutil.h ../h/range.h ../h/lqtrace.h
isdir.o: isdir.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
isdir.o: ../h/port2.h ../h/error.h 
isdir.o: ../h/lqutil.h ../h/range.h
isfile.o: isfile.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
isfile.o: ../h/port2.h ../h/error.h 
isfile.o: ../h/lqutil.h ../h/range.h ../h/lqtrace.h
isnzfile.o: isnzfile.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
isnzfile.o: ../h/port2.h ../h/error.h 
isnzfile.o: ../h/lqutil.h
isnzfile.o: ../h/range.h ../h/lqtrace.h
joinstr.o: joinstr.c ../h/error.h 
joinstr.o: ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h ../h/port2.h
joinstr.o: ../h/emalloc.h 
joinstr.o: ../h/lqutil.h ../h/range.h
joinstr2.o: joinstr2.c ../h/error.h 
joinstr2.o: ../h/globals.h ../h/port.h
joinstr2.o: ../h/wordrules.h ../h/api.h ../h/port2.h ../h/emalloc.h
joinstr2.o: ../h/lqutil.h
joinstr2.o: ../h/range.h
malloc.o: malloc.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
malloc.o: ../h/port2.h ../h/error.h 
malloc.o: ../h/emalloc.h
namespace.o: namespace.c ../h/error.h 
namespace.o: ../h/globals.h ../h/port.h
namespace.o: ../h/wordrules.h ../h/api.h ../h/port2.h 
namespace.o: ../h/emalloc.h
namespace.o: ../h/range.h ../h/lqutil.h ../h/liblqtext.h ../h/wordinfo.h
namespace.o: ../h/wordplace.h ../h/fileinfo.h 
namespace.o: ../h/phrase.h
namespace.o: ../h/lqconfig.h ../h/pblock.h ../h/chartype.h ../h/namespace.h
progname.o: progname.c
range.o: range.c ../h/error.h 
range.o: ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h ../h/port2.h
range.o: ../h/emalloc.h ../h/range.h ../h/lqutil.h ../h/liblqtext.h
range.o: ../h/wordinfo.h ../h/wordplace.h ../h/fileinfo.h
range.o: ../h/phrase.h ../h/lqconfig.h ../h/pblock.h
range.o: ../h/chartype.h
readfile.o: readfile.c ../h/error.h 
readfile.o: ../h/globals.h ../h/port.h
readfile.o: ../h/wordrules.h ../h/api.h ../h/port2.h 
readfile.o: ../h/emalloc.h 
readfile.o: ../h/lqutil.h
readfile.o: ../h/range.h ../h/lqtrace.h
revstr.o: revstr.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
revstr.o: ../h/port2.h ../h/error.h 
revstr.o: ../h/lqutil.h
revstr.o: ../h/range.h
signals.o: signals.c ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h
signals.o: ../h/port2.h ../h/emalloc.h ../h/error.h
signals.o: ../h/lqutil.h ../h/range.h
strings.o: strings.c ../h/error.h 
strings.o: ../h/globals.h ../h/port.h ../h/wordrules.h ../h/api.h ../h/port2.h
strings.o: ../h/lqutil.h ../h/range.h 

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
