######################################################################### 
#									# 
#   File: scorpion/src/treewalk/Makefile 
#				 					# 
#   Copyright (C) 1991 Aaron Cavender
#									# 
#   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:								# 
#									# 
######################################################################### 

BINDIR=/usr/local/scorpion/bin
LIBDIR=/usr/local/scorpion/lib
INCDIR=/usr/local/scorpion/include
SPECSDIR=/usr/local/scorpion/src/specs
IDLC=$(BINDIR)/idlc
IDLCFLAGS=-v
CC=cc
CFLAGS=-I$(INCDIR)
RM=/bin/rm -f

LINT=/usr/bin/lint
LINTFLAGS=-abx

INSTALL=

# Local vars
IDLCFLAGSLOC=-I$(SPECSDIR) -h -k -nc
LIB=$(LIBDIR)/libidl.a
TERMLIB=-lcurses -ltermcap
LINTLIB=$(LIBDIR)/lintlib/llib-llibidl.ln
LINTLIB2=curses
LINTINC=-I$(INCDIR)
OBJ=Execute.o	list.o InstantiateDataStructures.o main.o ParseUserCommands.o \
      modify.o ProcessUserCommands.o move.o ReadInputFile.o search.o\
      ReceiveUserCommands.o symbol.o down.o up.o help.o	utilities.o incfile.o\
      version.o inputoutput.o where.o treewalk.o
SRC=Execute.c   list.c InstantiateDataStructures.c main.c ParseUserCommands.c \
      modify.c ProcessUserCommands.c move.c ReadInputFile.c search.c\
      ReceiveUserCommands.c symbol.c down.c up.c help.c utilities.c incfile.c \
      version.c inputoutput.c where.c treewalk.c
LINTSRC=$(SRC)
#############################


System: treewalk

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

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

treewalk: $(OBJ)
	$(CC) -o treewalk $(CFLAGS) $(OBJ) $(TERMLIB) $(LIB)

treewalk.h:  treewalk.idl
	$(IDLC) $(IDLCFLAGS) $(IDLCFLAGSLOC) treewalk.idl

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

treewalk.o: treewalk.h
Execute.o : Execute.c global.h treewalk.h Execute.h command.h 
InstantiateDataStructures.o : InstantiateDataStructures.c global.h \
  treewalk.h list.h history.h symbol.h command.h 
ParseUserCommands.o : ParseUserCommands.c global.h treewalk.h command.h 
ProcessUserCommands.o : ProcessUserCommands.c global.h treewalk.h \
  ProcessUserCommands.h ReceiveUserCommands.h 
ReadInputFile.o : ReadInputFile.c global.h treewalk.h
ReceiveUserCommands.o : ReceiveUserCommands.c global.h treewalk.h \
  ReceiveUserCommands.h command.h 
down.o : down.c global.h treewalk.h history.h list.h 
help.o : help.c global.h treewalk.h help.h 
incfile.o : incfile.c treewalk.h
inputoutput.o : inputoutput.c global.h treewalk.h input.h \
  history.h symbol.h list.h 
list.o : list.c global.h treewalk.h list.h 
main.o : main.c global.h treewalk.h 
modify.o : modify.c global.h treewalk.h modify.h list.h 
move.o : move.c global.h treewalk.h history.h list.h 
search.o : search.c global.h treewalk.h search.h list.h history.h 
symbol.o : symbol.c global.h treewalk.h symbol.h history.h list.h 
up.o : up.c global.h treewalk.h history.h up.h list.h 
utilities.o : utilities.c global.h treewalk.h history.h 
version.o : version.c global.h treewalk.h version.h 
where.o : where.c global.h treewalk.h history.h 

Lint:
	$(LINT) $(LINTFLAGS) $(LINTINC) $(LINTLIB) -l$(LINTLIB2) $(LINTSRC)
