#############################################################################
#	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  			# 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}
ARFLAGS	= rs
# Essential under System V, harmless elsewhere
SHELL = /bin/sh

GETOPTS	= -q
# 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
ROOT	= junk

#PIDIR1	= ${ROOT}/bridge/include	# where the .h_v files are
#PIDIR2	= ${ROOT}/i960/include
#PSDIR	= ${ROOT}/bridge/tester		# where the .c_v and .s_v files are


IDIR1	= ../include
IDIR2	= ../../i960/include
.PATH.h_v = ${PIDIR1} ;${PIDIR2} ; ${PSDIR}
.PATH.h   = ${IDIR1} ;${IDIR2} ;.
.PATH.c_v = ${PSDIR}
.PATH.s_v = ${PSDIR}
#------------------------------------------------------------------------------
# TARG OBJECT FILES
#------------------------------------------------------------------------------
OBJS	= diagnos.o ptbl.o dtest.o ramtest.o test.o quadtest.o \
		memedit.o memhelp.o \
		memmod.o eepedit.o eephelp.o testutil.o utest.o utestasm.o \
		ttest.o ttestasm.o testeeprom.o testnvram.o testflash.o \
		post.o PrintBoot.o askupdateinfo.o askringnumber.o

TARG_IBR = ../system/imi.o


libtest.a: FORCE
		make lib \
		LIB=libtest.a \
		AR=gar960

lib:	${OBJS}
	${AR} ${ARFLAGS} ${LIB} ${OBJS}
	cp libtest.a ../lib

FORCE:

diagnos.o:	Makefile ${IDIR2}/types.h ${IDIR1}/memory.h ${IDIR1}/led.h \
		${IDIR1}/cmd.h
dtest.o:	Makefile ${IDIR2}/types.h ${IDIR2}/krnl.h
ramtest.o:	Makefile ${IDIR2}/types.h ${IDIR1}/memory.h
test.o:		Makefile ${IDIR2}/types.h ${IDIR1}/memory.h ${IDIR2}/eeprom.h \
		${IDIR1}/dips.h ${IDIR2}/nim960h.h ${IDIR2}/uart.h \
		${IDIR2}/sonic.h ${IDIR1}/eeprecs.h ${IDIR2}/dbd.h 
memedit.o:	Makefile ${IDIR1}/defines.h ${IDIR1}/menuparse.h ${IDIR2}/types.h
memhelp.o:	Makefile ${IDIR1}/defines.h
memmod.o:	Makefile ${IDIR1}/defines.h
eepedit.o:	Makefile ${IDIR2}/types.h ${IDIR2}/eeprom.h ${IDIR1}/sys.h \
		${IDIR1}/eeprecs.h ${IDIR1}/target.h
eephelp.o:	Makefile ${IDIR1}/defines.h
testutil.o:	Makefile ${IDIR2}/types.h ${IDIR2}/eeprom.h ${IDIR1}/sys.h \
		${IDIR1}/eeprecs.h ${IDIR1}/target.h
utest.o:	Makefile ${IDIR2}/types.h ${IDIR1}/dips.h ${IDIR1}/memory.h \
		${IDIR2}/uart.h ${IDIR1}/sys.h ${IDIR1}/target.h
ttest.o:	Makefile ${IDIR2}/types.h ${IDIR1}/dips.h ${IDIR1}/memory.h \
		${IDIR2}/uart.h ${IDIR1}/tmr.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
testflash.o:	Makefile ${IDIR2}/types.h ${IDIR1}/memory.h ${IDIR2}/eeprom.h \
		${IDIR1}/eeprecs.h ${IDIR1}/dips.h ${IDIR2}/nim960h.h 
PrintBoot.o:	${IDIR1}/eeprecs.h ${IDIR2}/types.h ${IDIR1}/sys.h \
		${IDIR1}/target.h
askupdateinfo.o:	${IDIR1}/sys.h ${IDIR1}/target.h
askringnumber.o:	${IDIR1}/sys.h ${IDIR1}/target.h
