# V host server makefile
# Marvin Theimer, 6/83

.SUFFIXES: .c .b

OBJ = host.b register.b hostdb.b
#ifdef X
C68FLAGS = -O -V -vx
#else X
C68FLAGS = -O -V
#endif X
LIBS = 

.c.b:
	cc68 $(C68FLAGS) -c $<

.c.s:
	cc68 $(C68FLAGS) -S -c $<

all: libVhost.a hostserver

libVhost.a: $(OBJ)
	ar rc libVhost.a $(OBJ)

hostserver: hostserver.b $(OBJ)
	cc68 $(C68FLAGS) -r -o hostserver hostserver.b $(OBJ) $(LIBS) 

clean:
	rm -f *.BAK *.CKP *.68 *.sym *.a
	rm -f *.b *.o .emacs* hostserver
cleanbak:
	rm -f *BAK *CKP

install: all
#ifdef X
	netinstall -x hostserver /usr/sun/xVboot
	netinstall -x libVhost.a /usr/sun/xlib
#else X
	netinstall "hostserver" /usr/sun/Vboot "shasta navajo"
	netinstall "libVhost.a" /usr/sun/lib "shasta navajo"
#endif X

backup:
	cd ..; cpdir host ../../Vbackup/servers/host

build:
	buildmake.sh

xbuild:
	buildmake.sh -DX=1
