# Copyright 2004, OpenAFS.ORG 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 the primary makefile
RELDIR=WINNT\aklog
!INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
!INCLUDE ..\..\config\NTMakefile.version

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

AKLOG = $(DESTDIR)\root.client\usr\vice\etc\aklog.exe

AKLOGOBJS = \
	$(OUT)\aklog.obj \
	$(OUT)\linked_list.obj

ASETKEY = $(DESTDIR)\root.server\usr\afs\bin\asetkey.exe

ASETKEYOBJS = \
	$(OUT)\asetkey.obj

EXELIBS = \
	$(DESTDIR)\lib\afs\afspioctl.lib \
    $(DESTDIR)\lib\afsauthent.lib \
    $(DESTDIR)\lib\afs\afskauth.lib

!IF "$(CPU)" == "IA64" || "$(CPU)" == "AMD64" || "$(CPU)" == "ALPHA64"
OTHERLIBS = \
    ..\kfw\lib\$(CPU)\krb5_64.lib \
    ..\kfw\lib\$(CPU)\comerr64.lib \
    dnsapi.lib mpr.lib
!else
OTHERLIBS = \
    ..\kfw\lib\$(CPU)\krbv4w32.lib \
    ..\kfw\lib\$(CPU)\krb5_32.lib \
    ..\kfw\lib\$(CPU)\comerr32.lib \
    dnsapi.lib mpr.lib
!endif
afscflags = -I..\kfw\inc\krb5 -I..\kfw\inc\krb4 $(afscflags)

$(AKLOGOBJS): $$(@B).c
	$(C2OBJ) $**

$(ASETKEYOBJS): $$(@B).c
	$(C2OBJ) $**

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

$(AKLOG) : $(AKLOGOBJS) $(EXELIBS) $(OUT)\aklog.res
	$(EXECONLINK) $(EXELIBS) $(OTHERLIBS)
        $(_VC_MANIFEST_EMBED_EXE)
	$(EXEPREP) 

$(ASETKEY) : $(ASETKEYOBJS) $(EXELIBS) $(OUT)\asetkey.res
	$(EXECONLINK) $(EXELIBS) $(OTHERLIBS)
        $(_VC_MANIFEST_EMBED_EXE)
	$(EXEPREP) 

install : $(COPYHEADERS) $(AKLOG) $(ASETKEY)

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

$(OUT)\aklog.res : aklog.rc AFS_component_version_number.h

$(OUT)\asetkey.res : asetkey.rc AFS_component_version_number.h

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

                                             