head     1.2;
branch   ;
access   ;
symbols  ;
locks    ;
comment  @# @;


1.2
date     96.05.15.15.06.09;  author lee;  state Exp;
branches ;
next     1.1;

1.1
date     92.02.15.03.11.36;  author lee;  state Exp;
branches ;
next     ;


desc
@Makefile for error library.
@


1.2
log
@portable deps.
@
text
@# 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

TARGETS=../h/error.h $(ERRORLIB) $(DESTDIR)/$(ERRORLIB)
OPT_TARGETS=$(DESTDIR)/$(ERRORLINTLIB) $(ERRORLINTLIB)

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

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

EXTRA=-I../h

all: $(TARGETS)

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 progname.o cmdname.o
ERRORSRC = error.c progname.c cmdname.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)
	cp $(ERRORLIB) ../lib/$(ERRORLIB)
	$(RANLIB) ../lib/$(ERRORLIB)

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

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

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

error.o: error.c error.h ../h/lqtrace.h ../h/api.h
progname.o: progname.c
cmdname.o: cmdname.c

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
@


1.1
log
@Initial revision
@
text
@d11 1
a11 1
# $Id$
d16 3
d20 1
d29 1
a29 1
all: ../h/error.h $(DESTDIR)/$(ERRORLIB)
d41 2
a42 2
ERROROBJS = error.o
ERRORSRC = error.c
d64 1
a64 1
	mv $(ERRORLIB) ../lib/$(ERRORLIB)
d70 1
d76 1
a76 1
	/bin/rm -f $(TARGETS)
d82 1
d86 3
a88 2
error.o: error.c /usr/include/stdio.h error.h /usr/include/errno.h
error.o: /usr/include/sys/errno.h
@
