# Makefile for LQ-Text, a full text retrieval package by Liam R. Quin
#
# 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.3 92/02/01 22:04:00 lee Exp $
#

PWD=liblqutil # for Saber-C

LIAMLIB=liblq.a
DESTDIR=../lib

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

EXTRA=-I../h

all: $(DESTDIR)/$(LIAMLIB)

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 = malloc.o progname.o cmdname.o strings.o isfile.o isdir.o getline.o \
	   readfile.o fEopen.o signals.o

LIAMSRC = malloc.c progname.c cmdname.c strings.c isfile.o isdir.o getline.c \
	  readfile.c fEopen.c signals.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)

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

clean: tidy
	/bin/rm -f $(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.
