######################################################################### 
#									# 
#   File: scorpion/src/idlformat/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:								# 
#     Jan 9 1985 (shannon) Created.					# 
#									# 
######################################################################### 

# IMPORTED VARIABLES
SHELL=/bin/sh
INCDIR=/usr/local/scorpion/include
LIBDIR=/usr/local/scorpion/lib
SRCDIR=/usr/local/scorpion/src
SPECSDIR=/usr/local/scorpion/src/specs
BINDIR=/usr/local/scorpion/bin
CC=cc
IDLC=$(BINDIR)/idlc
PC=pc
CFLAGS=-I$(INCDIR)
IDLCFLAGS=
PFLAGS=
CP=cp
MV=mv
RM=rm -f
LEX=lex
MAKE=make
YACC=yacc

LINT=/usr/bin/lint
LINTINC=-I$(INCDIR)
LINTFLAGS=-abx

UTILITYVARS='CC=$(CC)' 'IDLC=$(IDLC)' 'PC=$(PC)' 'CFLAGS=$(CFLAGS)' \
	      'IDLCFLAGS=$(IDLCFLAGS)' 'PFLAGS=$(PFLAGS)' 'CP=$(CP)' \
	      'MV=$(MV)' 'RM=$(RM)' 'LEX=$(LEX)' 'MAKE=$(MAKE)' \
	      'YACC=$(YACC)'
CI=ci
CO=co -l
INSTALL=install

# LOCAL VARIABLES
OBJ=format.o
SRC=format.c
LINTSRC=format.c

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

System: idlformat

idlformat: $(OBJ)
	$(CC) $(CFLAGS) $(OBJ) -o idlformat

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

format.o:

Checkout:
	$(RM) test/idlformattest.out2
	make 'SRCDIR=$(SRCDIR)' 'SPECSDIR=$(SPECSDIR)' 'BINDIR=$(BINDIR)' Checkout1
	$(BINDIR)/idlformat 2 <$(SRCDIR)/idlc/test/test.Cdl >test/idlformattest.out2
	sh -c 'cmp -s test/idlformattest.out1 test/idlformattest.out2 &&(echo "files idlformattest.out1 idlformattest.out2 agree"; echo "idlformat Passed Installation Check") || (echo "*** idlformat Failed Installation Check") '

Checkout1:
	cd $(SRCDIR)/idlc/test;make -s 'SPECSDIR=$(SPECSDIR)' 'BINDIR=$(BINDIR)' test.Cdl



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

Install:
	$(RM) $(BINDEST)/idlformat
	$(INSTALL) idlformat $(BINDEST)

Ci:
	$(CI) $(SRC) Makefile

Co:
	$(CO) $(SRC)

Copy:
	mkdir $(COPYDIR)/idlformat
	$(CP) $(SRC) Makefile README $(COPYDIR)/idlformat

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

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