# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
# 
# This software has been released under the terms of the IBM Public
# License.  For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html

!INCLUDE ..\config\NTMakefile.$(SYS_NAME)
!INCLUDE ..\config\NTMakefile.version


LIBS = \
	$(DESTDIR)\lib\afs\afsauth.lib \
	$(DESTDIR)\lib\afs\afsauth.lib \
	$(DESTDIR)\lib\afs\afscom_err.lib \
	$(DESTDIR)\lib\afs\afsutil.lib \
	$(DESTDIR)\lib\afs\afsreg.lib \
	$(DESTDIR)\lib\afslwp.lib \
	$(DESTDIR)\lib\afsdes.lib \
	$(DESTDIR)\lib\afsrx.lib \
	$(DESTDIR)\lib\afsubik.lib \
	$(DESTDIR)\lib\afs\afseventlog.lib \
	$(DESTDIR)\lib\afsrxkad.lib \
	$(DESTDIR)\lib\afs\afsprocmgmt.lib \
	$(DESTDIR)\lib\cm_dns.obj

############################################################################
# Definitions for generating files via RXGEN

update.cs.c update.ss.c update.er.c update.h: update.xg
	$(RXGEN) $**

############################################################################
# upserver
UPSERVER = $(DESTDIR)\root.server\usr\afs\bin\upserver.exe

USVR_OBJS = \
	AFS_component_version_number.obj \
	server.obj \
	utils.obj \
	update.ss.obj \
	upserver.res

$(UPSERVER):  $(USVR_OBJS) $(LIBS)
	$(EXECONLINK)
	$(EXEPREP) 

############################################################################
# upclient
UPCLIENT = $(DESTDIR)\root.server\usr\afs\bin\upclient.exe

UCLNT_OBJS = \
	AFS_component_version_number.obj \
	client.obj \
	utils.obj \
	update.cs.obj \
	upclient.res

$(UPCLIENT):  $(UCLNT_OBJS)  $(LIBS)
	$(EXECONLINK)
	$(EXEPREP) 

############################################################################
# generate versioninfo resources

upserver.res: upserver.rc AFS_component_version_number.h
	$(RC) $*.rc
upclient.res: upclient.rc AFS_component_version_number.h
	$(RC) $*.rc

############################################################################
# Install update executables.

install: update.h $(UPCLIENT) $(UPSERVER)


############################################################################
# Local clean target; augments predefined clean target

clean::
	$(DEL) update.cs.c update.ss.c update.xdr.c update.h
