# makefile for ipwatch family of programs
#
# Bill Nowicki October 1983
#
#	Consists of:
# enwatch	3Mbit Experimental Ethernet
# ecwatch	3Com Multibus Ethernet
# ilwatch	Interlan Multibus Ethernet
# exwatch	Excelan Multibus Ethernet

CCOPTS = 
INCLUDE = -I/usr/sun/xinclude
.SUFFIXES: .b .list .s .c

# how to compile a 68000 file (with optimization!)
.c.b:
	cc68 $(DEFINITIONS) $(INCLUDE) $(CCOPTS) -c $*.c
 
# how to make an assembly listing file (.b as side effect)
.c.list:
	cc68 $(DEFINITIONS) $(INCLUDE)  $(CCOPTS) -L -c $*.c


# how to make an assembly file (Not deleting it or assembling it)
.c.s:
	cc68 $(DEFINITIONS) $(INCLUDE) $(CCOPTS) -S $*.c

BIN =  common.b ipprint.b pupprint.b vprint.b xvprint.b xnsprint.b \
	error.b ctime.b
ENBIN = enwatch.b 
ECBIN = ipwatch.b  ecdriver.b

all: enwatch ecwatch

enwatch: $(ENBIN) $(BIN)
	cc68 -r -o enwatch $(ENBIN) $(BIN) -lrfio -lleaf -lpup

$(ECBIN): 3com.h
ecwatch: $(ECBIN) $(BIN)
	cc68 -r -o ecwatch $(ECBIN) $(BIN) -lrfio -lleaf -lpup

enwatch.dl: $(BIN)
	cc68 -d -o enwatch.dl $(BIN) -lrfio -lleaf -lpup

vprint.b: ikc.h
xnsprint.b: xns.h
ipprint.b: ip.h

install: enwatch
	sunbootmake enwatch

netinstall: enwatch
	netinstall enwatch /usr/sun/bootfile "Shasta Navajo Whitney"

clean:
	rm -f *.b *.s *BAK *CKP ipwatch enwatch .emacs* .net*
