#############################################################################
#	Program Name:	TESTER for stanley
#
#	Filename:	Makefile
#
#	Creation Date:	6.11.91
#
#	Date:		
#
#	Version:	1.0
#
#	Programmers:	K Kong
#
#	Modifications:
#
#	Comments:	The makefile for the tester 
#
#
#	Copyright (c) 1991 by Hughes LAN Systems
#
#############################################################################
# Defaults to GNU/960 tool set:
#
.LOGFILE .c_v(.c)
.LOGFILE .s_v(.s)
.LOGFILE .h_v(.h)

CC	= gcc960			# gnu960 cross C compiler 
ARCH	= -ACA				# This is CA architecture
OPT	= -O3 -c -DSTANLEY   			# O3 - optimization level 3
					# c  - compile only
CFLAGS	= ${ARCH} -I${IDIR1} -I${IDIR2} ${OPT} -mstrict-align 
					#
					# I - 	specify the search path for
					# 	any include files
					# mstrict-align
					#	Sequences of smaller memory
					#	reference are used instead
					#	of larger ones which might
					#	not be correctly aligned.
AS	= gas960			# gnu960 assembler
ASFLAGS	= ${ARCH}
LD	= gld960  			# gnu960 linker
TOOLSET = ${GFLAG}
# Essential under System V, harmless elsewhere
SHELL = /bin/sh
#

# Standard rules
#
.c_v.c:
	=get $(GETOPTS) $<\($@\)

.h_v.h:
	=get $(GETOPTS) $<\($@\)

.s_v.s:
	=get $(GETOPTS) $<\($@\)

.c.o:
	${CC} ${CFLAGS} $*.c

.s.o:
	${AS} ${ASFLAGS} -o $*.o $*.s


#------------------------------------------------------------------------------
# Where to find things (include files, ROM images)
#------------------------------------------------------------------------------
ROOT	= /h/pvcs
PIDIR1	= ${ROOT}/bridge/include	# where the .h_v files are
PIDIR2	= ${ROOT}/i960/include
PSDIR	= ${ROOT}/bridge/booter/tester		# where the .c_v and .s_v files are

IDIR1	= ../../include
IDIR2	= ../../../i960/include
.PATH.h_v = ${PIDIR1} ;${PIDIR2} 
.PATH.h   = ${IDIR1} ;${IDIR2} 
.PATH.c_v = ${PSDIR}
.PATH.s_v = ${PSDIR}


LDIR	= ../../lib
TCPIP   = ../../../i960/lib

#------------------------------------------------------------------------------
# TARG OBJECT FILES
#------------------------------------------------------------------------------
TESTER_OBJS= testflash.o  \
	testeeprom.o testnvram.o ptbl.o 



tester.o: $(TESTER_OBJS)  Makefile
	${LD} ${ARCH} -o tester.o -r ${TESTER_OBJS} 

testflash.o:	Makefile ${IDIR2}/types.h ${IDIR1}/memory.h \
		${IDIR2}/eeprom.h ${IDIR1}/eeprecs.h ${IDIR1}/dips.h \
		${IDIR1}/led.h ${IDIR2}/nim960h.h
testeeprom.o:	Makefile ${IDIR2}/types.h ${IDIR1}/memory.h \
		${IDIR2}/eeprom.h ${IDIR1}/eeprecs.h
testnvram.o:	Makefile ${IDIR2}/types.h ${IDIR1}/memory.h \
		${IDIR2}/eeprom.h ${IDIR1}/eeprecs.h 
ptbl.o:		Makefile ${IDIR2}/types.h ${IDIR1}/memory.h \
		${IDIR2}/eeprom.h ${IDIR1}/eeprecs.h ${IDIR1}/sys.h  \
		${IDIR1}/cmd.h ${IDIR2}/nim960h.h ${IDIR1}/target.h
