######################################################################### 
#									# 
#   File: scorpion/src/IDLlib/liberr/Makefile 
#				 					# 
#   Copyright (C) 1991 Karen Shannon
#									# 
#   The Scorpion System is free software in the public domain; you can  # 
#   redistribute it and/or modify it as you wish. We ask that you 	# 
#   retain credits referencing the University of Arizona and that you	# 
#   identify any changes you make.					# 
#									# 
#   Report problems to scorpion-project@cs.arizona.edu			# 
#   Direct all inquiries to:	The Scorpion Project			# 
#				Department of Computer Science		# 
#				Gould-Simpson Building			# 
#				University of Arizona			# 
#				Tucson, AZ 85721			# 
#				U.S.A.					# 
#									# 
#   Revision Log:							# 
#	$Log:$ 
#									# 
#   Edit Log:								# 
#									# 
######################################################################### 

# IMPORTED VARIABLES
LIBDIR=/usr/local/scorpion/lib
BINDIR=/usr/local/scorpion/bin
INCDIR=/usr/local/scorpion/include
AR=
CC=cc
IDLC=$(BINDIR)/idlc
PC=pc
CFLAGS=-O
D_CFLAGS=-g
IDLCFLAGS=
PFLAGS=
CP=cp
MV=mv
RM=rm -f
LEX=lex
MAKE=make
RANLIB=
YACC=yacc

LINT=
LINTFLAGS=-abx

UTILITYVARS='AR=$(AR)' 'CC=$(CC)' 'IDLC=$(IDLC)' 'PC=$(PC)' 'CFLAGS=$(CFLAGS)' \
              'IDLCFLAGS=$(IDLCFLAGS)' 'PFLAGS=$(PFLAGS)' 'CP=$(CP)' \
              'MV=$(MV)' 'RM=$(RM)' 'LEX=$(LEX)' 'MAKE=$(MAKE)' \
              'YACC=$(YACC)' 'MACHINE=$(MACHINE)' 'SHELL=$(SHELL)' \
              'LINT=$(LINT)' 'RANLIB=$(RANLIB)'


CI=ci
CO=co -l

# LOCAL VARIABLES
LINTINC=
SRC=err.c
OBJ=err.o 
LINTLIB=$(LIBDIR)/lintlib/llib-lliball.ln
LINTSRC=err.c

###############################################################

System: liberr.a

liberr.a: $(OBJ) 
	$(AR) liberr.a $(OBJ) 
	$(RANLIB) liberr.a

liberrdebug.a: $(OBJ) 
	$(AR) liberrdebug.a $(OBJ) 
	$(RANLIB) liberrdebug.a

DebugLibrary:
	$(MAKE) -f Makefile 'CFLAGS=$(D_CFLAGS)' 'AR=$(AR)' 'RANLIB=$(RANLIB)' \
		'CC=$(CC)' liberrdebug.a

.c.o:
	$(CC) -c $(CFLAGS) $*.c

err.o : err.c 

Install:
	$(RM) $(LIBDEST)/liberr*.a
	$(CP) liberr*.a $(LIBDEST)
	cd $(LIBDEST); \
	    if (test "$(MACHINE)" = "sparc" -o "$(MACHINE)" = "sun" ) then \
		$(RANLIB) -t liberr*.a; \
	    else \
		$(RANLIB) liberr*.a; \
	    fi;

Clean:
	$(RM) *.o core a.out

DelSrc:
	$(RM) *.c *.h *.idl

Lint:
	$(LINT) $(LINTFLAGS) $(LINTINC) $(LINTLIB) $(LINTSRC)
