# Buildfile for MicroVAX boot server (uses DEC's MOP protocol)
# NOTE: only works on Stanford 4.2 Unix -- NOT a V program

#include ../../buildprefix

#
# Only the xV copy of mvaxbootserver should be built and installed;
#   the sources in V are just a (possibly out of date) copy
#
# #ifndef X
# default:
#	@echo '--- The copy of mvaxbootserver in xV should be used for all changes ---'
# *:
# 	@echo '--- The copy of mvaxbootserver in xV should be used for all changes ---'
# #else X

ALL	= mvaxbootserver
OBJECTS	= mvaxbootserver.o configboot.o

all: $(ALL)

mvaxbootserver: $(OBJECTS)
	cc -o $@ $< -lpup

mvaxbootserver.o: mvaxbootserver.c configboot.h buildfile ../../buildprefix
	cc -O -c '-DPGM="$(PRODUCTION_VSYS)/boot/Vload.vax"' mvaxbootserver.c
#
# Yes, there really is a dependency on this buildfile: if the definition of
#   PGM (or DEFAULT_CONFIGDIR below) changes, we should rebuild.  Similarly,
#   we depend on buildprefix in case PRODUCTION_VSYS is redefined.
#
configboot.o: configboot.c configboot.h buildfile ../../buildprefix
	cc -O -c '-DDEFAULT_CONFIGDIR="$(PRODUCTION_VSYS)/config"' \
		configboot.c

clean:
	rm -f *.BAK *.CKP $(OBJECTS) $(ALL)

relink:
	rm -f $(ALL)

install: all
	$(NETINSTALL) -m 755 -p "$(ALL)" /etc/V

# #endif X
