# Makefile for LQ-Text, a full text retrieval package by Liam R. Quin
#
# This Makefile belongs in the src/liberror 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)/$(ERRORLIB)
#
# You should not need to edit this file at all.
#
# $Id: Makefile,v 1.1 92/02/15 03:11:36 lee Exp $
#

PWD=liberror # for Saber-C

ERRORLIB=liblqerror.a
ERRORLINTLIB=liblqerror.ln
DESTDIR=../lib

RANLIB=ranlib
LINT=lint
LINTFLAGS=-a -b -c -h -x 

EXTRA=-I../h

all: ../h/error.h $(DESTDIR)/$(ERRORLIB)

install: all

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

$(DESTDIR)/$(ERRORLINTLIB): $(ERRORLINTLIB)
	mv $(ERRORLINTLIB) $(DESTDIR)/$(ERRORLINTLIB)

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

ERROROBJS = error.o
ERRORSRC = error.c

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

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

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

../h/error.h: error.h
	-(cmp -s ../h/error.h error.h || cp error.h ../h/error.h)

$(ERRORLINTLIB): $(ERRORSRC)
	$(LINT) -Clq $(LINTFLAGS) $(CFLAGS) $(ERRORSRC)

$(DESTDIR)/$(ERRORLIB): $(ERRORLIB)
	-test -d $(DESTDIR) || mkdir $(DESTDIR)
	mv $(ERRORLIB) ../lib/$(ERRORLIB)
	$(RANLIB) ../lib/$(ERRORLIB)

$(ERRORLIB): $(ERROROBJS)
	rm -f $(ERRORLIB)
	ar rv $(ERRORLIB) $(ERROROBJS)

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

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

depend:
	chmod +w Makefile
	mkdep $(CFLAGS) $(ERRORSRC)

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

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
