# 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

# make compiler warnings fatal

AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX -I..\afsd -I..\client_config -I..\kfw\inc\krb5 

# allow the resource compiler to search the dest\include tree

AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include

# include the primary makefile
RELDIR=WINNT\afssvrmgr
!INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
!INCLUDE ..\..\config\NTMakefile.version

############################################################################
#
# BUILD TARGETS
#

EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsServerManager.exe

EXEOBJS = \
	$(OUT)\svrmgr_stub.res \
	$(OUT)\action.obj \
	$(OUT)\agg_col.obj \
	$(OUT)\agg_general.obj \
	$(OUT)\agg_prop.obj \
	$(OUT)\agg_tab.obj \
	$(OUT)\alert.obj \
	$(OUT)\cmdline.obj \
	$(OUT)\columns.obj \
	$(OUT)\command.obj \
	$(OUT)\creds.obj \
	$(OUT)\dispatch.obj \
	$(OUT)\dispguts.obj \
	$(OUT)\display.obj \
	$(OUT)\general.obj \
	$(OUT)\helpfunc.obj \
	$(OUT)\options.obj \
	$(OUT)\prefs.obj \
	$(OUT)\problems.obj \
	$(OUT)\propcache.obj \
	$(OUT)\set_clone.obj \
	$(OUT)\set_col.obj \
	$(OUT)\set_create.obj \
	$(OUT)\set_createrep.obj \
	$(OUT)\set_delete.obj \
	$(OUT)\set_dump.obj \
	$(OUT)\set_general.obj \
	$(OUT)\set_move.obj \
	$(OUT)\set_prop.obj \
	$(OUT)\set_quota.obj \
	$(OUT)\set_release.obj \
	$(OUT)\set_rename.obj \
	$(OUT)\set_repprop.obj \
	$(OUT)\set_restore.obj \
	$(OUT)\set_tab.obj \
	$(OUT)\subset.obj \
	$(OUT)\svc_col.obj \
	$(OUT)\svc_create.obj \
	$(OUT)\svc_delete.obj \
	$(OUT)\svc_general.obj \
	$(OUT)\svc_prop.obj \
	$(OUT)\svc_startstop.obj \
	$(OUT)\svc_tab.obj \
	$(OUT)\svc_viewlog.obj \
	$(OUT)\svr_address.obj \
	$(OUT)\svr_col.obj \
	$(OUT)\svr_execute.obj \
	$(OUT)\svr_general.obj \
	$(OUT)\svr_getdates.obj \
	$(OUT)\svr_hosts.obj \
	$(OUT)\svr_install.obj \
	$(OUT)\svr_prop.obj \
	$(OUT)\svr_prune.obj \
	$(OUT)\svr_salvage.obj \
	$(OUT)\svr_security.obj \
	$(OUT)\svr_syncvldb.obj \
	$(OUT)\svr_uninstall.obj \
	$(OUT)\svr_window.obj \
	$(OUT)\svrmgr.obj \
	$(OUT)\task.obj \
	$(OUT)\window.obj

VCLIBS =\
	comctl32.lib \
	shell32.lib

EXELIBS = \
	$(DESTDIR)\lib\afsauthent.lib \
	$(DESTDIR)\lib\libafsconf.lib \
        $(DESTDIR)\lib\afsrxkad.lib \
        $(DESTDIR)\lib\afsdes.lib \
        $(DESTDIR)\lib\afskfw.lib \
	$(DESTDIR)\lib\afs\AfsClass.lib \
	$(DESTDIR)\lib\afs\TaAfsAppLib.lib

############################################################################

$(EXEFILE) : $(EXEOBJS) $(EXELIBS)
	$(EXEGUILINK) $(VCLIBS)
	$(EXEPREP) 

lang ::
	$(CD) lang
	for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile install
	$(CD) ..

install : $(EXEFILE) lang

############################################################################
#
# Dependencies
#

$(OUT)\svrmgr_stub.res : AFS_component_version_number.h

clean::
	$(CD) lang
        @if exist AFS_component_version_number.h del AFS_component_version_number.h
	for /f %l in ('dir /B ??_??') do ( if exist @$(NTLANG) do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean )
	$(CD) ..

mkdir:
	-mkdir $(OUT)\lang
	cd lang
	nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir
	cd ..

