#-----------------------------------------------------------------------------
#		Makefile for tcpip/util 
#-----------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Where to find things (include files)
#------------------------------------------------------------------------------
ROOT	=/b/gregs		# where is the pvcs directory.

PIDIR	= ${ROOT}/i960/include	# where are the .h_v files
PSDIR	= ${ROOT}/i960/tcpip/util	# where are the .c_v files

.LOGFILE .c_v(.c)
.LOGFILE .s_v(.s)
.LOGFILE .h_v(.h)

IDIR	= ../../include
.PATH.h_v = ${PIDIR} 
.PATH.h   = ${IDIR} 
.PATH.c_v = ${PSDIR}

# Defaults to GNU/960 tool set:
#
CC	= gcc960
ARCH	= -ACA			# -ACA:	Generate CA instructions
OPT	= -O3 -c  		# -O3: 	optimize 
				# -c:	compile only
CFLAGS	= ${ARCH} -I${IDIR} ${OPT} -mstrict-align 
AS	= gas960
ASFLAGS	= ${ARCH}
LD	= gld960
LFLAGS	= ${ARCH} -o $(TARG) -r 
AR	= gar960
ARFLAGS = ruos

#
# 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


#------------------------------------------------------------------------------
# TARG OBJECT FILES
#------------------------------------------------------------------------------
TARG	= ../../lib/libtcpip.a		# target output

TARG_OBJS=	inet_addr.o tcpiperr.o nidtostr.o


$(TARG): ${TARG_OBJS}
	 ${AR} $(ARFLAGS) ${TARG} ${TARG_OBJS}

#------------------------------------------------------------------------------
# SPECIAL CASES
#------------------------------------------------------------------------------


#------------------------------------------------------------------------------
# HEADER-FILE DEPENDENCIES
#------------------------------------------------------------------------------
inet_addr.o:	Makefile ${IDIR}/types.h
tcpiperr.o:	Makefile
nidtostr.o:	Makefile
