# 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

OTHERLIBS = \
    ..\kfw\lib\i386\krbv4w32.lib \
    ..\kfw\lib\i386\krb5_32.lib \
    ..\kfw\lib\i386\comerr32.lib \
    dnsapi.lib mpr.lib

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)
	$(EXEPREP) 

$(ASETKEY) : $(ASETKEYOBJS) $(EXELIBS) $(OUT)\asetkey.res
	$(EXECONLINK) $(EXELIBS) $(OTHERLIBS)
	$(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 ..

                                             