# 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

# This is a pthread safe library containing ubikclient, auth, kauth.

AFSDEV_AUXCDEFINES = -DAFS_PTHREAD_ENV

RELDIR=shlibafsauthent
!include ..\config\NTMakefile.$(SYS_NAME)
!include ..\config\NTMakefile.version

AUDIT = ..\audit
AUTH = ..\auth
KAUTH = ..\kauth
UBIK = ..\ubik
UTIL = ..\util
RXKAD = ..\rxkad
PTSERVER = ..\ptserver
SYS = ..\sys
WINNTAFSD = ..\WINNT\afsd

LIBFILE = $(DESTDIR)\lib\afsauthent.dll

AUDITOBJS = $(OUT)\audit.obj

AUTHOBJS = \
	$(OUT)\cellconfig.obj \
	$(OUT)\userok.obj \
	$(OUT)\writeconfig.obj \
	$(OUT)\authcon.obj \
	$(OUT)\ktc_errors.obj \
	$(OUT)\ktc_nt.obj \
	$(OUT)\acfg_errors.obj

KAUTHOBJS = \
	$(OUT)\kauth.xdr.obj \
	$(OUT)\kauth.cs.obj \
	$(OUT)\kaaux.obj \
	$(OUT)\client.obj \
	$(OUT)\authclient.obj \
	$(OUT)\token.obj \
	$(OUT)\kautils.obj \
	$(OUT)\kalocalcell.obj \
	$(OUT)\kaerrors.obj \
	$(OUT)\user_nt.obj

UBIKOBJS = \
	$(OUT)\ubikclient.obj \
	$(OUT)\uerrors.obj \
	$(OUT)\ubik_int.cs.obj \
	$(OUT)\ubik_int.xdr.obj

UTILOBJS = \
	$(OUT)\pthread_glock.obj \
	$(OUT)\get_krbrlm.obj \
	$(OUT)\fileutil.obj \
	$(OUT)\dirpath.obj \
	$(OUT)\readdir_nt.obj

RXKADOBJS = \
	$(OUT)\rxkad_errs.obj

PTSERVEROBJS = \
	$(OUT)\ptclient.obj \
	$(OUT)\ptint.cs.obj \
	$(OUT)\ptint.xdr.obj \
	$(OUT)\ptuser.obj \
	$(OUT)\display.obj \
	$(OUT)\pterror.obj

SYSOBJS = \
	$(OUT)\pioctl_nt.obj

WINNTAFSDOBJS =\
	$(OUT)\cm_config.obj \
	$(OUT)\afsrpc_c.obj

DLLOBJS =\
	$(AUTHOBJS) \
	$(KAUTHOBJS) \
	$(UBIKOBJS) \
	$(UTILOBJS) \
	$(RXKADOBJS) \
	$(PTSERVEROBJS) \
	$(SYSOBJS) \
	$(WINNTAFSDOBJS) \
	$(AUDITOBJS) \
	$(DESTDIR)\lib\cm_dns.obj \
	afsauthent.res

audit.obj: $(AUDIT)\audit.c
	$(C2OBJ) $(AUDIT)\audit.c

cellconfig.obj: $(AUTH)\cellconfig.c
	$(C2OBJ) $(AUTH)\cellconfig.c

userok.obj: $(AUTH)\userok.c
	$(C2OBJ) $(AUTH)\userok.c

writeconfig.obj: $(AUTH)\writeconfig.c
	$(C2OBJ) $(AUTH)\writeconfig.c

authcon.obj: $(AUTH)\authcon.c
	$(C2OBJ) $(AUTH)\authcon.c

ktc_errors.obj: $(AUTH)\ktc_errors.c
	$(C2OBJ) $(AUTH)\ktc_errors.c

acfg_errors.obj: $(AUTH)\acfg_errors.c
	$(C2OBJ) $(AUTH)\acfg_errors.c

kauth.xdr.obj: $(KAUTH)\kauth.xdr.c
	$(C2OBJ) $(KAUTH)\kauth.xdr.c

kauth.cs.obj: $(KAUTH)\kauth.cs.c
	$(C2OBJ) $(KAUTH)\kauth.cs.c

kaaux.obj: $(KAUTH)\kaaux.c
	$(C2OBJ) $(KAUTH)\kaaux.c

client.obj: $(KAUTH)\client.c
	$(C2OBJ) $(KAUTH)\client.c

authclient.obj: $(KAUTH)\authclient.c
	$(C2OBJ) $(KAUTH)\authclient.c

token.obj: $(KAUTH)\token.c
	$(C2OBJ) $(KAUTH)\token.c

kautils.obj: $(KAUTH)\kautils.c
	$(C2OBJ) $(KAUTH)\kautils.c

kalocalcell.obj: $(KAUTH)\kalocalcell.c
	$(C2OBJ) $(KAUTH)\kalocalcell.c

kaerrors.obj: $(KAUTH)\kaerrors.c
	$(C2OBJ) $(KAUTH)\kaerrors.c

ktc_nt.obj: $(AUTH)\ktc_nt.c
	$(C2OBJ) $(AUTH)\ktc_nt.c

user_nt.obj: $(KAUTH)\user_nt.c
	$(C2OBJ) $(KAUTH)\user_nt.c

ubikclient.obj: $(UBIK)\ubikclient.c
	$(C2OBJ) $(UBIK)\ubikclient.c

uerrors.obj: $(UBIK)\uerrors.c
	$(C2OBJ) $(UBIK)\uerrors.c

ubik_int.cs.obj: $(UBIK)\ubik_int.cs.c
	$(C2OBJ) $(UBIK)\ubik_int.cs.c

ubik_int.xdr.obj: $(UBIK)\ubik_int.xdr.c
	$(C2OBJ) $(UBIK)\ubik_int.xdr.c

get_krbrlm.obj: $(UTIL)\get_krbrlm.c
	$(C2OBJ) $(UTIL)\get_krbrlm.c

dirpath.obj: $(UTIL)\dirpath.c
	$(C2OBJ) $(UTIL)\dirpath.c

fileutil.obj: $(UTIL)\fileutil.c
	$(C2OBJ) $(UTIL)\fileutil.c

readdir_nt.obj: $(UTIL)\readdir_nt.c
	$(C2OBJ) $(UTIL)\readdir_nt.c

pthread_glock.obj: $(UTIL)\pthread_glock.c
	$(C2OBJ) $(UTIL)\pthread_glock.c

rxkad_errs.obj: $(RXKAD)\rxkad_errs.c
	$(C2OBJ) $(RXKAD)\rxkad_errs.c

ptclient.obj: $(PTSERVER)\ptclient.c
	$(C2OBJ) $(PTSERVER)\ptclient.c

ptuser.obj: $(PTSERVER)\ptuser.c
	$(C2OBJ) $(PTSERVER)\ptuser.c

display.obj: $(PTSERVER)\display.c
	$(C2OBJ) $(PTSERVER)\display.c

ptint.cs.obj: $(PTSERVER)\ptint.cs.c
	$(C2OBJ) $(PTSERVER)\ptint.cs.c

ptint.xdr.obj: $(PTSERVER)\ptint.xdr.c
	$(C2OBJ) $(PTSERVER)\ptint.xdr.c

pterror.obj: $(PTSERVER)\pterror.c
	$(C2OBJ) $(PTSERVER)\pterror.c

pioctl_nt.obj: $(SYS)\pioctl_nt.c
	$(C2OBJ) $(SYS)\pioctl_nt.c

afsrpc_c.obj: $(WINNTAFSD)\afsrpc_c.c
	$(C2OBJ) $(WINNTAFSD)\afsrpc_c.c

cm_config.obj: $(WINNTAFSD)\cm_config.c
	$(C2OBJ) $(WINNTAFSD)\cm_config.c

DLLLIBS =\
!IF (("$(SYS_NAME)"=="i386_win95" ) || ("$(SYS_NAME)"=="I386_WIN95" ))
	$(DESTDIR)\lib\win95\afspthread.lib \
!ELSE
	$(DESTDIR)\lib\afspthread.lib \
!ENDIF
	$(DESTDIR)\lib\afsrpc.lib \
	$(DESTDIR)\lib\afsdes.lib \
	$(DESTDIR)\lib\afs\afsutil.lib \
	$(DESTDIR)\lib\afs\afsreg.lib \
	$(DESTDIR)\lib\afs\afseventlog.lib

$(LIBFILE): $(DLLOBJS) $(DLLLIBS)
	$(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib
        $(_VC_MANIFEST_EMBED_DLL)
	$(DLLPREP)
        $(CODESIGN_USERLAND)
        $(SYMSTORE_IMPORT)

# Definitions for generating versioninfo resources
afsauthent.res: afsauthent.rc AFS_component_version_number.h
	$(RC) $*.rc

install: $(LIBFILE)

install9x: install

clean ::
	$(DEL) $(LIBFILE)
