#.include ../../global.mak
#LDEFS	= -DSCC_DEBUG

CC	= gcc960
ARCH = -ACA
#OPT	= -O3 -DSCC_DEBUG
OPT	= -O3 
CFLAGS	= ${ARCH} -I. -I${IDIR1} -I${IDIR2} -I${IDIR3} -I${IDIR4} -I${IDIR5} -I${IDIR6} -I${IDIR7} ${OPT} -D__FDDI_CON  -mstrict-align
AS	= gas960
ASFLAGS	= ${ARCH}
LD	= gld960
TOOLSET = ${GFLAG}

# Essential under System V, harmless elsewhere
SHELL = /bin/sh

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

.c.s:
	${CC} ${CFLAGS} -S -c $*.c

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


#--------------------------------------------------------------------
# Where to find things (include files, ROM images)
#--------------------------------------------------------------------
IDIR1	= ../../bridge/include
IDIR2	= ../../i960/include
IDIR3	= ../../fddi/fddicon/include
IDIR4	= ../../fddi/fddicon/smt/headers
IDIR5	= ../../fddi/fddicon/smt/dp83200if/headers
IDIR6	= ../../fddi/trc/ui/include
IDIR7	= ../../fddi/include

#------------------------------------------------------------------
# TARG OBJECT FILES
#------------------------------------------------------------------

TARG1 =	bp_ring.o

OBJS= scc_drvr.o scc_int.o scc_buff.o brip.o member.o 

all:	${TARG1} 

${TARG1}: ${OBJS}
	${LD} ${ARCH} -o ${TARG1} -r ${OBJS}
	cp bp_ring.o ../lib/bp_ring.o


#------------------------------------------------------------------------------
# HEADER-FILE DEPENDENCIES
#------------------------------------------------------------------------------


scc_drvr.o:	makefile ${IDIR2}/types.h ${IDIR2}/defines.h ${IDIR2}/uart.h \
		${IDIR1}/memory.h scc_defs.h scc_buff.h

scc_buff.o:	makefile ${IDIR2}/uart.h scc_buff.h

brip.o:		makefile ${IDIR2}/types.h ${IDIR2}/defines.h ${IDIR2}/uart.h \
		${IDIR1}/memory.h scc_defs.h scc_buff.h ${IDIR2}/brip.h member.h

member.o:	makefile ${IDIR2}/types.h ${IDIR2}/defines.h ${IDIR2}/uart.h \
		scc_defs.h ${IDIR2}/brip.h member.h

clean:
	rm -f *.o ${TARG1} 
