# 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

# since we're using rpcndr.h, we can't include <afs/stds.h>'s "hyper" type.

AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DIGNORE_STDS_H

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

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

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

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

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

EXEOBJS = \
	$(OUT)\AfsUsrMgr_stub.res \
	$(OUT)\action.obj \
	$(OUT)\browse.obj \
	$(OUT)\cell_prop.obj \
	$(OUT)\cmdline.obj \
	$(OUT)\columns.obj \
	$(OUT)\command.obj \
	$(OUT)\creds.obj \
	$(OUT)\display.obj \
	$(OUT)\errdata.obj \
	$(OUT)\general.obj \
	$(OUT)\grp_col.obj \
	$(OUT)\grp_create.obj \
	$(OUT)\grp_delete.obj \
	$(OUT)\grp_prop.obj \
	$(OUT)\grp_rename.obj \
	$(OUT)\grp_tab.obj \
	$(OUT)\helpfunc.obj \
	$(OUT)\main.obj \
	$(OUT)\mch_col.obj \
	$(OUT)\mch_create.obj \
	$(OUT)\mch_delete.obj \
	$(OUT)\mch_tab.obj \
	$(OUT)\options.obj \
	$(OUT)\task.obj \
	$(OUT)\usr_col.obj \
	$(OUT)\usr_cpw.obj \
	$(OUT)\usr_create.obj \
	$(OUT)\usr_delete.obj \
	$(OUT)\usr_prop.obj \
	$(OUT)\usr_search.obj \
	$(OUT)\usr_tab.obj \
	$(OUT)\window.obj \
	$(OUT)\winlist.obj

VCLIBS =\
	comctl32.lib \
	shell32.lib

EXELIBS = \
	$(DESTDIR)\lib\afs\TaAfsAdmSvrClient.lib \
	$(DESTDIR)\lib\afs\TaAfsAppLib.lib

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

$(EXEFILE) : $(EXEOBJS) $(EXELIBS)
	$(EXEGUILINK) $(VCLIBS)
        $(_VC_MANIFEST_EMBED_EXE)
	$(EXEPREP)
        $(CODESIGN_USERLAND)
        $(SYMSTORE_IMPORT)

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

install : $(EXEFILE) lang

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

$(OUT)\AfsUsrMgr_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 @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile clean
	$(CD) ..

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

