# $Id: Makefile,v 1.2 1995/12/17 23:07:36 jhawk Exp jhawk $

all: ntcp_output.o

# t0:	stuff to add to tcp_output
# t1:	new code goes in final link
# t2:	tcpoutput+t0

t0.o: t0.s
	gas -o t0.o t0.s

t1.o: t1.s
	gas -o t1.o t1.s

bogus: tcp_output.o t0.o
	# Patching code
	set -xv; \
	CHECK="`echo 'tcp_output+8f4?2X' | adb t2.o`";			\
	if { echo "$${CHECK}" | grep -vs '9e03c01d.*de35e002$$';};	\
	then								\
	  echo "tcp_output+8f4 is unexpected:";				\
	  echo "$${CHECK}";						\
	  echo "Abort!" ;						\
	  exit 1 ;							\
	fi
	@(echo "tcp_output+8f4?W11000000"				\
	 ;echo "tcp_output+8f8?W81c22000"				\
	)| adb -w t2.o

ntcp_output.o: t1.o t2.o
	gld -r t1.o t2.o -o ntcp_output.o

